The XPCOM Plan
Posted on November 19th, 2005 in Uncategorized | Comments
I can’t stop thinking and working on this XPCOM stuff. It’s getting pretty amazing. I’m learning some very core things to COM and various C++ compilers as well so I’m moving all the work I’ve been doing into a new library now called Mono.Interop to handle C++, COM, and XPCOM. I’m trying to make it possible to both early bind and late bind to XPCOM and soon COM. Late binding is very easy, but early binding is going take some time and its much more complicated in terms of trying to maintain some cross platform ability (and sometimes cross C++ compiler safety). Nothing looks impossible or unobtainable and in some cases, it looks like we can do some stuff that no body else can do in other langauges do (like Java and C++), when interoping with XPCOM and right into C++ for that matter.
I’ve got a 11 page document so far of how it works and the design architecture I’m plaining and using for accessing, invoking, reflecting, and exposing to XPCOM. I’m leaving room for COM at the same time so everything can dual purpose someday (even though for the moment, I personally have no interest into accessing COM since .NET does it right now and COM isn’t cross platform). There is a lot of work to be done to make it work for some aspects. Some parts are easier then others like early binding versus late binding and invoking into C++ (since all of XPCOM and most of Mozilla’s use of it is written in C++).
Its a massive undertaking. Not really in the total ammount of code but in the complicated nature of the code and the maintiance of it. From hosting Mono in a wrapper to expose objects back into XPCOM (which XPCOM has some emerging ideas for a new technique of mixing GC systems that I need to look at soon), to a semi-dynamic pinvoking library generated with Reflection.Emit to access xpcom components directly for early binding (which has to be done this way to handle the different name managlings of the various C++ compilers to keep it from being compiler specific). Some other issues that have to be worked on are handling versioning issues of XPCOM components, reflection into XPCOM to build wrapper assemblies (like tlbexp.exe in MS.NET), and a few other massive issues that I can even explain here without writting a full page document on the topic.
Anyways, after I get done researching and get my total vision down on paper of what I want it to do in the end someday, I’m going to get together a basic set of goals that need to be meet and at least some short term goals. I’ll commit my prototypes and post the design/architecture documents when I’m done. After that, I’ll get some feedback and get to work on making it real!! ![]()