About the Authors p. xiii About the Technical Reviewer p. xv Introduction p. xvii Starting an E-Commerce Site p. 1 Deciding Whether to Go Online p. 1 Getting More Customers p. 2 Making Customers Spend More p. 2 Reducing the Costs of Fulfilling Orders p. 3 Making Money p. 3 Considering the Risks and Threats p. 4 Designing for Business p. 5 Getting a Site Up p. 6 Creating Your Own Shopping Cart p. 6 Processing Orders p. 7 The Balloon Shop p. 8 Summary p. 9 Laying Out the Foundations p. 11 Designing for Growth p. 12 Meeting Long-Term Requirements with Minimal Effort p. 12 The Magic of the Three-Tier Architecture p. 13 Choosing Technologies and Tools p. 18 Using ASP.NET 2.0 p. 19 Using C# and VB.NET p. 23 Using Visual Studio 2005 and Visual Web Developer 2005 Express Edition p. 23 Using SQL Server 2005 p. 24 Following Coding Standards p. 26 Creating the Visual Web Developer Project p. 27 Implementing the Site Skeleton p. 31 Building the First Page p. 33 Adding the Header to the Main Page p. 38 Creating the SQL Server Database p. 41 Downloading the Code p. 43 Summary p. 43 Creating the Product Catalog: Part I p. 45 Showing Your Visitor What You've Got p. 45 What Does a Product Catalog Look Like? p. 46 Previewing the Product Catalog p. 47 Roadmap for This Chapter p. 50 Storing Catalog Information p. 52 Understanding Data Tables p. 53 Creating the Department Table p. 61
Communicating with the Database p. 63 Speaking the Database Language p. 64 Creating Stored Procedures p. 68 Adding Logic to the Site p. 70 Connecting to SQL Server p. 71 Issuing Commands and Executing Stored Procedures p. 74 Implementing Generic Data Access Code p. 76 Catching and Handling Exceptions p. 78 Sending Emails p. 81 Writing the Business Tier Code p. 81 Displaying the List of Departments p. 90 Preparing the Field: Themes, Skins, and Styles p. 90 Displaying the Departments p. 94 Adding a Custom Error Page p. 100 Summary p. 104 Creating the Product Catalog: Part II p. 105 Storing the New Data p. 105 What Makes a Relational Database p. 106 Enforcing Table Relationships with the FOREIGN KEY Constraint p. 110 Adding Categories p. 111 Adding Products p. 116 Querying the New Data p. 122 Retrieving Short Product Descriptions p. 122 Joining Data Tables p. 123 Showing Products Page by Page p. 125 Writing the New Stored Procedures p. 129 Using ADO.NET with Parameterized Stored Procedures p. 135 Using Input Parameters p. 135 Using Output Parameters p. 135 Stored Procedure Parameters Are Not Strongly Typed p. 136 Getting the Results Back from Output Parameters p. 136 Completing the Business Tier Code p. 136 Implementing the Presentation Tier p. 147 Displaying the List of Categories p. 148 Displaying Department and Category Details p. 153 Displaying Product Lists p. 157 Displaying Product Details p. 165 Summary p. 167 Searching the Catalog p. 169 Choosing How to Search the Catalog p. 169 Teaching the Database to Search Itself p. 171
Implementing a Custom Search Engine p. 171 Introducing the SearchCatalog Stored Procedure p. 175 Implementing Paging p. 177 Writing the Code p. 178 Implementing the Business Tier p. 182 Implementing the Presentation Tier p. 184 Creating the Search Box p. 185 Displaying the Search Results p. 191 Searching Smarter p. 195 Summary p. 197 Improving Performance p. 199 Handling Postback p. 199 Managing ViewState p. 203 Using Output Cache p. 206 Summary p. 208 Receiving Payments Using PayPal p. 209 Considering Internet Payment Service Providers p. 210 Getting Started with PayPal p. 211 Integrating the PayPal Shopping Cart and Checkout p. 212 Using the PayPal Single Item Purchases Feature p. 218 Summary p. 219 Catalog Administration p. 221 Preparing to Create the Catalog Administration Page p. 221 Authenticating Administrators p. 227 ASP.NET 2.0 and Using Declarative Security p. 229 Implementing Security p. 230 Administering Departments p. 243 Stored Procedures for Departments Administration p. 244 Middle-Tier Methods for Departments Administration p. 244 The DepartmentsAdmin User Control p. 249 Customizing the GridView with Template Columns p. 263 Administering Categories p. 266 Stored Procedures for Categories Administration p. 266 Middle-Tier Methods for Categories Administration p. 267 The CategoriesAdmin Web User Control p. 270 Administering Products p. 277 Stored Procedures for Products Administration p. 278 Middle-Tier Methods for Products Administration p. 280 The ProductsAdmin Web User Control p. 284 Administering Product Details p. 293 Stored Procedures for Product Details Admin p. 295
Middle-Tier Methods for Product Details Admin p. 298 The ProductDetailsAdmin Web User Control p. 302 Summary p. 309 Creating a Custom Shopping Cart p. 311 Designing the Shopping Cart p. 314 Storing Shopping Cart Information p. 314 Implementing the Data Tier p. 317 Implementing the Business Tier p. 320 Generating Shopping Cart IDs p. 320 What If the Visitor Doesn't Like Cookies? p. 325 Implementing the Shopping Cart Access Functionality p. 325 Implementing the Presentation Tier p. 329 Creating the Add to Cart Buttons p. 329 Showing the Shopping Cart Summary p. 331 Displaying the Shopping Cart p. 335 Editing Product Quantities p. 341 Adding "Continue Shopping" Functionality p. 343 Administering the Shopping Cart p. 346 Deleting Products that Exist in Shopping Carts p. 346 Removing Old Shopping Carts p. 346 Summary p. 352 Dealing with Customer Orders p. 353 Implementing an Order-Placing System p. 353 Storing Orders in the Database p. 355 Updating the Business Layer p. 360 Adding the Checkout Button p. 361 Administering Orders p. 363 Creating the OrdersAdmin Web Form p. 365 Displaying Existing Orders p. 367 Administering Order Details p. 381 Summary p. 399 Making Product Recommendations p. 401 Increasing Sales with Dynamic Recommendations p. 402 Implementing the Data Tier p. 403 Adding Product Recommendations p. 407 Adding Shopping Cart Recommendations p. 409 Implementing the Business Tier p. 410 Implementing the Presentation Tier p. 412 Summary p. 415 Adding Customer Accounts p. 417 Handling Customer Accounts p. 417
Creating a BalloonShop Customer Account Scheme p. 418 The SecurityLib Classes p. 419 Customer Logins p. 448 Customer Details p. 455 The Checkout Page p. 474 Setting Up Secure Connections p. 479 Obtaining an SSL Certificate from VeriSign p. 480 Enforcing SSL Connections p. 480 Including Redirections to Enforce Required SSL Connections p. 482 Summary p. 484 Advanced Customer Orders p. 485 Implementing Customer Order Functionality p. 485 Placing Customer Orders p. 485 Accessing Customer Orders p. 490 Tax and Shipping Charges p. 500 Tax Issues p. 500 Shipping Issues p. 501 Implementing Tax and Shipping Charges p. 502 Summary p. 515 Order Pipeline p. 517 Defining an Order Pipeline p. 517 Understanding the BalloonShop Order Pipeline p. 518 Building the Order Pipeline p. 522 The Basic Order Pipeline p. 522 Adding More Functionality to OrderProcessor p. 535 Summary p. 539 Implementing the Pipeline p. 541 Considering the Code for the Pipeline Sections p. 541 Business Tier Modifications p. 541 Presentation Tier Modifications p. 554 Administering BalloonShop Orders p. 561 Database Modifications p. 561 Business Tier Modifications p. 565 Presentation Tier Modifications p. 575 Testing the Order Administration Page p. 589 Summary p. 591 Credit Card Transactions p. 593 Learning the Credit Card Transaction Fundamentals p. 593 Working with Credit Card Payment Gateways p. 594 Understanding Credit Card Transactions p. 595 Implementing Credit Card Processing p. 596
Considering the DataCash XML API p. 596 Integrating DataCash with BalloonShop p. 615 Business Tier Modifications p. 616 Testing the Pipeline p. 621 Going Live p. 621 Using the PayFlow Pro API p. 621 Summary p. 624 Integrating Amazon Web Services p. 625 Accessing the Amazon E-Commerce Service p. 626 Creating Your Amazon E-Commerce Service Account p. 627 Getting an Amazon Associate ID p. 627 Accessing Amazon Web Services Using REST p. 628 Accessing Amazon Web Services Using SOAP p. 631 Integrating the Amazon E-Commerce Service with BalloonShop p. 631 Writing the Amazon Access Code p. 632 Implementing the Presentation Tier p. 639 Summary p. 642 Installing the Software p. 643 What Do These Programs Do? p. 643 Installing Visual Web Developer 2005 Express Edition and SQL Server 2005 Express Edition p. 644 Installing SQL Server 2005 Express Manager p. 645 Installing the IIS 5.x Web Server p. 646 Installing IIS 5.x on a Web Server Machine p. 647 Working with IIS p. 649 Project Management Considerations p. 651 Developing Software Solutions p. 651 Considering the Theory Behind Project Management p. 652 The Waterfall (or Traditional) Method p. 652 The Spiral Method p. 654 The Rapid Application Development (RAD) Method p. 656 Extreme Programming (XP) Methodology p. 657 Picking a Method p. 657 Understanding the E-Commerce Project Cycle p. 658 Maintaining Relationships with Your Customers p. 659 Index p. 661 Table of Contents provided by Blackwell's Book Services and R.R. Bowker. Used with permission.