phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Phpgroupware-developers] the new templating system


From: Ralf Becker
Subject: Re: [Phpgroupware-developers] the new templating system
Date: Tue, 24 Sep 2002 13:03:57 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020529

Ceb suggested now a temporal split / branch (for the notes app and others) to enable more developer to compare the two concepts. I support that idear, but dont think it is possible to support to branches on a long run.

i created the branch 'eTemplate'. At the moment only for notes, other apps may follow.

I would like to invite everyone to compare the code of the etemplates port of notes and the xslt-port. Have a look how elegant and simple the new nextmatch-widget make scrollable lists. At the moment u need to tag notes at a date of 2002-09-20 to get the etemplate version.

With the branch you can use the following commands:

- to checkout the eTemplates-branch of notes (if you havnt checked out notes already):
cvs co -r eTemplates notes

- to switch from HEAD / xslt to eTemplates (notes already checked out):
cvs update -Pd -r eTemplate

- to switch from eTemplates to HEAD / xslt (notes already checked out):
cvs update -Pd -r HEAD

Happy testing

Ralf

PS: you may want to switch on the timer in your header.inc.php:
        
Line 86: define('DEBUG_TIMER', True);

You can select if you prefer to use eTemplates in the db (this allows to have several versions of a template) over using xul-files. The setting in header.inc.php is only a preference, the eTemplate class checks the other storage if it does not find the requested template in the prefered storage. The default (not adding the following line to header) is using the db first, to use the files first add:

Line ~100: $GLOBALS['phpgw_info']['server']['eTemplate-source'] = 'files'; // eTemplate-versions can't be used with 'files'



Ralf


ceb

On Sun, 22 Sep 2002, Dan Kuykendall wrote:


Im not yet sure how its all going to work out best. I just want to find
the best solution for phpgw.

My goals, and I think this match up with ceb, are:

1) To abstract more of the UI from each app
2) More consistancy between apps
3) an easier method for apps to get data from other apps and be able to
display that data. So appB could request data from appA as well as the
UI definition for displaying that data.

4) to have very nice looking html so that the interface can be very
attractive

5) needs to perform abot as well or better than the current solution. At
worst the tradeoff will be a very sligh performance loss (we can pick up
that loss by fixing other areas of phpGW.
6) needs to be at least partially xml based and in a way that would more
easily allow for generating other interfaces such as XUL, GTK or
WinForms, etc...

After spending what seems like way too much time on all this, we have
learned a great deal. Heres a run down.

ceb ported the notes app to etemplates. ralf helped and had to add new
stuff to etemplates to support this, such as adding in some new
nextmatches support. notes works in etemplates, but ceb is not entirely
happy with the performance or with the resulting html. ralf has a few
new fixes for the performance, but the html result is still need to be
worked on.

ceb is now trying out my xmltool and xsltemplate class on notes. She has
just started but is very happy with the resulting html and performance.


The problem with xsl is that each app would end up needing to support
other interfaces on their own. For example, if we wanted a gtk or xul
interface, each app would need to have a template set for generating
those interfaces. With etemplates we just need to do this in the api by
having a conversion of the widgets and all apps will automaticly be
presented in those interfaces. I think this would be a great great feature.

So right now XSL has the clear advantage in producing attractive html,
and etemplates has the advantage of interface independance. Both help
solve 1, 2 and 3 in my above list. XSL does 4 and 5 but not much for 6.
etemplates does 6 great, is weak in 4 and so far with 5 but ralf says
his fixes will help on 5.

So seeing that etemplates is weak were xsl is strong and xsl is weak
where etemplates is strong, we are going to look at a marrage of the
two. This would mean that apps would just define their basic interface
in xml (XML Layout Doc, XLD for short), this XLD is very XUL like.
etemplates would load this up, do the calls to the bo class that is
specified in the xml layout doc. It will generate the xml result, load
up the xslt templates which are needed and let the XSLT template class
take over. In XSL we will have a version of every needed widget which
will be used to generate the html.
So we will have various template sets, which will actually be XSL files.



to generate the html interface we wouldnt need the xml files but could use
the xslttemplates class directly.



We will also want to figure out how to have a special way for app
developers to customize their html. So that they will still define the
interface in the XLD, but will also be able to have direct control of
the overall layout of the app when its presented in HTML. I am still
trying to figure out how best to solve this and still make sure they are
using etemplates, so that their app can run via gtk, xul and so on.



the best way to have the needed flexibility is to have the layout
description in xsl files.



We always look forward to feedback, but also keep in mind that we have
been looking at this for a long time and may get grouchy if the comments
are overly critical :-)

But seriously, fresh input is very helpful when you have been looking at
something for too long and could be missing some easy and obvious (to
anyone but you) solution.

Seek3r

p.s. ceb and ralf deserve tremendous thanks for their work on this. In
the end everyone will greatly benefit from their efforts.

address@hidden wrote:

the index function of notes is now ported to work with class
xslttemplates. the class uses xslt to create the html output. it is the
other method, next to etemplates, we are testing right now.
did someone look the etemplates version? any comments?

grtx. Bettina [ceb]

[have a lot of funk]



_______________________________________________
Phpgroupware-developers mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/phpgroupware-developers




_______________________________________________
Phpgroupware-developers mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/phpgroupware-developers





_______________________________________________
Phpgroupware-developers mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/phpgroupware-developers





--
Ralf Becker
digital ROCK                                 Telefon: +49 (631) 31657-51
Leibnizstr. 17                               Telefax: +49 (631) 31657-52
D-67663 Kaiserslautern                       Internet:www.digitalROCK.de





reply via email to

[Prev in Thread] Current Thread [Next in Thread]