Template vs Skins was Re: [Typo3-dev] Indexedsearch 2.0

Marc Schlienger smarc at gmx.net
Tue Feb 17 00:18:21 CET 2004


Hello!

I don't especially want to start a new thread here, but I had some thoughts
that I'd like to share with you.

I'm a guy that comes from a more Desktop oriented environment. So I'm used
to "Look and Feel" stuff (Windows, Motif, Mac OS, etc.) - with Winamp being
one of the first of making this notion abstract on a platform basis. Then you
got Java. Before, many guys made various APIs (MFC) or Libs (Gtk). Well, very
rough stated here, for more info, you could look at
http://cognitivevent.com/gui.html.

I went rapidly through the article, thanks Ingmar, interesting. So now,
let's make a comparison (please note I'm not outlining the "peripheric"
differences like, among others, the synchronous/asynchronous aspect of the final
application; I'm just speaking conceptual GUI here):

- the GUI for Typo3 as a Web App is HTML
- the GUI for a Desktop app is OS dependent, or say Platform dependent.

In both cases, you can either code directly into the "GUI language" - that
is HTML for web or say Windows API - or use an abstraction: templating for web
or GUI lib or language feature like in Java. But in the end, templating or
API, it's quite the same, isn't it?

You could:
- change the template to suit some corporate design
- create your own skins for the desktop app

Maybe one difference could be that templating is more lightweight for making
various rapid changes, it's so easy to change this in HTML (wysiwyg).

So, where do I want to go? Actually I'm thinking about the presentation in
Kitzbühel, I think it was Christian Brühl. Please correct me if I'm wrong. He
spoke about this PHP GUI Framework for the web. I really liked his idea. It
goes towards Java Server Faces. And for complex apps, this is a great thing.
[Christian, if you're reading this, tell me once you put your Framework online
;-)]

With this kind of GUI Framework, you even get closer to the "desktop idea",
which shows you that for rich GUIs (do not mix it with Rich-Clients, a
Rich-GUI can be handled by a thin-Client) you need to have an abstraction that
handles controls like: entry fields, lists, drop down boxes, trees, menus, and
more. Why this? because you do not want to struggle with the same problems each
time you want to display your data. I find it important to code against
controls, it gives you this needed abstraction for large scale development, frees
you from the HTML syntax, but also allows you to change the look of the app.
You basically have three needs for a GUI abstraction:
1- the developper doesn't want to think about logic and presentation at the
same time
2- the designer who wants to merge her ideas with the corporate design
guidelines
3- the platform where you run your application might change (this point
could be merged into 1, since it would be the job of the developper to make the
app work on other systems)

So if we take all abstraction or data transformation levels from the source
to the GUI, we could write the following ordering (non exhaustive)

DATA STORE (persisted)
STRUCTURED DATA (loaded)
BUSINESS (manipulated)
CONTROLS (presented)
SKINS (custom-presented)
FINAL GUI (user's senses)

Well, my laptop battery is almost empty, and the text's long enough, you
might get bored. So I'll leave these thoughts for now. 

And the final question to leave you thinking about: does this level of
granularity make sense for a Web Application like Typo3?

...it depends...

Cheers,

Marc

> Kasper Skårhøj wrote:
> >>Besides, it's just *much* cleaner if the HTML isn't weaved into the PHP 
> >>code. After all, I guess that's why the Typo3-core provides template 
> >>handlers... ;)
> > 
> > 
> > No, weaving HTML into PHP and using CSS for styling it is beautiful and
> very easy to setup quickly. Often I wish that I didn't implement stuff
like
> the message board, guestbook and shop with HTML templates - it simply
> takes too long to customize those each time and most often I just want to
go
> with the default structure and change the styling with CSS.
> > 
> > Templating is not a goddess to worship for any cost: it should be a
> method we should use when it helps us. Sometimes it just doesn't and the
best
> way is to hardcode the HTML. Indexed-search is most likely one of these
> cases.
> > But of course we can vote for it...
> 
> Yes, I agree.
> 
> See also: http://www.massassi.com/php/articles/template_engines/
> In the article they describe a nice PHP-only way of templating that kind 
> of stresses Kasper's point.
> 
> cheers,
> Ingmar
> _______________________________________________
> Typo3-dev mailing list
> Typo3-dev at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev
> 

-- 
GMX ProMail (250 MB Mailbox, 50 FreeSMS, Virenschutz, 2,99 EUR/Monat...)
jetzt 3 Monate GRATIS + 3x DER SPIEGEL +++ http://www.gmx.net/derspiegel +++






More information about the TYPO3-dev mailing list