Using VB in COM

The construction of an extremely simple COM web application from start to finish, including all the steps that should be a part of the development effort, has been demonstrated. A more realistic COM object would feature a set of classes that mimic the objects discovered in a requirements gathering exercise with greater reality. Among the features likely to exist in a COM web application are the ability to store data related to the objects discovered, read data for the objects discovered, serialize the object data into XML, and format it for display in a web browser. For the purposes of this chapter, many of the steps related to requirements gathering are skipped. Refer to Chapter 18 for an overview of the effort that is included in a software development cycle.

Object-oriented (OO) design and analyses is likely one of the greatest deficits that exists in the web software development community today. Web software is no less complex or unconfined by the realities of engineering and design than any other complex engineering effort, so the conventions and efforts of good practice and design should not be ignored. It seems, however, that OO design is not performed often prior to a programmer embarking on creating a web application.

Organizations often perform design and analyses after the product is built and they realize that the product has to be rebuilt for each enhancement. In any project, providing time for analyses and design is critical to increasing the chances that the software effort will exhibit greater adherence to meeting projected development timelines, accommodate future enhancements with less problems, and increase team moral on the project.

There is a problem with OO analyses and design and VB6, however. VB6 cannot employ a true OO software solution. It does not support implementation inheritance. The lack of true polymorphism and some other deficiencies in the extendibility of the language limits its effective use in providing software applications that offer longevity, especially in regard to the extendibility of an existing solution. COM objects can be built with other languages that do support true OO capabilities, however, such as C++ and Java.

VB6 supports many of the other features found in a truly polymorphic language, but the ability to inherit another class is an important feature that it lacks. You should not confuse the inheritance that VB6 claims to possess as being true inherence. Microsoft VB6 literature describes VB6 as an object-oriented language that can inherit from another class using the implements command. However, the implements command offers only what might be construed as interface inheritance. In the practical sense, interface inheritance simply means that the VB6 IDE will reconstruct the interface of the superclass in the child class and force the programmer to support the entire interface of the superclass in the subordinate class. The programmer must still write all of the code of the inherited functions from the superclass in the child class.

VB6 in its simplicity does offer the programmer the ability to develop reliable components quickly that offer functionality that may be associated with a class instance. The classes may consume other classes, which is useful. Probably the best case scenarios for using VB6 are in a project for which the requirements gathering exercise did not identify too many objects, or for a project in which little potential exists for extending the solution in the future and for which the development cycle must be short. VB6 offers a legitimate alternative to using a truly polymorphic language such as C++, which requires an advanced programmer skill set, and a high maintenance script solution such as a VBScript ASP.




IIS 6(c) The Complete Reference
IIS 6: The Complete Reference
ISBN: 0072224959
EAN: 2147483647
Year: 2005
Pages: 193

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net