You are here: Re: [PHP] Re: A couple questions about templating « PHP « IT news, forums, messages
Re: [PHP] Re: A couple questions about templating

Posted by Rory Browne on 05/10/05 14:46

> This has all been done before, and in a number of ways. If you really
> *must* build your own templating class, go and thoroughly review the
> code of those that already exist: Smarty, Savant, paTemplate,
> FastTemplate, etc. Figure out how each solved the problems. Then
> determine if you can improve upon their solutions.

This has all been done before, and I'm assuming that the James knows,
and has seen that before, since he used the same common method names,
as is in many php templating systems. $class->assign has been used in
any templating system I've ever seen(although to be honest I haven't
seen that many).

I don't think the fact that it has been done before should inhibit him
from doing it again. Carrying out the process, is one of the most
educational ways, and perhaps one of the most enlightening ways to see
how a process works.

I'm not sure how many lines of code are in Savant, paTemplate, or
FastTemplate, etc, but smarty has way too many to be used as a
learning tool, and there are times, when you want raw speed, that can
only be delivered via minimal, specialist code. Smarty is also too
complicated to be used by someone without good knowledge of
templating, and one of the best ways to understand it is to write your
own IMHO.

I think this question, whilst centred around templating, offers
opportunities for topics that aren't directly related to templating,
and perhaps PHP Programming in General. One particular area of
potential interest is dynamic code generation.

>
> --
> Matthew Weier O'Phinney | WEBSITES:
> Webmaster and IT Specialist | http://www.garden.org
> National Gardening Association | http://www.kidsgardening.com
> 802-863-5251 x156 | http://nationalgardenmonth.org
> mailto:matthew@garden.org | http://vermontbotanical.org
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

 

Navigation:

[Reply to this 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

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