forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <thors...@apache.org>
Subject Re: [Discuss] Templating language - forrest:templates and Struts Tiles
Date Mon, 22 Nov 2004 16:38:12 GMT
El lun, 22-11-2004 a las 13:58, Ross Gardler escribió:
> Thorsten Scherler wrote:
> > El lun, 22-11-2004 a las 09:56, Nicola Ken Barozzi escribió:
> 
> <snip/>
> 
> >>>This templates then can be easily overridden and adjust by designer. The
> >>>idea is that the designer can add his own implementation of the
> >>>contracts.
> >>
> >>There are two things I want to have your opinion about, and how to 
> >>insert them in the above scenario:
> >>
> >>1 - Users should be able to add nuggest without changing skin or theme.
> >>     For example, adding an extra newsfeed on the right hand side.
> > 
> > 
> > The user do not have to change the skin (see above) but have to extend
> > the default forrest:view provided by e.g. leather. 
> > 
> > This based on the need that the user (designer) wants to place the new
> > nugget on certain position. For the sake of design he may introduce a
> > new forrest:hook and the newsfeed forrest:nugget to his main view.
> > 
> > I. default view:
> > 
> > <forrest:view output-format="xhtml, fo" name="default">
> >   <forrest:hook name="intro">
> >    <forrest:nugget name="grouplogo"/>
> >   </forrest:hook>
> > </forrest:view>
> > 
> > II. a. add atomic parts to default view
> > 
> > <forrest:view output-format="xhtml, fo" name="default">
> >   <forrest:hook name="intro">
> >    <forrest:nugget name="grouplogo"/>
> >   </forrest:hook>
> >   <forrest:hook name="newsfeedHook">
> >     <forrest:nugget name="newsfeed"/>
> >   </forrest:hook>
> > </forrest:view>
> > 
> > II. b. add forrest:template and use it with <forrest:call-template/>
> > 1)
> > <forrest:template name="newsfeed" output-format="html, fo">
> > <forrest:hook name="newsfeedHook">
> >   <forrest:nugget name="newsfeed"/>
> > </forrest:hook>
> > </forrest:template>
> > 
> > 2)
> > <forrest:view output-format="xhtml, fo" name="default">
> >   <forrest:hook name="intro">
> >    <forrest:nugget name="grouplogo"/>
> >   </forrest:hook>
> >   <forrest:call-template name="newsfeed"/>
> > </forrest:view>
> 
> For IIb.
> 
> Here we can learn from Eclipse. In Eclipse all GUI items define 
> extension points. These are named positions in, for example, a menu, 
> that plugins can insert new options. By default all menus provide an 
> "additions" extension point, but they may also provide specific points 
> (e.g. "Help").
> 
> In order to add things into the Forrest GUI all one needs to do is say 
> "insert this GUI element at this extension point". Eclipse decides when 
> and how to disply that new GUI element.
> 
> I see the <forrest:call-template name="newsfeed"/> as an extension 
> point. A skin can provide a set of pre-defined extension points by 
> inserting these elements:
> 
> <forrest:view output-format="xhtml, fo" name="default">
>    <forrest:hook name="header">
>     <forrest:nugget name="grouplogo"/>
>     <forrest:nugget name="projectlogo"/>
>     <forrest:extension-ft name="additions"/>
>     <forrest:extension-ft name="navigation"/>
>    </forrest:hook>
>    <forrest:hook name="navigation">
>     <forrest:nugget name="home"/>
>     <forrest:nugget name="sectionMenu"/>
>     <forrest:extension-ft name="localMenu"/>
>     <forrest:nugget name="siteMenu"/>
>     <forrest:extension-ft name="additions"/>
>     <forrest:extension-ft name="relatedResources"/>
>    </forrest:hook>
>    <forrest:hook name="content">
>     <forrest:nugget name="body"/>
>     <forrest:extension-ft name="additions"/>
>    </forrest:hook>
>   </forrest:view>
> 
> To insert content at the navigation template of the header section we 
> simply provide a template in the project called 
> "skins/template/header/navigation.ft" and for the relatedResources in 
> the navigation section we provide 
> "skins/template/navigation/relatedResources.ft"
> 
> If the skin does not provide a suitable extension point then the site 
> developer can revert to optin I or III.
> 
> Ross

The big difference between the call-template and your extension point I
see is:

I. <forrest:extension-ft name="additions"/>
Will be provided as default by new views. -> view provider

II. <forrest:call-template name="newsfeed"/>
Can be used by the user to extend the view. -> user

IMO it is not the skin providing this. *skin* produces placeholder for
nuggets/fbits skelleton no design information. It is the view providing
the extension and graphical hooks.

Anyway, the view can provide extension like you described. I see them a
wee bit different: That leads me to the scenario of updating a view.
e.g. in 0.7 we have a certain subset of fbits and nuggets. 0.8 will
extend this set. Updating the view could be done by using your extension
mechanism. This way the user just have to download new extension.

If I see them in the way you discribed them, I think both doing similar
things I am unsure whether we should keep both. With f:t it will be
pretty easy to extend views, so I am not sure whether we should provide
dummy positions (extension points) if not for future updates.

-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


Mime
View raw message