ebook img

Web Technologies TCP/IP, Architecture and Java Programming PDF

626 Pages·2008·9.18 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Web Technologies TCP/IP, Architecture and Java Programming

TCP/IP, Architecture, and Java Programming Second Edition About the Authors ACHYUT GODBOLE is currently the Managing Director of Softexcel Consultancy Services advising global companies about strategies of growth and setting up of delivery organizations and processes for offshore centers. Having been a National Merit Scholar throughout his educational career and with a B Tech. in Chemical Engineering from IIT, Mumbai, Godbole has over thirty years of software development experience in India, USA and UK in companies like IBM, Hindustan Lever, Systime (UK), Syntel, L&T Infotech, Apar Technologies and Disha Technologies.He has contributed to building of companies such as Patni (as GM), Syntel (as MD), L&T Infotech (as CEO), Apar Technologies (as CEO) and Disha Technologies (as Executive Director). All these companies grew many times in terms of revenue and profitability during his tenure. Apart from this, Godbole has written technical books like Operating Systems, Data Communications and Networking, and Web Technologies, all published by McGraw-Hill Education (India). Some of these have been published in Singapore by McGraw-Hill for international distribution and have been translated in different languages including Chinese. ATUL KAHATE has close to thirteen years of experience in Information Technology in India and abroad in various capacities. He has done his Bachelor of Science degree in Statistics and his Master of Business Administration in Computer Systems. He has authored sixteen highly acclaimed books published by McGraw-Hill Education on various areas of Information Technology (including editions), titled Web Technologies—TCP/IP to Internet Application Architectures, Fundamentals of Computers, Information Technology and Numerical Methods, Foundations of Information Technology, Cryptography and Network Security, Object Oriented Analysis and Design, and Schaum’s Series Outlines—Programming in C++. Two of these are published as international editions worldwide by McGraw-Hill Education and have also been translated into Chinese. Several of his books are being used as course textbooks or sources of reference in a number of universities/colleges/IT companies all over the world. Kahate has worked with Syntel, L&T Infotech, American Express and Deutsche Bank previously and is working with Oracle Financial Services Consulting (formerly i-flex solutions limited) for over 6 years now, currently as Head—Technology Practice. He lives in Pune with his wife Anita, daughter Jui and son Harsh. He can be reached at [email protected]. TCP/IP, Architecture, and Java Programming Second Edition A G CHYUT ODBOLE Managing Director Softexcel Consultancy Services A K TUL AHATE Head Technology Practice Oracle Financial Services Consulting (formerly, i-flex solutions limited) Tata McGraw-Hill Publishing Company Limited NEW DELHI McGraw-Hill Offices New Delhi NewYork St Louis San Francisco Auckland Bogotá Caracas Kuala Lumpur Lisbon London Madrid MexicoCity Milan Montreal San Juan Santiago Singapore Sydney Tokyo Toronto Published by the Tata McGraw-Hill Publishing Company Limited, 7 West Patel Nagar, New Delhi 110 008. Copyright © 2008, by The McGraw-Hill Companies Inc. All rights reserved. No part of this publication may be reproduced or distributed in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise or stored in a database or retrieval system without the prior written permission of the publishers. The program listings (if any) may be entered, stored and executedin a computer system, but they may not be reproduced for publication. This edition can be exported from India only by the publishers, Tata McGraw-Hill Publishing Company Limited. ISBN (13): 978-0-07-066905-5 ISBN (10): 0-07-066905-8 Managing Director: Ajay Shukla General Manager: Publishing—SEM & Tech Ed: Vibha Mahajan Sponsoring Editor: Shalini Jha Jr. Sponsoring Editor: Nilanjan Chakravarty Executive—Editorial Services: Sohini Mukherjee Junior Manager—Production: Anjali Razdan General Manager: Marketing—Higher Education & School: Michael J Cruz Product Manager: SEM & Tech Ed: Biju Ganesan Controller—Production: Rajender P Ghansela Assistant General Manager—Production: B L Dogra Information contained in this work has been obtained by Tata McGraw-Hill, from sources believed to be reliable. However, neither Tata McGraw-Hill nor its authors guarantee the accuracy or completeness of any information published herein, and neither Tata McGraw-Hill nor its authors shall be responsible for any errors, omissions, or damages arising out of use of this information. Thiswork is published with the understanding that Tata McGraw-Hill and its authors are supplying information but are not attempting to render engineering or other professional services. If such services are required, the assistance of an appropriate professional should be sought. Typeset at Le Studio Graphique, Guru Shivir, 12, Sector 14, Gurgaon 122 001, and printed at Avon Printers, 271, F.I.E., Patparganj, Delhi 110 092 Cover: SDR Printers RCXLCRCXDRYZY To Sulabha and Sharad Pishavikar Vinayak and Vaishali Godbole Pushpa Agarkar For always being there to encourage and applaud! ACHYUT GODBOLE To my parents Late Dr Meena and Dr Shashikant Kahate For always giving me freedom to carve my own path! ATUL KAHATE (cid:2)(cid:3)(cid:4)(cid:5)(cid:6)(cid:7)(cid:4)(cid:8)(cid:9)(cid:10)(cid:8)(cid:9)(cid:11)(cid:4)(cid:8)(cid:12)(cid:13)(cid:3)(cid:14)(cid:9)(cid:8)(cid:15)(cid:16)(cid:13)(cid:9)(cid:13)(cid:10)(cid:17) (cid:2)(cid:3)(cid:2) Preface to the First Edition The Internet has a very interesting and chequered past. Born out of the cold war, it assumed an extraordinary prominence in the early I 990s, and became a buzzword in the late I 990s, as the century drew to a close. Everyone was talking about the Internet. These were the Internet times. Everything that you did was thought to have some connection or the other with the Internet—whether it involved buying, selling, recruiting, publishing, travelling, emails or even match-making. It was as if the Internet was at the center of our lives, driving each and every aspect of it. Hundreds, if not thousands of companies sprang all around the globe with the Internet as their central focus. Many brick and mortar companies believed that they would not exist if they continued their operations in the old fashioned way, i.e. without becoming Internet-enabled. Many believed that all the middlemen who did not add value would vanish and perish. If a consumer could buy directly sitting at home logging on to the Web site of a company, what was the need for all these shops, superstores as well as agents and brokers? This new awakening gave rise to a whole lot of new technologies, especially in the field of the Web and in the wireless world. Training institutes teaching Java, ASP, HTML or WAP mushroomed and became popular. And suddenly, the dotcomburst. Immediately, there was an awakening that the Internet was not a panacea for everything. After all, you needed to eat, drink, sleep, travel and so on. The brick and mortar had to exist to provide for all of these. The Internet, after all, was only a tool to make the brick and mortar more effective. The Internet bubble had burst. Hundreds of companies were completely destroyed in this turmoil. IT professionals stopped pursuing careers in Java, ASP, etc. as the demand for these skills significantly dropped. The period that we are currently passing through is a period of recovery. There is a growing realization that though the Internet was not a solution to all the problems in the world, it could offer considerable help in many spheres of our activities. E-commerce was not dead after all. May be, it will not eliminate all the middlemen. However, it can and will offer a substantial help in the B2B world. Businesses embracing the Internet for their commercial activities will definitely have a competitive edge and that is a good enough reason for many corporations to still continue looking at e-enabling their operations, especially in this era of fierce competition. It is a firm belief of the authors of the present book that the Internet is still a very important force that will change the way we conduct our business, though it will be an evolution, instead of a revolution, as envisaged earlier. Therefore, Web Technologies, we believe, art still extremely important and relevant and will continue to be so for many years to come. Both of us are practising IT professionals, dealing with the global customers and have dealt with the mainframe and the classical (two-tier) client-server architectures in the past. When we had to deal with the Web Technologies, we found literally dozens if not hundreds of books talking about HTML and Web page (cid:2)(cid:3)(cid:4)(cid:5)(cid:6)(cid:7)(cid:4)(cid:8)(cid:9)(cid:10)(cid:8)(cid:9)(cid:11)(cid:4)(cid:8)(cid:12)(cid:13)(cid:3)(cid:14)(cid:9)(cid:8)(cid:15)(cid:16)(cid:13)(cid:9)(cid:13)(cid:10)(cid:17) (cid:2)(cid:2) designing, or about directly Java programming. There are, of course, many others, which talk about how the Internet will change our lives or the businesses. But, there were and still are not many books dealing with the whole range of Web Technologies, starting from the very foundations of the Internet, i.e. TCP/IP to the basic concepts of Web Technologies—HTML, ASP, JSP, EJB, COM, CORBA, XML, EDI, WAP and the different architectural issues, such as transaction management, security, payment systems, etc. We have precisely tried to do that. We truly believe that at the time of going to press, barring one or two attempts, there is not a single book in the world, which has tried to cover the topics that this book has, especially in the manner that it has. The book is written in an extremely simple and lucid language with ample examples and diagrams. It is truly a step-by-step introduction, though an elaborate one, to the Web Technologies. The book is aimed at graduate and post-graduate students as well as IT professionals. It will be a very useful guide to all the IT professionals, managers and project leaders, who are familiar with the world of mainframes or classical two- tier client-server architectures, and who want to understand the Web Technologies at a fair amount of depth. The readers should remember that it is not about a programming language. A very basic, elementary understanding of how computers and communications work and the knowledge of a programming language would help, but is not a must. Even business managers should understand most of the concepts and should find the book useful to deal with the Internet jargon. The book, in the ultimate analysis, is written to demystify the world of Web Technologies. The book is aimed at painting a broad picture of Web Technologies, so that one can choose to go into any topic of interest, such as Java or EJB or .Net, in depth, without losing the context. The organization of the book is as follows. Chapter 1 introduces the concept of networking protocols. It then discusses the OSI protocol suite. The organization of the OSI model and the details of the various layers are discussed with relevant examples. Chapter 2 introduces the idea of internetworking. The concepts of internetworking, what it takes to form an internetwork are discussed. We also discuss the basics of the Internet, its history and architecture. Chapters 3 to 6 discuss the TCP/IP protocol suite in great depth. All the key aspects of TCP/IPand all the importantTCP/IPprotocols are discussed. Chapter 3 discusses the Internet layer protocols, namely IP, ARP, RARP and ICMP. We examine why IP makes the Internet such an exciting proposition, and discuss the other protocols in the context of IP. Chapter 4 covers the two transport layer protocols in the TCP/IP suite: the reliable TCP and the unreliable UDP. We also study the differences between the two. Chapter 5 examines some of the key applications of TCP/IP, namely the DNS, email, FTP and TFTP, The important email protocols, such as SMTP, POP and IMAP are discussed. We also examine how FTP and TFTP work for file transfer applications. Chapter 6 introduces the key Web application protocols, HTTP and WWW. For the sake of completeness, we also discuss the older TELNET protocol. In this chapter, we also study what HTML is, and how it is used in the creation of Web pages. Chapter 7 takes a different path, and introduces the business side of the Web. Here, we study the various software packages and applications that are readily available. We also examine the B2B and B2C aspects of e- commerce here. Chapter 8 introduces the topic of Web Technologies. We study static Web pages here. We also examine the possible Web architectures in this chapter. We study frames and forms, two of the most important aspects of Web pages. Chapter 9 discusses the idea and importance of dynamic Web pages. We study why dynamic Web pages are so important for the Internet to truly become a business platform. We examine the important dynamic Web page technologies, such as CGI, ASP, JSP and servlets here. (cid:2)(cid:3)(cid:4)(cid:5)(cid:6)(cid:7)(cid:4)(cid:8)(cid:9)(cid:10)(cid:8)(cid:9)(cid:11)(cid:4)(cid:8)(cid:12)(cid:13)(cid:3)(cid:14)(cid:9)(cid:8)(cid:15)(cid:16)(cid:13)(cid:9)(cid:13)(cid:10)(cid:17) (cid:2)(cid:2)(cid:3) Chapter 10 moves on to active Web pages. The Java programming language introduced the concept of applets, which made the Web pages active. We examine applets, and Microsoft’s version of active Web pages, using the ActiveX Controls. Chapter 11 examines why session management is a very crucial issue in the Web world. We study what happens without it, and why it is so vital. Then we examine the various technologies that allow application architects to perform session management, such as cookies, session variables, hidden variables, etc. Chapter 12 covers the idea of a transaction, its types, and how and why the database transactions are not good enough. We then examine the two most popular transaction management software technologies for the Web, Microsoft’s MTS and Sun’s EJB. Chapter 13 talks about the various security issues related to the Internet. We study the basics of cryptography here. We study what are digital certificates, digital signatures, how they can be created and used. We also study organizational security issues, with reference to firewalls. Chapter 14 details the various payment mechanisms that are used over the Internet. We discuss SSL here, although it is not-strictly a payment mechanism, because it is so closely referred to in the context of secure credit card payments. We also discuss the SET protocol in great detail, and then compare SET with SSL. We cover the electronic money and credit card processing models. Chapter 15 discusses the idea of middleware. We discuss why middleware is an important aspect of modem Web Technology architectures. We describe these details with the help of an example in a step-by-step fashion. We discuss key middleware technologies such as CORBA, RMI and DCOM. We also compare them with each other. Chapter 16 covers Electronic Data Interchange (EDI). Although EDI is a technology that is in use for several years now, it has gained renewed prominence due to its adaptation on the Internet. We discuss how EDI works, what are its benefits, and how it fits in with the Internet. Chapter 17 discusses the exciting new technology of XML. We take a technical look at the XML world, and also see how it is useful in the design of Web-based solutions. More specially, we concentrate on issues that make XML the modern ASCII. Chapter 18 closes our discussion with an in-depth look at the Wireless Application Protocol (WAP). We study WAP in great detail, taking a look at each of its layers. We study WML and WML Script, and also study their differences vis-à-vis HTML and JavaScript/VBScript. We also note why WAP is not so popular, and what are the likely alternatives. Five appendices supplement our core chapters in a number of ways. Appendix A is a case study of a Web commerce site using Microsoft’s ASP. Without going into the technical jargon, we examine the essential requirements of a Web application, and how we can deal with those using ASP. The focus is on the architecture here, and not on the syntax. Appendix B takes a look at the emerging technologies, such as Microsoft’s .Net Framework. Appendix C discusses the various ways in which one can obtain connectivity to the Internet. We study how dial-up ISP connections work, and go on to examine leased lines, ADSL and cable Internet technologies. (cid:2)(cid:3)(cid:4)(cid:5)(cid:6)(cid:7)(cid:4)(cid:8)(cid:9)(cid:10)(cid:8)(cid:9)(cid:11)(cid:4)(cid:8)(cid:12)(cid:13)(cid:3)(cid:14)(cid:9)(cid:8)(cid:15)(cid:16)(cid:13)(cid:9)(cid:13)(cid:10)(cid:17) (cid:2)(cid:2)(cid:3)(cid:3) Appendix D presents an introduction to Object Technology for those who are not familiar with it. Apart from the theory, we also discuss a simple case study to see how Object Technology differs from the conventional application development techniques. Appendix E concludes our discussions with a case study on security using Public Key Infrastructure (PKI). We examine what is required to provide for cryptographic functionalities in Web applications. For this, we put forth a list of requirements, and examine how they can be met, and what technologies are required for this purpose. There are a number of individuals who have made this book possible. Shobha Godbole and Anita Kahate obviously stand out. We are deeply thankful that they put up with us in spite of household commitments. Anita, being a software professional herself, gave very valuable suggestions, and helped in terms of developing some of the content and also in a number of reviews. Our parents, family members, friends, colleagues and many others also constantly encouraged us. We must thank Dr N Subrahmanyam, Vibha Mahajan, Yusuf Ahmad Khan, Srinivas Iyer, Mini Narayanan and the rest of the team at Tata McGraw-Hill for their valuable suggestions and support. The book would not have seen the light of the day without their help. But ultimately, the book is a result of a very strong passion that both of us share-the passion for acquiring and sharing knowledge, and also the passion to demystify, so that we all can learn and enjoy. To what extent this goal has been achieved, only time will tell. The reader is most welcome to write back to us at [email protected] or [email protected]. ACHYUT GODBOLE ATUL KAHATE (cid:1)(cid:2)(cid:3)(cid:4)(cid:5)(cid:6)(cid:3)(cid:7)(cid:8)(cid:9)(cid:7)(cid:8)(cid:10)(cid:3)(cid:7)(cid:11)(cid:3)(cid:6)(cid:9)(cid:12)(cid:13)(cid:7)(cid:14)(cid:13)(cid:15)(cid:8)(cid:15)(cid:9)(cid:12) (cid:1)(cid:2) Preface to the Second Edition (cid:3)(cid:2)(cid:4)(cid:5)(cid:2)(cid:6)(cid:4)(cid:7)(cid:8)(cid:9)(cid:10)(cid:8)(cid:11)(cid:12)(cid:4)(cid:8)(cid:13)(cid:4)(cid:7)(cid:8)(cid:14)(cid:15)(cid:6)(cid:11)(cid:6)(cid:9)(cid:16) It is with great pleasure that we are bringing out the second edition of this book since the time the first version came out (more than six years back). Six years is a very long time frame for the new edition of a technical book, and more so if the book happens to be covering the latest trends in Web-based technologies. We hope that the present edition lives up to the challenge, and provides a power-packed update to all the contents that were there in the first edition, in addition to a lot of new content, which has been developed from scratch. We are confident that the reader would find immense value in this book for keeping pace with the changing paradigm of Internet technologies, and that sufficient concepts as well as depth are provided to give the reader a feel of complete understanding of the whole thing. (cid:17)(cid:18)(cid:4)(cid:19)(cid:6)(cid:10)(cid:6)(cid:19)(cid:8)(cid:20)(cid:21)(cid:18)(cid:5)(cid:9)(cid:2)(cid:4)(cid:21)(cid:4)(cid:16)(cid:11)(cid:22)(cid:8)(cid:6)(cid:16)(cid:8)(cid:11)(cid:12)(cid:4)(cid:8)(cid:13)(cid:4)(cid:7)(cid:8)(cid:14)(cid:15)(cid:6)(cid:11)(cid:6)(cid:9)(cid:16) Here is a summary of prominent changes made to the content and structure of the book: (cid:1) Coverage of TCP/IP is made more comprehensive by adding more relevant material to various protocols and compacting some material which was perceived to be too lengthy earlier. (cid:1) The coverage of HTML is enhanced with the inclusion of many hands-on examples. (cid:1) There is a separate chapter on JavaScript now, as against a very basic example in the first edition. (cid:1) The technology of AJAX is covered in detail. (cid:1) The obsolete material on ASP is dropped, and it is replaced by a detailed discussion of ASP.NET. (cid:1) A separate chapter is dedicated to the latest Java Web technologies. (cid:1) The material on information security is split into two chapters for more focused coverage. (cid:1) The coverage of XML is greatly expanded. (cid:1) Web services and middleware technologies are discussed in detail, with the focus shifting from DCOM, CORBA, and RMI to Web services. (cid:1) Wireless technologies are covered in detail for the first time. (cid:1) Obsolete/irrelevant material is completely removed, e.g., detailed discussions on electronic commerce and products in that space. (cid:1) Coverage of Web 2.0 concepts

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.