Containers and Servers
To embed or link one object into another, you need a container and a server. The containeris the application into which the object is linked or embedded - Word in these examples.
The server is the application that made them, and that can be launched (perhaps in
place) when the object is double-clicked - Excel in these examples.
Why would you develop a container application? To save yourself work. Imagine you
have a product already developed and in the hands of your users. It does a specific task
like organize a sales team, schedule games in a league sport, or calculate life insurance
rates. Then your users tell you that they wish it had a spreadsheet capability so they
could do small calculations on-the-fly. How long will it take you to add that
functionality? Do you really have time to learn how spreadsheet programs parse the
functions that users type?
If your application is a container app, it does not take any time at all. Tell your users to
link or embed in an Excel sheet and let Excel do the work. If they don't own a copy of
Excel, they need some spreadsheet application that can be an ActiveX server. You get to
piggyback on the effort of other developers.
It's not just spreadsheets, either. What if users want a scratch pad, a place to scribble a
few notes? Let them embed a Word document. (What about bitmaps and other
illustrations? Microsoft Paint, or a more powerful graphics package if they have one,
and it can act as an ActiveX server.) You don't have to concern yourself with adding
functionality like this to your programs because you can just make your application a
container and your users can embed whatever they want without any more work on
your part.
Why would you develop a server application, then? Look back over the reasons for
writing a container application. A lot of users are going to contact developers asking
for a feature to be added, and be told they can have that feature immediately - they
just need an application that does spreadsheets, text, pictures, or whatever, and can act
as an ActiveX server. If your application is an ActiveX server, people will buy it so that
they can add its functionality to their container apps.
Together, container and server apps enable users to build the documents they want.
They represent a move toward building-block software and a document-centered
approach to work. If you want your application to carry the Windows 95 logo, it must be
a server, a container, or both. But there is much more to ActiveX than linking and
embedding.
No comments:
Post a Comment