Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Programming IT Technology

Article Series On Hacking XPCOM Using Python 4

Uche writes "IBM developerWorks recently published my article series on how to develop XPCOM components using Python. PyXPCOM gives, say Mozilla hackers, a nice option for development, since, of course, Python is the crown prince of all languages. See part 1, part 2 and part 3."
This discussion has been archived. No new comments can be posted.

Article Series On Hacking XPCOM Using Python

Comments Filter:
  • In the orignal AD&D Monster Manual (hey, this is /. so what did u expect?) Demons could gate (summon) in other Demons. Those gated demons would recursively summon in more demons. In other words one demon (which was hard enough to kill) would quickly multiply into a vast horde of demons until hell (or the abyss) was on earth if you will.

    Well, I think this is what has happened to GUI libraries. Obviously, we expect each of the GUI/OS platforms to have their own GUI toolkit. On windows you have the win32 GUI library over which sits everything from the dreaded MFC, ATL's sparse GUI wrappers, and the easy but evil VB. Mac pre-OS X has the Mac Toolkit. *nix has X-windows, Gnome, KDE. Each of those in turns has various wrappers. Then there are the cross platform GUI's such as GTK+, Java Swing and AWT, WxWindows, TkInter, QT, OpenStep/GNUStep, and XPComp.

    Now, IANAFGuiProgrammer, so take this with a grain of salt, but how many of these things do you really need?

  • What does XPCOM has to do with GUI libraries ?

    Are you trying to tell us that there is going to be same kind of explosion in distributed computing methods ?

    Or maybe you just don't know what the XPCOM is... In that case => (Introduction to XPCOM) [ibm.com]

    From the above mentioned website...
    What's XPCOM, you ask? XPCOM, which stands for Cross Platform Component Object Model, is a framework for writing cross-platform, modular software. As an application, XPCOM uses a set of core XPCOM libraries to selectively load and manipulate XPCOM components. XPCOM components can be written in C, C++, and JavaScript, and they can be used from C, C++, and JavaScript with extensions for Perl and Python that are under development (see Resources).

    Yes, there are many model's for distributed computing, but hey this is evolution. The best (ok, the most used, not necessarily the best...) tools will survive.

  • I've done a bit of development imbedding mozilla on win32 but I've never done anything more complex, but from what I understand you could use XUL, Mozilla and XPCOM as an application development framework. I notice on the XPCOM home page [mozilla.org] a few cool things you can do with it. It does beg to be asked thought, what ELSE does it offer? I'd love to hear from people out there about the cool stuff they're doing with it. I concur with the person who posted the article, Python is the prince of languages.
  • It does beg to be asked thought, what ELSE does it offer? I'd love to hear from people out there about the cool stuff they're doing with it. I concur with the person who posted the article, Python is the prince of languages.

    XPCOM is useful because of the application framework it provides. You can export methods to javascript from XPCOM and then use mozilla's XUL layout language for the GUI.

    If you look at mozilla it's all javascript/css/xul/xml. The heavy lifting is provided by XPCOM objects which are reachable through javascript calls. You can then build your ui through javascript with all the look and feel defined in CSS.

    So I lay out a XUL app in plain text and it's cross platform because XPCOM is cross platform by default. Writing cross platform stuff in mozilla land is really easy. NSPR is crossplatform by default so as long as you use that (including it's threading library and nsReg library for a registry) cross platform development is really simple.

    Now you can use python instead of C++ develop those objects, so the barriers to entry are getting smaller.

    I personally am writing a gnutella servant XPCOM object that I can embed in mozilla. Since I can modify my chrome I'll have tabs (similiar to editPad classic, if anyone uses that) in my browser that I can switch between pages and downloads. Instant cross platform gnutella client (assuming I can get gnutella protocol working over necko) and custom built browser. Completely skinnable customizable etc.

    Don't want to use the browser? Easy to build a new chrome (that's what mozilla calls the UI elements) that only use's the gnutella XPCOM.

    In summary: The principal advantage is the ease of interface development and the cross platformness. Since you can now do XPCOM in python it's even easier to build stuff.

You knew the job was dangerous when you took it, Fred. -- Superchicken

Working...