Re: OLE Discussion (was Re: Opendoc)




> Oh, really?  That's commendable.  What are some of your favorite
> features?  How do you think it'll be reflected in GNOME?  Oh, and
> what's your list of OLE nasties?

First of all: OLE2 is the second attempt at Microsoft at getting their
component model right, and they succeeded pretty much.  

There are many good things on it:

     1. To deal with the file storage and caching, they have a
	structured storage manager.  We can think of it as a
	filesystem inside a file. 

	Accesing the contents of the files is done trough a COM
	interface (in our case, we will be using CORBA for this), but
	the idea is that you pass the handle to this object and you
	can then access the file contents, in corba this would look
	like this:

	interface IStorage {
		int open (in string path);
		int chdir (in string path);
		int close (void);
		int read (out string buffer);
	};

	So you pass around a handle to this object which can be
	implemented anywere (in your server, in the default shared
	library handler) and solve the problem of file IO for
	components. 

	This is just a simplification of the whole process, but
	hopefully you get the idea.
	
     2. Data transfer:  in OLE2 all of the data transfer is done
	trough the IDataSomething interface.  This interface provides
	basically the Windows Clipboard services on a per-object
	basis: You can list the existing formats, you can request
	rendering in a specific format, it can deal with the data
	ownership (to reduce memory usage), you can duplicate the
	information, destroy it, make changes etc.

	The nice thing here is: Both the cut/paste support and the
	Drag and drop support use the IDataThing interface, a drag and
	drop is just a paste command that happened with the mouse:
	the application still has full control of what it is going to
	transfer and how. 

	The default handler for data exchange provide caching of
	display information as well in those cases where it makes
	sense.  Of course, they can pull that because windows has
	this nice Metafile DC which lets you record all of the drawing
	commands for playback.

   Most problems with OLE are just dealing with the standard Microsoft
Windows way of doing things, but if you remove that, the model is very
nice.

   I want to base the GNOME object model on OLE2.  IronDoc could be
used to provide our structured storage needs.

> You can request the object by its ID, and the OS takes care of
> locating it.  With DCOM, you can even use components on another
> system across a network.  That's pretty slick!

   In GNOME we will rely on the interface repository/boa to activate
our services.  It is equivalent to this "automatic" activation you
talk about and also deals with this networked activation of services. 

> I also like the way you can externally "run" the OLE-exposed
> internals of another application, and borrow its functionality
> for your own use.  The other app doesn't even need to know you
> exist!  You just have to know how to use its OLE interfaces.

Document embedding, yes, it is pretty nice and we will have this
implemented.

Having our object model based on OLE2 will also mean that people
familiar with OLE2 on Windows will feel happy while using a sane
operating system to code this. 

Active-X is just a minimalistic version of an OLE2 component.  A COM
object that implements some different intefaces.  Also very nice.  No
matter what your Unix friends tell you: Active-X is not bad, it just
got a bad name for having microsoft think that download-and-execute a
program from the network was a smart idea (a program with full access
to your machine, that is). 

Miguel.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]