Women in Technology

Hear us Roar

  The Dynamic Duo of PEAR::DB and Smarty
Subject:   This is not separating logic from presentation
Date:   2003-04-22 22:22:07
From:   anonymous2
When you still have logic expressions in the HTML, this is not separating logic from presentation.

If you ask most HTML designers that do not understand your HTML templates because they still have programming logic in them.

This is a thing that usually developers that work alone have like the article author do not understand because they are used to do both the programming and the presentation design.

Main Topics Oldest First

Showing messages 1 through 2 of 2.

  • This is not separating logic from presentation
    2003-04-23 19:59:26  jcpm [View]

    As I said in the article, presentation logic is very different from business logic. I see nothing wrong with allowing the designer or programmer to separate the logic in which a row gets a different color, for instance.

    From personal experience, having presentation logic in the PHP code eventually gets confusing and messy. Why should I have to loop through blocks as it is done in PHPLIB just to set a placeholder to have the color #CCCCCC or #999999.

    But most of all, this is personal opinion. Templating systems should be chosen by what you feel comfortable using, and some people may prefer Smarty and some people may prefer PHPLIB or some other system.

    Joao Prado Maia
  • This is not separating logic from presentation
    2003-04-23 10:09:22  anonymous2 [View]

    There is more than one type of logic. The idea behind templates is to remove business logic from your presentation. Not to remove presentation logic from your presentation. There is a bunch of logic that has every right to be in the templates - such as alternating table row colors, theme selection, special messages, etc. This has nothing to do with the business logic or data access. Try this: