Cover image for Developing e-commerce sites : an integrated approach
Developing e-commerce sites : an integrated approach
Sharma, Vivek.
Personal Author:
Publication Information:
Boston, Mass. : Addison-Wesley, [2000]

Physical Description:
xvii, 617 pages : illustrations ; 24 cm + 1 computer optical disc (4 3/4 in.)
Added Author:
Format :


Call Number
Material Type
Home Location
Item Holds
HF5429.12 .S53 2000 Book and Software Set Central Closed Stacks

On Order



Developing e-Commerce Sites leads you step-by-step through the process of building a sophisticated e-commerce Web site. This book brings you up to speed on the latest technologies and shows you how to integrate them into a customized e-commerce site that serves your organizations specific needs. Details and instructions are reinforced by carefully crafted code examples that incorporate empowering technologies. The examples are included on the accompanying CD-ROM. In addition, the authors describe a complete e-commerce solution, illustrating system design, user interface, and utility classes. Developing e-Commerce Sites demonstrates actual implementation of the five requisite functions of an e-commerce site: inventory management, profiling, ordering, shipping, and reporting. You will find clear, practical information on such topics as: *Java language basics *Servlets and JavaScript *SQL and JDBC *XML and how it can be used in e-commerce *Credit card verification *Security *Inventory management *Customer profiling *Ordering, shipping, and reporting With this book as a guide, technical professionals and managers charged with deploying an e-commerce site will learn the important issues

Author Notes

Vivek Sharma is a software developer at Oracle Corporation with nearly seven years of software development and research experience. He writes for Web magazines such as Java Developers' Journal , and his major area of interest and expertise is Internet application research and development. Rajiv Sharma is the CEO of EDA, Inc., and also works as an independent consultant. He has more than ten years of experience, and is co-author of Java Programming by Example (SIGS publications/Cambridge University Press) with Vivek Sharma.




JG541 Introduction I still remember those days in school when we spent endless hours writing a small program in C that would allow two computers to communicate. There is no doubt that C is an excellent and very flexible language. However, in today's world of breakneck speed, when everything needs to be developed by "next Tuesday," doing things in C alone can be a bit challenging. It's the day and age of specialized languages and technologies. In this book we discuss a number of languages specifically geared for Web development. And we discuss these within an even more focused environment--that of developing tools that can help in conducting commerce over the Internet. The book not only introduces you to different languages that can be used for developing effective e-commerce applications, it also presents a large number of practical examples. In addition it deals with issues such as performance and security, which are of importance to any e-commerce site. The last section of the book presents a complete example: five systems that can be leveraged by any e-commerce site. Rationale There are a number of books on the market that talk about individual technologies for Web development. While these books excel in the topics they're dealing with, practical Web development requires the use of more than one language and technology. A book on databases would teach you SQL and everything related to databases. Another book would make you a master of Java. However, if you're asked to develop e-commerce systems for a company, you would need to know not only these two but a lot more, such as Javascript, JDBC, Servlets, Web servers, etc. More important, you would need to understand which language and technology are best suited for what and how they can be integrated. This book is an attempt to fill that void. Different pieces required to solve the puzzle are presented in a logical and easy-to-follow manner. Every chapter builds on knowledge gained in previous chapters. Carefully crafted examples show you how to develop practical solutions using a combination of appropriate technologies. In short, the book was written to get you up to speed by next Tuesday, if not Monday! Target Audience The primary target audience for this book is technical people who want to learn how to develop applications for e-commerce. These include both technical developers who want to learn the technologies and technical managers who want to see how developers can apply them. Even though the book uses e-commerce as a backdrop, it covers everything required for building any kind of Internet application. It is thus intended to be useful even for technical people interested in generic Web development. Here are some categories of people who can benefit from this book: Software professionals who want to design and develop e-commerce applications. Semitechnical managers and business school students who want to understand what e-commerce systems are, what technologies they require, and how they can be developed and deployed. Consultants, developers, and computer science students who just want to learn different Web technologies and understand how they can be integrated to build powerfult Internet applications. Highlights of the Book The book has a number of useful features: It brings readers up to speed on different technologies used for building powerful Web-based systems. It contains a large number of practical examples. It teaches gradually and progressively how to build a sophisticated e-commerce system. It provides Java, Javascript, JDBC, Servlet, and SQL code segments that can be used to save product development time. It gives the "inside" view of an e-commerce system so that users have a better understanding of the whole concept. It provides an introduction to XML and how it can be used in e-commerce. Organization The book comprises four parts, followed by two appendices: Part I contains the introductory chapter, which outlines everything that follows. This chapter also shows you how you can get your computer on the Internet and establish a Web presence. Terms applicable to the Internet are described briefly. Part II begins with a chapter on HTML. Other chapters in this section discuss Java, Servlets, Javascript, SQL, JDBC, and XML. Everything is taught by example. All chapters except the HTML chapter end with a section called Practical Examples where we present a number of programs that solve some complex, practical problems. By making use of knowledge from previous chapters, these examples also illustrate an integration of different languages. Part III takes a look at some practical considerations for anyone planning on building Web systems and/or e-commerce systems. Chapter 8, "Credit Card Verification," discusses several ways in which you can start accepting credit cards over the Net. Chapter 9, "Security and Performance," talks about steps you can take to make your site faster and more secure. Part IV which completes the book, contains a complete e-commerce solution. It begins with Chapter 10, "System Design," which introduces five systems developed in the following chapters using technologies covered in Parts II and III. This chapter also presents the design of a database that is used by the e-commerce systems, which should work as a good tutorial for designing a normalized database. Chapter 11, "Functionality," talks about the user interface of the systems. Chapter 12, "Utilities," presents a number of utility classes that can be leveraged by any Web application. The remaining five chapters in Part IV discuss the actual implementation of the five systems. Appendix A contains instructions for installing and configuring different pieces of required software such as JDBC drivers, Apache Web server, databases, etc. Appendix B provides a complete listing of code for the systems designed in Part IV. Excerpted from Developing e-Commerce Sites: An Integrated Approach by Robert B. Ekelund, Rajiv Sharma, Vivek Sharma All rights reserved by the original copyright owners. Excerpts are provided for display purposes only and may not be reproduced, reprinted or distributed without the written permission of the publisher.

Table of Contents

Introductionp. xv
Rationalep. xv
Target Audiencep. xvi
Highlights of the Bookp. xvi
Organizationp. xvii
Acknowledgmentsp. xvii
Part I

p. 1

Chapter 1 The Basics of Internet Technologyp. 3
Skill Level Requiredp. 4
Web Sites and Browsersp. 4
Web Pages and HTMLp. 5
Web Servers and HTTPp. 7
URLsp. 7
FORMS and CGIp. 8
Javascriptp. 10
Cookiesp. 12
Java and Servletsp. 13
Databasesp. 14
JDBCp. 14
XMLp. 15
e-Commerce Systemsp. 15
Inventory Management Systemsp. 15
Profile Management Systemsp. 16
Ordering Management Systemsp. 17
Shipping Management Systemsp. 19
Reporting Systemsp. 19
Getting on the Internetp. 19
Using an ISPp. 20
Using a Hosting Servicep. 20
Keeping the Computer with Youp. 21
A Note about Speedp. 21
Disclaimerp. 21
Part II

p. 23

Chapter 2 HTMLp. 25
Introductionp. 25
First HTML Filep. 26
Some Formatting Tagsp. 27
Linksp. 29
Listsp. 31
Tablesp. 32
Framesp. 33
Formsp. 37
Putting Comments in HTMLp. 41
Conclusionp. 41
Chapter 3 Javap. 43
Introductionp. 43
Object Oriented Programmingp. 44
First Java Programp. 45
Applets and Applicationsp. 47
Instancesp. 48
Method Overloadingp. 50
Inheritancep. 51
Interfacesp. 54
Packagesp. 56
Exceptionsp. 58
File I/Op. 60
Threadsp. 61
Some Useful Classes and Methodsp. 65
Vectorsp. 65
Hashtablesp. 67
Object Serializationp. 68
Remote Method Invocation (RMI)p. 71
Reading a URLp. 77
Working with Proxiesp. 78
Internationalizationp. 78
Appletsp. 81
Threads in Appletsp. 84
Java Mail APIp. 88
Commenting Code in Javap. 90
Some Useful Toolsp. 90
Some Practical Examplesp. 91
Example 1 Displaying Multiple Advertisements on Your Sitep. 91
Example 2 Keeping Track of Clicks on Advertisementsp. 96
Conclusionp. 103
Some Handy Classes and Methods in Some Useful Packagesp. 103
Chapter 4 Servletsp. 107
HTML FORMsp. 107
POST and GET METHODsp. 108
Anatomy of a Request and a Responsep. 109
CGI Scriptsp. 110
Drawbacks of CGIp. 110
Efficiency with Servletsp. 111
Anatomy of a Servletp. 112
JServ--Servlet Enginep. 112
A Basic Servletp. 114
FORM Variablesp. 116
Cookiesp. 118
Sessionsp. 123
Some Practical Examplesp. 126
Example 1 Bulk Email Senderp. 126
Example 2 Internationalized Help Screens for Your Worldwide Customersp. 130
Example 3 Stocks Readerp. 136
Example: Session-Based Shopping Cartp. 141
Conclusionp. 149
Some Useful Interfaces/Classes and Some of Their Methodsp. 149
Chapter 5 Javascriptp. 153
Introductionp. 153
Documentsp. 154
documents.formsp. 154
Statementsp. 154
Examplesp. 155
Functionsp. 155
Objects in Javascriptp. 156
Events and Event Handlingp. 158
Arraysp. 159
FORMsp. 160
Select Listsp. 161
Buttonsp. 162
Submit and Radio Buttonsp. 162
Checkboxesp. 164
Text Fields and Text Areasp. 165
Framesp. 165
Cookiesp. 167
A Practical Examplep. 170
Example: Personalized One-to-One Service to Customersp. 170
Some Useful Methods, Properties, and Event Handlers of Some Useful Objectsp. 182
Referencep. 184
Chapter 6 SQL and JDBCp. 185
Databases and SQLp. 186
Schemasp. 186
Datatypesp. 187
Table Creationp. 187
Column Constraintsp. 188
Keysp. 189
Indexesp. 190
Dropping Tablesp. 190
Data Insertion and Modificationp. 190
Transactionsp. 192
Data Retrievalp. 192
Operatorsp. 193
Functionsp. 194
Retrieving Records from Multiple Tablesp. 194
Deleting Recordsp. 195
Sequencesp. 195
Stored Proceduresp. 196
JDBCp. 198
Connecting to the Databasep. 198
Driversp. 199
Connection Objectp. 199
Statement Objectp. 200
Retrieving Datap. 200
Inserting/Modifying Datap. 203
PreparedStatementp. 203
Insert into a LONG Columnp. 206
CallableStatementp. 208
Transactions in JDBCp. 210
Some Practical Examplesp. 213
Example 1 A Customer Registration Systemp. 213
Example 2 Bulk Email Sender--JDBC Versionp. 217
Some Useful Classes and Interfaces in the Java.sql Packagep. 222
Chapter 7 XMLp. 225
Introductionp. 225
Some Rules to Followp. 227
Displaying an XML Documentp. 227
Data Interchange with an XML Documentp. 227
Document Type Definitions (DTDs)p. 229
Parsersp. 230
Using XMLp. 230
Client-Side Usagep. 230
Server-Side Usagep. 232
Some Practical Examplesp. 234
Example 1 Generating XML from the Databasep. 235
Example 2 Reading XML Data into the Databasep. 238
Example 3 XML-Based Stock Analyzerp. 243
Conclusionp. 247
Referencesp. 247
Part III

p. 249

Chapter 8 Credit Card Verificationp. 251
Card Authorization URLsp. 252
Third-Party APIsp. 255
Chapter 9 Security and Performancep. 257
Securityp. 257
Firewallsp. 258
Database Securityp. 258
Software Patchesp. 259
Data Transmission Securityp. 259
Public and Private Keysp. 259
Certificatesp. 260
Ciphersp. 260
Secure Sockets Layerp. 260
Message Digestsp. 261
Password Securityp. 263
Some Hints on Making the Applications Securep. 263
Performancep. 265
Finding and Fixing Bottlenecksp. 266
Some Suggestionsp. 267
Part IV

p. 269

Chapter 10 System Designp. 271
Introductionp. 271
Inventory Management Systemp. 271
Things to Think Aboutp. 275
Profile Management Systemp. 276
Things to Think Aboutp. 278
Ordering Management Systemp. 278
Things to Think Aboutp. 280
Other Systemsp. 281
Conclusionp. 281
Chapter 11 Functionalityp. 283
Introductionp. 283
Inventory Management Systemp. 283
Menup. 284
Adding a Categoryp. 284
Adding a Subcategoryp. 286
Deleting Categoriesp. 287
Adding Productsp. 287
Modifying Productsp. 288
Viewing and Deleting Productsp. 290
Typical Usage Scenariop. 290
Ordering Systemp. 290
Pagep. 291
Ordering Menup. 292
Adding Products to Checkout Cartp. 293
Cart Contentsp. 294
Checkoutp. 294
Checkout for Existing Usersp. 295
Personal Cart Optionp. 295
Categories Optionp. 296
Order History Optionp. 296
Search Optionp. 297
Typical Usage Scenariop. 299
Profile Management Systemp. 299
Top Menup. 299
Registrationp. 300
Profile Updatep. 300
Contact Us Optionp. 301
Password Finder Optionp. 303
Shipping Management Systemp. 304
Pagep. 304
Reporting Systemp. 306
Pagep. 306
Reporting Menup. 306
User Distributionp. 307
Sales Distributionp. 307
User Frequencyp. 309
Sales Frequencyp. 310
Chapter 12 Utilitiesp. 311
Introductionp. 311
Description of the Utilitiesp. 311
Connection-Pooling Utilityp. 312
Authenticatorp. 316
Email-Sending Utilityp. 318
HTML Template Utilityp. 319
Chapter 13 Inventory Management Systemp. 323
Prerequisitesp. 323
High-Level Descriptionp. 323
Classes and Their Methodsp. 324
Detailed Descriptionp. 327
HTML Files in Document Rootp. 340
Other HTML Files and Templatesp. 342
Chapter 14 Profile Management Systemp. 345
High-Level Descriptionp. 345
Classes and Their Methodsp. 345
Detailed Descriptionp. 348
Document Root HTML Filesp. 357
Other HTML Files and Templatesp. 359
Chapter 15 Ordering Management Systemp. 361
High-Level Descriptionp. 361
Classes and Their Methodsp. 361
Detailed Descriptionp. 366
Document Root HTML Filesp. 378
Other HTML Files and Templatesp. 385
Part V

p. 387

Chapter 16 Shipping Management Systemp. 389
High-Level Descriptionp. 389
Classes and Their Methodsp. 389
Detailed Descriptionp. 391
Document Root HTML Filesp. 395
Other HTML Files and Templatesp. 395
Chapter 17 Reporting Systemp. 397
High-Level Descriptionp. 397
Classes and Their Methodsp. 397
Detailed Descriptionp. 400
Document Root HTML Filesp. 406
Other HTML Files and Templatesp. 406
Appendix A Installation and Configuration Instructionsp. 409
Apachep. 409
Installationp. 409
Troubleshootingp. 410
Configurationp. 411
JServp. 412
Installationp. 412
Configurationp. 414
Oraclep. 416
Utilitiesp. 416
mSQLp. 417
Troubleshootingp. 417
Utilitiesp. 418
JDBC Driversp. 419
Troubleshootingp. 419
JavaMailp. 419
Appendix B Complete Code Listingp. 421
Installationp. 421
Inventory Management Systemp. 427
Ordering Management Systemp. 472
Profile Management Systemp. 515
Shipping Management Systemp. 557
Reporting Systemp. 573
Utilitiesp. 599
SQL For Creating Tables and Sequencesp. 604
Indexp. 607