
Next
|
When you specify or buy a component you will need to know
 |
If it is: Source Code, Static library, Dynamic library, Framework or a service. |
 |
How to call it: API (Application Procedural Interface), C++ classes, COM, CORBA, ActiveX, OLE Automation |
 |
How to pay the license. At design time and/or at run time. |
Object Oriented Components
Today there is basically two ideas supporting object oriented software components.<BR>They will be implemented in various way as listed above. Dynamic library and inter process calls being the favorites. The nice thing is that you will not have to mind about it. It is still a important information to know because of portability, maintenance, licensing and performance aspects.
Callback
Usually one think of a component as something to use and to call. In some cases components need to execute something on your application. some methods are common:
 |
Callback. The component request you to provide some procedures. Prototype of theses procedures are strictly defined. Depending of the system you can provide them as pointer to procedures, specially named functions or linked list in global area. A common example is the system itself. It is required that a program supplies a main() procedure. |
 |
Subclassing: The component define a class or an interface with some virtual methods. You are requested to implement theses methods in a subclass and you supply objects of this subclass to the system. A good example of this is the MFC Microsoft Foundation Classes. Another good example is the handling of attributes. You maintain objects called attributes attached to the component. The component will call them all on various occasions. |
 |
Messaging. The framework expect some kind of message loop to be pooled by your application. |
 |
Event and connection points. This last technique is employed in the COM model. A component publish a well known interface. If you implement this interface in an object of your application and connect this object to the component you will receive the events from this object. |
Callbacks are in some ways related to associativity a well known concern of all CAD applications today. In a Graphical User Interface we would call it Interactivity.
COM Components
Common Object Model. Proposed by Microsoft is the underlying model of all OLE2 architecture: Object Linking and Embedding, OLE Automation, Object Control Extension, ActiveX, Drag and Drop etc.. Read our survey of COM.
| Licensing |
Can be both |
| Portability |
Win32 |
| Performance |
if in the same process space there is no indirection for the call. Link delay at load time is low because there is nothing to do. |
| Maintenance |
Easy but must be controlled on the end user computer. You have to be careful at the destination, specially for ActiveX because they are shared by multiple applications. |
CORBA Components
CORBA. Common Object Request Broker Architecture. Proposed by the OMG . For more information on the CORBA model and tools available, look at the site of Iona.
Non objects components
Scripting Components
This specific category cover all components which are used with their own scripting language.
| Licensing |
Not predictable |
| Portability |
Depends on availability |
| Performance |
High if the script is compiled, low otherwise |
| Maintenance |
easy |
Source code
This is really the most basic way to share software. You get it, adapt it to your environment, compile it and finally use it. Poor maintenance. If the language is portable like C you will gain a high portability. The drawback is that you will a poor integration with the environment and low level interface ( persistence, graphic, etc.;)
| Licensing |
Usually at design time: You buy the source code |
| Portability |
Depends in the language and the use of OS calls: Graphic, Files, GUI |
| Performance |
As you desire |
| Maintenance |
Difficult unless you keep the source as delivered. |
Library or Object modules
code based on a separate documentation. No check is made that the documentation is relative to the exact object module you use. Another disadvantage is that this particular release is statically bind in your code. . You bind it within your code and call any feature from your code.
| Licensing |
Usually at design time: You buy the library |
| Portability |
Depends on the availability |
| Performance |
High. Same process space. |
| Maintenance |
Difficult |
Dynamic library
The bind will be made at run time. The way it is achieved is proper to each operating system and may lead to some incompatibilities. The image in memory and on disk of dynamic library (dll) may be shared by all the software using it. This is the best of the non object components.
A very specific case of dynamic library for Visual Basic is called VBX. Theses libraries are more self described than a normal dynamic library. It opens the way to self documented components. It has be replaced by Microsoft by the OCX.
| Licensing |
Can be both |
| Portability |
Depends on the availability |
| Performance |
Same process space, but indirection for the calls and some delay at load time/ |
| Maintenance |
Easy but must be controlled on the end user computer. You have to be careful at the destination. |
Service. Inter Process Calls
Service. Inter Process Calls there are at least two programs one calling the other. This solution need some support from the operating system like: socket, shared memory, rpc, DDE, etc.. Usually this solution will be wrapped in a light library hiding the communication process. The applications don't share the same memory space and they might even be on different computers. A major benefit is that the CADCAM system will stay far from the application giving the author a feeling of security and stability.
| Licensing |
Service may be shared by many applications. Normally the service should be sold by run time. |
| Portability |
Depends on the availability |
| Performance |
Different process space implies some overhead for each function call |
| Maintenance |
Easy but must be controlled on the end user computer. You have to be careful at the destination. |
Framework
In this case the component is a complete program where you can add extensions. Instead of using a component your are used by it. Usually the framework will be a large executable like a CAD system and your application will be called from place to place: Opening of files, redraw, and you will be able to add menus in the main menu bar, toolbars and entries in the contextual popup menu. The framework also deliver functionality's like all components.
| Licensing |
Definitely at run time. Some companies still ask for a high price to get the documentation of the entry points but is is a little backward. |
| Portability |
Depends on the availability |
| Performance |
Same process space. Usually some indirection for calls. |
| Maintenance |
Keep exactly in phase with the supplier of the framework. This is a major drawback of this solution: Same compiler, OS release, etc.. |
Components (in Software)
Note this Icon : means that the link you will follow is
external to this site.
|
 |
|
|