Chapter 4. Building Classes and Assemblies with VB .NET

IN THIS CHAPTER

During the last three or so years, many VB developers have spent a great percentage of their time building COM components. These components are used as the middle-tier components in n-tier systems. The benefits of building n-tier applications are well known, and include

  • Code reuse

  • Elimination of many or all distribution headaches

  • Encapsulation of business logic to control business processes and access to databases

Not surprisingly, VB .NET lets you build components, but they are no longer COM components. COM components have certain elements such as class IDs (CLSIDs), type libraries, and interface IDs (IIDs). Each class in a COM component has to support IUnknown and IDispatch.

VB .NET refers to one or more classes compiled into a file as a class library, rather than a COM component. Class libraries are compiled into an assembly, which often has a .DLL extension. You can use the classes from the class library much like you would the classes from a COM component: You instantiate the objects in the client application and then call properties and methods and respond to events. However, assemblies are not COM components; instead, they are .NET assemblies.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.164.228