Reply to Re: Custom Template-Style Tags

Your name:

Reply:


Posted by steve on 06/30/05 18:17

hmmm...there are a bunch of ways to do this. your goal may better be served
through further oop abstraction such that you contain your business logic in
file/class "a" which is completely divorced of concern over html
generation...and, your html output has very little concern about your
business logic. loose-coupling.

anyway, i think tremendous work has been done to this end in the form of
"smarty". go to http://smarty.php.net/ and have a read. it's fairly easy to
use and accomplishes most of what you have described as what you'd like to
do...and gets you closer to the above described oop level of abstraction.

hth,

steve


"eddieroger" <eddieroger@gmail.com> wrote in message
news:1120104669.851912.220390@f14g2000cwb.googlegroups.com...
| Greetings to all,
|
| I am conceiving a nifty little templating engine (yeah, another one)
| for use in PHP applications. I have found that the code itself seems to
| be standard enough in the applications I do that I could potentially
| make my life a ton easier by being able to chunk code in different
| pieces, and use my own tags in a template style to call for code when
| need be. Similar to the early generations of MovableType when the code
| for HTML pages was generated through a CGI app that replaced their
| <$MT_something$> tags. I would like to do this in PHP, keeping the .php
| extension on my files and making it as non-invasive as possible. I'm
| thinking a standard include at the beginning of the pages, and my
| little snippets along the way.
|
| The problem I'm having is I don't know how to parse out for custom
| tags. I'm hesitant to just use functions everywhere since it defeats
| the purpose if I have to put <?php...?> everytime and call to a
| function, but as of right now, that's all I've got. I'm looking for
| suggestions - if you have any, I would greatly appreciate to hear them.
|
|
| Gratitude extended in advance.
|
| .eddieroger
|

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация