The IBuySpy case studies represent one of the best ways to learn ASP.NET programming. However, they aren't just for Web developers their careful use of tiers, database components, and stored procedure code reinforces many of the points I've stressed in this book. IBuySpy is a fictitious e-commerce company complete with a product catalog, shopping basket, user-comment service, and account information. The IBuySpy site uses output caching to reduce the load on the database by storing rendered HTML for instantaneous reuse, it uses data binding to reduce coding, and it uses ASP.NET user controls to ensure that the site's user interface is modular and reusable. For the distributed application programmer, the most interesting aspect of the IBuySpy store is its use of database classes, which closely follows the service provider model introduced at the beginning of this book. Every database interaction passes through a dedicated table class, which then executes a corresponding stored procedure. The ASP.NET page code contains no dynamic SQL statements or direct database connections. The IBuySpy store also provides XML Web services that allow access to the IBuySpy catalog, but there is no corresponding client application. You can develop your own or test these XML Web services using the Microsoft Internet Explorer test page functionality. You can download the IBuySpy store code in Visual Basic .NET or C# versions from http://www.ibuyspy.com. A setup program creates the required database (provided you have access to Microsoft SQL Server) and virtual directory. You also can run the IBuySpy store online at http://www.ibuyspystore.com, as shown in Figure 19-1. In addition, you can browse the well-commented code online at http://www.ibuyspystore.com/vbdocs/docs/docs.htm. Figure 19-1. The IBuySpy storefront
|