[TYPO3-dev] Moving the topic of the discussion a littlebit--Based of thread "Change roadmap..."

Martin Seebach martin at biplane.dk
Thu Apr 13 02:55:39 CEST 2006


On Thursday 13 April 2006 02:15, JoH wrote:
> weekStartingDay = Default
> [globalVar = GP:L = 1]
> weekStartingDay = Monday
> [globalVar = GP:L = 2]
> weekStartingDay = Another weird starting day
> [global]

This really relates to quite a few of the past posts in this thread, but this 
is the one I reply to.

When talking about the three layers, Storage, Business and Presentation, one 
often forgets that there is a "logic" after *each* - and not just business. 
There is storage logic and presentation logic as well. Storage logic is 
"don't save a string in a integer field" and "the numbers in the field 
'usergroups' are actually relations to fe_groups", and is mostly handled by 
DBMs and DBAL and so on these days.

To stick with the calendar example, is the the role of business logic to 
figure out if a given month has 28-31 days, and wether or not a given day is 
monday, easter sunday or the day that I have to go to the dentist at 12:30.

It it then the role of the presentation logic to transform that to, well, a 
presentation, be that HTML or XHTML or whatever. This logic may very well 
take into account any parameters passed to it, eg. weekStartingDay - 
something Smarty accomodates by default, and that the subparts/markers model 
needs a high level of disipline to care about. 

A cute thing about Smarty and the free style of TypoScript: You could add any 
parameter to the configuration (colorOfMondaysInEvenWeeks=green), on the fly, 
and have that instantly available in the presentation logic. Business logic 
should never even care of the color of given days.

Regarding the re-education of designers: Either you have a guy designing and 
then writing TypoScript to put menus in his design. He will love to work in 
Smarty, since it will be much more HTML and very simple programming, and much 
less TSref and optionSpilt voodoo. He can suddenly do stuff like putting a 
horizontal menu in a tablerow and figuring out what colspan= to put in the 
next row.

Otherwise, you have a guy living in PhotoShop, Illustrator and Dreamweaver, 
who never had a clue what this "HTML" is anyway, and then you have a 
TypoScript guy transforming that work into a template - and he will love 
Smarty as well - for the same reasons..

But the real demand for Smarty is not in the core, in the 'templates'. It is 
in the extensions. The more complex an extension is, the more sure you can be 
that you will have to edit class-PHP (which, by definition, is business 
logic) to modify exact presentation behaviour. And the more design-oriented 
your design guy is, all the more likely it is that he will demand that you do 
that.

Regards,
Martin




More information about the TYPO3-dev mailing list