[Qt-interest] About Plugin Architecture in QT
Manuel Fiorelli
manuel.fiorelli at gmail.com
Thu Apr 30 21:05:09 CEST 2009
2009/4/30 Andreas Pakulat <apaku at gmx.de>:
> On 30.04.09 19:26:57, Manuel Fiorelli wrote:
>> 2009/4/29 David Boddie <david.boddie at nokia.com>:
>> > Reading this, I am reminded of GCF:
>> >
>> > http://www.vcreatelogic.com/oss/gcf/index.html
>> >
>> > I don't know if it corresponds closely to what you are looking for, but
>> > you might find it interesting, anyway.
>>
>> In my opinion QPlugin is a wonderful tool for "simple tasks" such as
>> support arbitrary codec, DB drivers, etc..., but it is too low level
>> if we want to develop an extensible application like Eclipse.
>>
>> I know that Qt-Creator is based on plugins, like Eclipse, so I suppose
>> that Qt Creator uses a plugin architecture developed internally by Qt
>> Software.
>
> No, Qt Creator uses plain old Qt plugins, but of course provides some
> extra API and a hosting shell which loads the plugins. Additionally
> interfaces are provided that plugins can implement to extend the core
> functionality. Thats basically what eclipse has, except its not such a
> monster and not so overly complex.
>
>> Is there any chance that Qt will provide native support for such an
>> architecture?
>
> They already do, its called Qt Creator and is Open source also.
I will look at the source code of Qt Creator to take inspiration for
my GPLed projects. I don't like to copy &paste code, but I prefer to
rely on libraries.
>> Binary compatibility in C++ is an hard matter (even if Qt has a really
>> clean policy about it), thus the architecture should support also the
>> notion of source component, that is to say a package which may be
>> built on the host machine with the current configuration in a really
>> simple way (think about RPM and SRPM).
>
> So you want to throw some source code at the hosting application and it
> should build it on the fly? Hmm, that would force each such application
> to make sure a proper build environment is available, not sure thats
> very good.
I imagine a kind of zip file, called "mycomponent.src.bundle", which I
can build easily with a command like that
qmake -buildcomponent mycomponent.src.bundle
producing a binary bundle
mycomponent.bundle
which I can install.
> Maybe you should rather seek in the area of scripting languages like
> Python or Ruby and the related Qt bindings. Those don't need to care
> about BC as long as the API is stable and can be loaded without any
> compilation.
Scripting is cool! I was surprised when I learn that a Firefox
extension is mainly composed of JavaScript and XML.
Manuel Fiorelli
More information about the Qt-interest-old
mailing list