Types of Components

Components can be designed for use in different areas within our programs. In general, there are three different types of components in an application:

Standard/General Components

I like to think of general components as the sort of thing you can buy out of just about any programmer's catalog. In fact, there are many components that are generally available from Windows itself or that come with Visual Basic. These are components that provide services so broadly useful that you can use them just about anywhere. Some good examples include DAO, RDO, graphing controls, grid controls and mathematical library components.

For the most part, we're better off purchasing general components rather than rolling our own. Most companies that sell components make their living off the sales, so the components are likely to be of pretty decent quality. Furthermore, just about any popular type of component will be developed by multiple vendors, so competition will tend to get us better quality and more features as well.

Of course, with Visual Basic 5.0, we can easily create components that are quite general in nature. If we can't find a component that fits our needs then we can just create our own. Better still, if we find a component that's close to what we need, we can use it inside a new Visual Basic component and just build on what it provides.

Application-Specific Components

Each application is unique, and provides some specific functionality. We can put all of those components that belong entirely to an application into the application-specific component category.

Perhaps our program needs to do some specific graphical display, or some complex calculations. These might be built as components - even though they aren't useful to any other applications.

Clearly, since we're not likely to find this type of component on the commercial market, we'll be writing our own. I'll touch on this concept here and there throughout the rest of the book, but the majority of these components will be controls to customize our interface - so they really aren't going to contain business objects.

Industry-Specific Components

These are components that are targeted at a specific industry, or perhaps a specific area of a business. As we'll discuss later in the chapter, there are a number of efforts underway to develop vertical market components, and those efforts are almost always industry-specific.

Vertical components are rather rarer in the commercial area. Still, if we look around we can find more and more components that fit into this area. Many standalone products are beginning to expose public object interfaces, so we can write our programs to use parts of the product as a component. Products such as accounting systems, or shop floor control systems, can be used as components if they're designed to provide a public interface.

On the other hand, we may find that there simply aren't components for our particular industry to suit our needs. In that case, we'll have to develop our own components for use in our applications.

Business objects really come into play here. By using business objects to build a model of the actual 'objects' used in our industry, we can create very powerful components. It is primarily this type of component that we'll be focusing on throughout the remainder of the book.

© 1997 by Wrox Press. All rights reserved.