forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ross Gardler <>
Subject Re: Plugs in or skins ?
Date Thu, 07 Jul 2005 12:58:22 GMT
Cyriaque Dupoirieux wrote:
> Hi,
>    I'm working on a plug in of my own (the first one !) to understand 
> well the architecture.
>    Now, I am nearly able to use the standard pelt skin instead of a sub 
> skin I had created.
>    But I wander where is the frontier between skins and plugs in ?

There are three types of plugin:

input - converts an input format to our internal format (currently xdoc)
output - converts our internal format to an *unskinned* output format
internal - changes internal behaviour of Forrest (advanced users only)

As you can see a plugin should *never* affect the skinning process.

If you look at views you will find that they are currently an internal 
plugin and a related output plugin. This is one of the reasons they are 
still in the whiteboard. We will (probably) be creating a new kind of 
plugin to handle skinning, and the current internal views plugin will 
become part of core.

>    * For instance, the download example in the forrest documentation or
>      the Faqs, don't you consider they should have been developed as
>      plugs in just as ProjectInfo ?

Yes, but they are examples of extending a project without using plugins. 
That is legacy documentation from before the existence of plugins. You 
raise an interesting point - do we still need this feature? I agree that 
the download example should certainly be a plugin and if we are to keep 
the project extension mechanism we should think of a more appropriate 
use case.

>    Since everything works as I wanted with my new plug in, I start to 
> think that I don't need to create my own skin any more :
>    if I want to extend the DTD to taken into account new tags, I can
>    create an input plug in,
>    If I want to change the layout of an existing tag, I can create an
>    output plug in.
>    Am I right ?

Your first statement is correct, but your second is not. An output 
plugin creates an output format (HTML, voiceXML, text, POD etc.) it is 
not responsible for describing how the document is laid out. Of course, 
there are overlaps, for example text does not have a method of defining 
presentation separately, but HTML certainly does.

>    (Maybe views will answer my existential questions...)

Yes, they will!


View raw message