Call for plugin Developers

September 17, 2009 53 Comments by Richard

Call for help

Update: See what is happening with FireBreath a year later

I hereby issue a “Call for Plugin Developers” to the readers of the site. I know we are as of yet few, but I hope that some of you may be willing to help me.

I am quickly realizing that I need a plugin project from which I can quote source code; one that does the things that I am attempting to explain, and one that is not made up of code that is owned by a specific company or project.

Thus, I introduce to you all: FireBreath.

FireBreath

FireBreath is intended to be a cross platform browser plugin.  Currently, I plant to license this under the new BSD license.  This way, it can be used for commercial projects.  The targetted browsers are:

On windows:

  • Microsoft Internet Explorer
  • Mozilla Firefox (3 and up; we may add support for 2.x as well)
  • Google Chrome
  • Opera
  • Apple Safari

On mac:

  • Mozilla Firefox (see above note on versions)
  • Google Chrome (when it is released)
  • Apple Safari (3.x and up, intel only for now)

On linux:

  • Anything that supports NPAPI plugins and Gecko SDK 1.9 or above (no firefox 2 for now)

What needs to be done

This is an ambitious project; I can help with development, and I can coordinate tasks.  I don’t have time to do it all myself, however, unless a company sponsers me; there is one that has shown interest so far, but nothing is certain.  Even if that happens, and a company wants this project enough to pay me to develop it, it will be far more successful if there are other contributors — you see, I don’t know everything.

In particular, I could really use a “strong right hand” who would be willing to head up the linux-specific part of the development, which despite 10+ years of linux experience is still my weakest point.  If there are others who wish to take ownership of other parts, that would also be great; for now, I will retain the final say on what goes in, because, well, I can.

If you look, you’ll find that there is no code up on the repository as of yet (at least, as of the time of this writing.)  I just started an ActiveX control this evening with the intent to implement FBControl, the ActiveX control portion of FireBreath.  As soon as I have a rough skeleton ActiveX control project done (which will happen sooner if I get a lot of developers wanting to help), I will start on the NPAPI portion of the DLL.  Even before I have that done, there are several small, relatively simple tasks that I could use help with.  In particular, I will not be using any code directly from the mozilla source tree and the plugin samples, so I need someone to write from scratch the NPN_ wrappers for all of the browser functions.

How you can help

For this project to succeed, we need all the help we can get.  If you would like to help, please send me an email at [email protected] and introduce yourself.  Tell me:

  • Who you are
  • What you consider your strengths in this area are
  • What interests you most about this project
  • How you want to use FireBreath yourself (if at all)
  • How much time you may be able to put in

I’ll take nearly anyone right now, though I will be carefully monitoring the code submissions to start out with; my project goals are:

  • Reusable and modular
  • Cross-platform (both in the browser sense and the operating system sense)
  • Cleanly written
  • Free and useful

I by no means want to be a dictator on this; I welcome help and suggestions from everyone.

Thanks!

48 Comments

  1. Charles Dietrich
    8 years ago

    You are apparently unaware of Nixysa: http://code.google.com/p/nixysa/

    “Nixysa is a framework written in Python to automatically generate glue code for NPAPI plugins (plugins for browsers such as Google Chrome or Firefox), letting you easily expose C++ classes to Javascript from a simple IDL representation.

    Nixysa was originally conceived for the needs of O3D, but is flexible enough to support a wide range of use cases. “

    Nota bene: Python is just used for C++ code generation; Nixysa is not a way to make Python plugins.

    (I know it's hard to find via Google.) Nixysa will cover everything except IE. For that there are other tools to wrap NPAPI. Google around.

  2. taxilian
    8 years ago

    Thank you for the link; I had not seen nixysa yet, and I will certainly be looking at it. However, from a quick glance I don't think it will solve the problem that I'm looking to solve.

    I'm not just looking for a quick and dirty plugin; I want a portable, reusable framework where I can create dynamic (not just a static IDL) interfaces once that will work on all browsers. I want the ability to have multiple scriptable objects, access them using either array (plugin.obj[3]) or object (plugin.obj.thirdItem) notation, and not have any need to define the interface once for ActiveX, once for firefox. Also, ideally the plugin would be a wrapper, which would link to user-provided static libraries; thus, you could implement a standalone application simply by implementing a few small interfaces and use all of the same code for everything else.

    This is possible; I have done it. I just don't own that code =]

    99% of the NPAPI code can be very easily made generic, and thus I don't see any reason to use code generation to implement it; I'd prefer to implement it once and have it work everywhere.

    That said, I will be looking at nixysa; there might be a way to use nyxysa to make FireBreath easier/faster to write.

  3. Charles Dietrich
    8 years ago

    You are apparently unaware of Nixysa: http://code.google.com/p/nixysa/

    “Nixysa is a framework written in Python to automatically generate glue code for NPAPI plugins (plugins for browsers such as Google Chrome or Firefox), letting you easily expose C++ classes to Javascript from a simple IDL representation.

    Nixysa was originally conceived for the needs of O3D, but is flexible enough to support a wide range of use cases. “

    Nota bene: Python is just used for C++ code generation; Nixysa is not a way to make Python plugins.

    Few people know about Nixysa and it's hard to find via googling NPAPI, but it's great.

    Nixysa will cover everything except IE. For that there are other tools to wrap NPAPI. Google around.

  4. taxilian
    8 years ago

    Thank you for the link; I had not seen nixysa yet, and I will certainly be looking at it. However, from a quick glance I don't think it will solve the problem that I'm looking to solve.

    I'm not just looking for a quick and dirty plugin; I want a portable, reusable framework where I can create dynamic (not just a static IDL) interfaces once that will work on all browsers. I want the ability to have multiple scriptable objects, access them using either array (plugin.obj[3]) or object (plugin.obj.thirdItem) notation, and not have any need to define the interface once for ActiveX, once for firefox. Also, ideally the plugin would be a wrapper, which would link to user-provided static libraries; thus, you could implement a standalone application simply by implementing a few small interfaces and use all of the same code for everything else.

    This is possible; I have done it. I just don't own that code =]

    99% of the NPAPI code can be very easily made generic, and thus I don't see any reason to use code generation to implement it; I'd prefer to implement it once and have it work everywhere.

    That said, I will be looking at nixysa; there might be a way to use nyxysa to make FireBreath easier/faster to write.

  5. Charles Dietrich
    8 years ago

    BTW I am just a user of Nixysa, not a developer of it. So I don't necessarily have any more knowlege of it than you do (probably less, since my C++ programming skills are pretty basic).

    By dynamic IDL do you mean that you could create a function obj.foo() at runtime? In your javascript code, you can certainly do plugin.obj.bar() and plugin.obj.baz(3). But I don't know if you can do plugin.obj.x (i.e. you may need getters and setters). Btw you can also do plugin.obj.callback1 = function() {…}. For me this is enough, I don't need a dynamic IDL or direct property access.

    Nixysa does not do ActiveX. However O3D (a browser 3D engine which uses Nixysa) does do ActiveX so I'm planning to use that as a guide (haven't gotten to it yet).

    That said, if FireBreath becomes reality in I'll be anxious to look at it. Good luck!

  6. taxilian
    8 years ago

    Oh, no worries. I really appreciate you posting the link to nixysa; it looks like a great project. Perhaps when FireBreath is a little further along we'll see if we can do some work with nixysa, since I think some of what they have could be used to produce firebreath code as well. We'll cross that bridge when we come to it, if they are interested =]

    Dynamic IDL means that you don't neccesarily know the names of the methods and properties at compile time. At first blush, this doesn't seem that useful, but imagine that you are writing a JSON parser (yeah, I know, there are already enough that you wouldn't bother, but it's an example).

    You load the JSON: {“var1”: “value”, “var2”: 23.5}

    when I compiled my system, I didn't know what those variables were named, or what the data types are; but, now I can access them like so:

    plugin.JSON[0].var1 == “value”
    plugin.JSON[0].var2 == 23.5

    I suppose there are probably reasons you might someday want to be able to have dynamic function names, and indeed in the framework I developed for Move Networks you can, but I don't think we've ever actually used that ability =]

  7. Charles Dietrich
    8 years ago

    BTW I am just a user of Nixysa, not a developer of it. So I don't necessarily have any more knowlege of it than you do (probably less, since my C++ programming skills are pretty basic).

    By dynamic IDL do you mean that you could create a function obj.foo() at runtime? In your javascript code, you can certainly do plugin.obj.bar() and plugin.obj.baz(3). But I don't know if you can do plugin.obj.x (i.e. you may need getters and setters). Btw you can also do plugin.obj.callback1 = function() {…}. For me this is enough, I don't need a dynamic IDL or direct property access.

    Nixysa does not do ActiveX. However O3D (a browser 3D engine which uses Nixysa) does do ActiveX so I'm planning to use that as a guide (haven't gotten to it yet).

    That said, if FireBreath becomes reality in I'll be anxious to look at it. Good luck!

  8. taxilian
    8 years ago

    Oh, no worries. I really appreciate you posting the link to nixysa; it looks like a great project. Perhaps when FireBreath is a little further along we'll see if we can do some work with nixysa, since I think some of what they have could be used to produce firebreath code as well. We'll cross that bridge when we come to it, if they are interested =]

    Dynamic IDL means that you don't neccesarily know the names of the methods and properties at compile time. At first blush, this doesn't seem that useful, but imagine that you are writing a JSON parser (yeah, I know, there are already enough that you wouldn't bother, but it's an example).

    You load the JSON: {“var1”: “value”, “var2”: 23.5}

    when I compiled my system, I didn't know what those variables were named, or what the data types are; but, now I can access them like so:

    plugin.JSON[0].var1 == “value”
    plugin.JSON[0].var2 == 23.5

    I suppose there are probably reasons you might someday want to be able to have dynamic function names, and indeed in the framework I developed for Move Networks you can, but I don't think we've ever actually used that ability =]

  9. adriaandh
    8 years ago

    This is a great idea – I just went through the head-ache of writing my first NPAPI plugin. I was very surprised how little good documentation/examples there are available.
    I won't have time right now, but in a month or so I will try and contribute.

  10. adriaandh
    8 years ago

    This is a great idea – I just went through the head-ache of writing my first NPAPI plugin. I was very surprised how little good documentation/examples there are available.
    I won't have time right now, but in a month or so I will try and contribute.

  11. Guybrush
    8 years ago

    I know this too basic as a question but what development enviroment is needed to create such a cross-browser plugin ?

  12. Guybrush
    8 years ago

    I know this too basic as a question but what development enviroment is needed to create such a cross-browser plugin ?

  13. taxilian
    8 years ago

    There are no “too basic” questions. The whole point is to provide a platform on which people may learn.

    Currently, most development is ocurring on Windows (the platform I am most familiar with). I am using Visual Studio 2008. If anyone wants to implement the ActiveX stuff without using ATL, we could build the windows version with pretty much any valid windows compiler.

    On Mac, I plan to use XCode, and on Linux, gcc/make. I will probably set up a project with eclipse or kdevelop or something else, but gcc/make are all that will be required. If you are interested in helping, there is plenty to do on any platform.

  14. taxilian
    8 years ago

    There are no “too basic” questions. The whole point is to provide a platform on which people may learn.

    Currently, most development is ocurring on Windows (the platform I am most familiar with). I am using Visual Studio 2008. If anyone wants to implement the ActiveX stuff without using ATL, we could build the windows version with pretty much any valid windows compiler.

    On Mac, I plan to use XCode, and on Linux, gcc/make. I will probably set up a project with eclipse or kdevelop or something else, but gcc/make are all that will be required. If you are interested in helping, there is plenty to do on any platform.

  15. Georg
    8 years ago

    I love the idea of a NPAPI framework, but i probably won't have time to join in on it.

    For ActiveX: I don't think it makes much sense to go without ATL – if you want to avoid mistakes you'd probably end up repeating ATL functionality like CComPtr<T> and CComQIPtr<T>.

  16. Georg
    8 years ago

    I love the idea of a NPAPI framework, but i probably won't have time to join in on it.

    For ActiveX: I don't think it makes much sense to go without ATL – if you want to avoid mistakes you'd probably end up repeating ATL functionality like CComPtr<T> and CComQIPtr<T>.

  17. waleri
    8 years ago

    Using of ATL would require professional version of Visual Studio while without it express version can be used

  18. waleri
    8 years ago

    Using of ATL would require professional version of Visual Studio while without it express version can be used

  19. Georg
    8 years ago

    Ok, didn't know that.

  20. taxilian
    8 years ago

    Another advantage is that without ATL, we know exactly what is going on. ATL isn't really bad, but there is a lot going on that isn't neccesarily clear at first glance. I'm already overriding the idispatch interfaces entirely to unify them between npapi and activex, but there is a lot more that could benefit from a simpler, lighter weight interface than ATL allows.

    Unfortunately, my familiarity with COM is limited to making controls to act as browser plugins, and so there is a lot that I still don't understand. :-/

  21. Georg
    8 years ago

    Ok, didn't know that.

  22. taxilian
    8 years ago

    Another advantage is that without ATL, we know exactly what is going on. ATL isn't really bad, but there is a lot going on that isn't neccesarily clear at first glance. I'm already overriding the idispatch interfaces entirely to unify them between npapi and activex, but there is a lot more that could benefit from a simpler, lighter weight interface than ATL allows.

    Unfortunately, my familiarity with COM is limited to making controls to act as browser plugins, and so there is a lot that I still don't understand. :-/

  23. Guybrush
    8 years ago

    I would help if I could, but I only just managed to setup my plug-in development environment for the first time, so I don't know how much of help I can be as yet. If you think I can do something that helps tell me. I need to develop a plug-in for IE, Firefox, Chrome and maybe Opera so I need to learn how to do so for sure. If I can create a cross-browser possibly cross-platform plug-in would be better.

    Also I wanted to ask are there any books or some web-sites which are the holy grail in this area ? Maybe shed some light on the architecture of how plug-ins operate in relation to web browsers ?

  24. Guybrush
    8 years ago

    I would help if I could, but I only just managed to setup my plug-in development environment for the first time, so I don't know how much of help I can be as yet. If you think I can do something that helps tell me. I need to develop a plug-in for IE, Firefox, Chrome and maybe Opera so I need to learn how to do so for sure. If I can create a cross-browser possibly cross-platform plug-in would be better.

    Also I wanted to ask are there any books or some web-sites which are the holy grail in this area ? Maybe shed some light on the architecture of how plug-ins operate in relation to web browsers ?

  25. dannavarez
    8 years ago

    Pls. can u help me. I want to know how to add a simple function in plugin like for example a function the has a param int and will just return its value like:
    int retval(int i)
    {
    return i;
    }

    i want to know how this retval function in plugin can be called in javascript. I would really appreciate help.

  26. black spider
    8 years ago

    Pls. can u help me. I want to know how to add a simple function in plugin like for example a function the has a param int and will just return its value like:
    int retval(int i)
    {
    return i;
    }

    i want to know how this retval function in plugin can be called in javascript. I would really appreciate help.

  27. alexvir
    8 years ago

    Hi!
    I have developed working XPCOM plugin.
    Cause I plan to support Google Chrome – I need to write my plugin using NPAPI.
    So in Chrome there is no problem to use NPAPI plugin from script.
    Now the question: how can I use NPAPI plugin from JS overlay script of Firefox Extension?

  28. alexvir
    8 years ago

    Hi!
    I have developed working XPCOM plugin.
    Cause I plan to support Google Chrome – I need to write my plugin using NPAPI.
    So in Chrome there is no problem to use NPAPI plugin from script.
    Now the question: how can I use NPAPI plugin from JS overlay script of Firefox Extension?

  29. taxilian
    8 years ago

    Well, you bring up several points. The first is this: Never, never, and I repeat *never* use XPCOM for scripting anymore. It had its day… that day was several years ago. The newly released Firefox 3.6 (newly released as of this post) doesn't support XPCOM plugins either. Fix that =]

    Second, I don't know if it's possible to use a NPAPI plugin from inside a firefox extensions, because I have never had an occasion to write an extension; I deal primarily with plugins and cross-browser tools. Extensions are very browser specific, and thus outside of my area of expertise =]

    Thirdly, consider using FireBreath for your plugin; it's actually quite easy to use, and now supports windows, linux, and mac; the linux and mac support are experimental, but I'd be happy to work with you to get them stable enough for what you need. They are very close.

  30. taxilian
    8 years ago

    Well, you bring up several points. The first is this: Never, never, and I repeat *never* use XPCOM for scripting anymore. It had its day… that day was several years ago. The newly released Firefox 3.6 (newly released as of this post) doesn't support XPCOM plugins either. Fix that =]

    Second, I don't know if it's possible to use a NPAPI plugin from inside a firefox extensions, because I have never had an occasion to write an extension; I deal primarily with plugins and cross-browser tools. Extensions are very browser specific, and thus outside of my area of expertise =]

    Thirdly, consider using FireBreath for your plugin; it's actually quite easy to use, and now supports windows, linux, and mac; the linux and mac support are experimental, but I'd be happy to work with you to get them stable enough for what you need. They are very close.

  31. alexvir
    8 years ago

    You are wrong. Firefox 3.6 supports XPCOM and my extension are working correctly with it, also like Thunderbird 3.
    FireBreath is great tool, but I don't need linux, mac etc. support.
    But thanks for reply, I will search for answer…

  32. alexvir
    8 years ago

    You are wrong. Firefox 3.6 supports XPCOM and my extension are working correctly with it, also like Thunderbird 3.
    FireBreath is great tool, but I don't need linux, mac etc. support.
    But thanks for reply, I will search for answer…

  33. taxilian
    8 years ago

    Say rather that there is still some support for XPCOM — but only in extensions. You cannot use XPCOM for the scripting interface on a plugin; this I know for a fact =]

    It is good to know that there is still XPCOM support in extensions, though. Thanks for that info. Unfortunately, I don't know much about extensions; good luck!

  34. taxilian
    8 years ago

    Say rather that there is still some support for XPCOM — but only in extensions. You cannot use XPCOM for the scripting interface on a plugin; this I know for a fact =]

    It is good to know that there is still XPCOM support in extensions, though. Thanks for that info. Unfortunately, I don't know much about extensions; good luck!

  35. Sanjeet Kumar
    8 years ago

    hey richard!
    you have done a great job….seriously there are not much article on the internet about this so great work..

    i 've a client who uses a web application to open, create a modify word document located on a remote 2003 server…..they were using ActiveXObject feature to start a local word processor(MS Word) to create/modify a remote file on the server.
    the problem began when they bought some Suse linux Desktop which uses firefox as the browser instead of Internet Explorer…now they need to use same application in such a manner that end user don't find any difference.

    i am a newbie in plugin development…infact started with this project only…i might sound dumb with my question but as i said there very little or no help elsewhere…i've already created a demo plugin using 'firebreath' which can respond to javascript….now how can i modify it to do the activeXObject things(or simply, starting a word processor(Open Office Write) to create/modify a remote file on 2003 server).

    i've a very basic knowledge of c/c++(gcc/make) and javascript/dhtml…..if still i can be of any help i would be very happy and am willing to contribute 15 to 20 hours a week….my email is [email protected]….thanks.

  36. Sanjeet Kumar
    8 years ago

    hey richard!
    you have done a great job….seriously there are not much article on the internet about this so great work..

    i 've a client who uses a web application to open, create a modify word document located on a remote 2003 server…..they were using ActiveXObject feature to start a local word processor(MS Word) to create/modify a remote file on the server.
    the problem began when they bought some Suse linux Desktop which uses firefox as the browser instead of Internet Explorer…now they need to use same application in such a manner that end user don't find any difference.

    i am a newbie in plugin development…infact started with this project only…i might sound dumb with my question but as i said there very little or no help elsewhere…i've already created a demo plugin using 'firebreath' which can respond to javascript….now how can i modify it to do the activeXObject things(or simply, starting a word processor(Open Office Write) to create/modify a remote file on 2003 server).

    i've a very basic knowledge of c/c++(gcc/make) and javascript/dhtml…..if still i can be of any help i would be very happy and am willing to contribute 15 to 20 hours a week….my email is [email protected]….thanks.

  37. Sanjeet Kumar
    8 years ago

    i think i am getting it now….i need to create a method similar to ActiveXObject's shellExecute for my NPAPI object…

  38. Sanjeet Kumar
    8 years ago

    i think i am getting it now….i need to create a method similar to ActiveXObject's shellExecute for my NPAPI object…

  39. Sanjeet Kumar
    8 years ago

    with reference to firebreath tool for generation of plugin…..what are the set of methods like object.echo,object.valid,object.version….or when can we find them…is there something equivalent to ActiveXObject's shellExecute already there…..also where in the newly created plugin can we add our methods..
    thanks.

  40. Sanjeet Kumar
    8 years ago

    with reference to firebreath tool for generation of plugin…..what are the set of methods like object.echo,object.valid,object.version….or when can we find them…is there something equivalent to ActiveXObject's shellExecute already there…..also where in the newly created plugin can we add our methods..
    thanks.

    edited:
    just found that the place for new and existing methods are …./projects/{my-plugin}/{my-plugin}API.cpp…..trying to understand how to make a new such method.

  41. taxilian
    8 years ago

    It's good to see so much interest! However, I highly recommend you pose these questions to the firebreath-dev mailing list, which is a more appropriate forum for in-depth explanation and discussion of how to use FireBreath.

    There is a link to it from the main FireBreath page, or just use this link: http://groups.google.com/group/firebreath-dev

    it requires my approval to join, but I usually do that pretty promptly (within a few hours during the day, at most a day).

  42. taxilian
    8 years ago

    It's good to see so much interest! However, I highly recommend you pose these questions to the firebreath-dev mailing list, which is a more appropriate forum for in-depth explanation and discussion of how to use FireBreath.

    There is a link to it from the main FireBreath page, or just use this link: http://groups.google.com/group/firebreath-dev

    it requires my approval to join, but I usually do that pretty promptly (within a few hours during the day, at most a day).

  43. Sanjeet Kumar
    8 years ago

    thank you richard for the response….i 've posted it on the discussion board.

  44. Sanjeet Kumar
    8 years ago

    thank you richard for the response….i 've posted it on the discussion board.

  45. Sridhar Ramasami
    8 years ago

    I would like to help out with the linux part.

  46. Bird Hsieh
    8 years ago

    Hi Richard,

    Do you consider about the installation part for cross platform or cross browsers in the same platform?
    My new job is also to development a simple Plugins to cross platform but it needs a simple install via one button click from remote install (such as *.xpi).
    But I found if we install the Plugins via *.xpi in windows, the DLL can be used/got in FireFox. The Chrome or Safari cannot be aware it .

    Do you have any idea about this?
    Bird

  47. prasanth
    8 years ago

    I am writing an NPAPI plugin on MAC OS. This plugin actually downloads a file and prints the document that is downloaded. On MAC OS, brwser calls NPP_StreamAsFile to give me the file and after that NPP_DestroyStream. After that, it calls NPP_URLNotify and on completion of this, it goes on continuously calling NPP_HandleEvent.

    I think because of that, when I click on Download button on my web page continuously, my application crashes.

    Any expertise opinion/help on this would be really helpful.
    I tried but not go further on this.

    You can reach me on [email protected]


    Thanks
    Prasanth

  48. taxilian
    8 years ago

    Sorry I didn't get to this sooner; somehow your comment slipped below my radar. .xpi files are not really plugin installers, though they can be used as such; I personally strongly dislike them for installing plugins, for exactly the reason you mention. it only works on firefox. The better way to do it is to use an EXE or (better) MSI installer, which can install for all browsers. Unfortunately, this will not be one-click, but it will work on IE, Firefox, Chrome, and Safari — at least if you're using FireBreath to build your plugin. FireBreath includes a MSI installer that can be extended to do whatever you need. It might also be possible to use an MSI with Microsoft's clickonce tech that installs with .net, but I don't know if that works post-firefox 3.6 or not.

    Good luck

2 Trackbacks

  1. […] if you haven’t already, please read up on FireBreath, the open source cross-platform plugin framework, and consider […]

  2. By Colonel Panic » Firebreath ready for testing on December 10, 2009 at 12:24 am

    […] things.  If you’re reading this, you likely have already read my previous post, “Call for plugin Developers.”  If you haven’t, you might want to glance over it so that you know what I’m […]

Post a Comment

Your email is never published or shared. Required fields are marked *