繁体中文
设为首页
加入收藏
当前位置:.Net技术首页 >> Asp.Net开发 >> Chapter 4 Building Classes and Assemblies with VB.NET

Chapter 4 Building Classes and Assemblies with VB.NET

2007-04-15 08:00:00  作者:  来源:互联网  浏览次数:0  文字大小:【】【】【
简介:Building Classes and Assemblies with VB.NET During the last three or so years, most VB developers have spent a great percentage of their time building COM compo-nents. These components are used as...

Building Classes and

Assemblies with VB.NET

During the last three or so years, most VB developers have

spent a great percentage of their time building COM compo-nents.

These components are used as the middle-tier compo-nents

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 (s), type

libraries, and interface IDs (s). Each class in a COM com-ponent

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 exten-sion.

You can use the classes from the class library much like

you would the classes from a COM component: You instanti-ate

the objects in the client application and then call proper-ties

and methods and respond to events. However, assemblies

are not COM components; instead, they are .NET assemblies.

CHAPTER 4

Building Classes and Assemblies with VB.NET

责任编辑:admin
相关文章