Friday, June 6, 2008

Embedding Mozilla -- Post 0 - Prologue

I was recently pulled in to help with a project involving mozilla in an application. Though I know a bit of mozilla code-base I was not much aware of the embedding steps. I along with others involved in the project did break our heads heavily on this embedding thing which frustrated me a lot. Hence I decided to read up any damn article on MDC or wikimo related to embedding and learn how to get a browser in a custom app. In such a journey documentation is the most important thing and hence these series of blog posts. I hope these posts will help someone trying to embed mozilla or at the least help me sometime in the future as reference. So here we go.

First let me start with some links to documents which you better read up before venturing into mozilla world.


1. The whole of Mozilla is based on the technology called XPCOM which stands for Cross (X) Platform Common Object Model, which is pretty much similar to Microsoft COM. If you know COM you can draw similarities. You *must* know this. If not then these are the places to go:
  • http://www.mozilla.org/projects/xpcom/ -- This is a page of links. The more you read, the better. (Obviously).
  • http://www.mozilla.org/catalog/architecture/xpcom/ -- This has lesser links and makes more sense to read first. Some essentials are presented here. The IBM Developer works articles are good and are almost like hands on manual.
  • http://www.mozilla.org/projects/xpcom/book/cxc/ -- This is linked from the above pages, but I am putting it here as it is quite important to read this one. The PDF can be handy.
Now you know what XPCOM is and how you should handle it. In the course you will also have come across certain mozilla tools. For instance the "mxr" - Mozilla Cross Reference (derived from Linix Cross Reference lxr). The whole of the mozilla code base is available on the web and you can search through it, make specific search like search for identifiers, macros, files or even free text. There are several such things and you will get to know them as you get on with the mozilla community. Be sure to visit irc.mozilla.org -> and the channels are #embedding #xulrunner and #developers. (For information on IRC look here, For a index of XPCOM/Mozilla terms look here.)