WHY COMPONENT ARCHITECTURE?
Why component architecture is so cool
This is a little story to show how cool a CORBA component architecture
would be in practice:
Imagine if we define a component with an API for reading an image from
a file. We call the API to the component "ImageImport".
We can now implement an "ImageImport" component for each imageformat
ever invented, and add new ones as new
formats gets invented. When we want to open an image, we just use the
"ImageImport" API. It will be possible to open images in every imageformat
which can be loaded by one of the "ImageImport" components installed on
the computer. In this case we would possibly
also need an "ImageImportManager" component, since it should
automatically find the right "ImportImage" component for us. This is
similar to datatypes in AmigaOS and the datatypelib in BeOS - except
that it uses the same architecture (CORBA) as any other component in
the component system.
Now somebody writes a filebrowser component which defines the
"FileBrowse" API. This first implementation of the browser displays
all image files as a thumbnail icon of the image. It will just have
to rely on the "ImageImport" API (and "ImageImportManager"?) to read and
display the imagefiles as thumbnail icons.
Later someone writes a Paint program, and uses the "FileBrowse" API for
opening files, and as a result we get thumbnail previews of all
imagefiles we browse through. I haven't even seen any paint programs
do this today...
Let's say that a 3D program is also written which uses the "FileBrowse"
API, since this is getting state of the art...
2 months later it's REVOLUTION time! Some clever developer writes
a new thumbnail-previewer which enlarges all thumbnails that the
mouse passes over, so that you can get a clearer view of the image.
We install this component immediately, since it's extremely cool.
Now both our favorite Paint program and our favorite 3D program
suddenly uses this great new browser, becuase they only rely on the
"FileBrowse" API. Our lives are now much more cheerful.
Also - aren't you just sick of having only one
application (like PhotoShop) that imports almost all file formats,
so that you have to convert a lot of files to one of the 3
imageformats that your 3D program supports? These days are
over with component architecture!
... Need I say that we can also create a component with an "ImageExport"
API? - Imagine the consequences... One of them is that our 3D application
will be able to render in any imageformat, by just using the "ImageExport"
The kick ass feature of this little story is, that if we
want to read an image on a remote machine, CORBA can automatically try
out all "ImageImport" components on both our machine and the remote one -
CORBA doesn't care where a component is.