Over the past few months Microsoft’s .NET framework and especially ASP.NET web platform have become increasingly popular in a wide range of companies. Microsoft and Dell, for instance, already have large portions of their retail Web sites written in ASP.NET, while many smaller firms and even government institutions are updating their Intranet sites using .NET technologies.
Much has been said and written about the advantages ASP.NET presents over “traditional” ASP technology – Web Controls, ViewState, Server-side validation controls, code-behind mechanism are only few of the examples. There’s little doubt that ASP.NET will save development time and increase quality of Web applications built on Microsoft platform.
Aside from all the hype surrounding the release, one brand-new feature of VB.NET and C# languages has emerged relatively unnoticed – an object-oriented framework of classes, which allows developers to code Web applications in ways only C++ and Java had been capable of before. Data encapsulation, inheritance, polymorphism and object hierarchies are now all readily available in .NET framework. Furthermore, building such architectures is easier than ever, which adds a new dimension to application development in Microsoft server environments.
In this article I will explore the topic of design and implementation of a class framework in VB.NET, and using resulting objects in ASP.NET pages.
We’ll consider a standard Web application as an example – creating a “product list” web page, which allows users to jump over to the next page and edit individual product information, such as product name, price and number of units in stock. The “edit product” page would also display product supplier’s name and country in read-only format.