Re: Re: Question about template systems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2009-03-04 at 10:55 -0600, Shawn McKenzie wrote:
> Robert Cummings wrote:
> > On Tue, 2009-03-03 at 21:18 -0600, Shawn McKenzie wrote:
> >> Matthew Croud wrote:
> >>> Hello,
> >>>
> >>> First post here, I'm in the process of learning PHP , I'm digesting a
> >>> few books as we speak.
> >>> I'm working on a content heavy website that provides a lot of
> >>> information, a template system would be great and so i've been looking
> >>> at ways to create dynamic data with a static navigation system.
> >>>
> >>> So far, using the require_once(); function seems to fit the bill in
> >>> order to bring in the same header html file on each page.
> >>> I've also looked at Smartys template system.
> >>>
> >>> I wondered how you folk would go about creating a template system ?
> >>>
> >>> My second question might be me jumping the gun here, I haven't come
> >>> across this part in my book but i'll ask about it anyway.  I often see
> >>> websites that have a dynamic body and static header, and their web
> >>> addresses end like this: "index.php?id=445" where 445 i presume is some my 
> >>> file reference.
> >>> What is this called ?  It seems like the system i'm after but it doesn't
> >>> appear in my book,  If anyone could let me know what this page id
> >>> subject is called i can do some research on the subject.
> >>>
> >>> Thanks for any help you can provide :)
> >>>
> >>> Matt.
> >>>  
> >> I have written a popular theme/template system for some CMS systems.  In
> >> my opinion, templating is only needed for those that are totally
> >> ignorant of the concept of programming languages in general.
> > 
> > I'm not sure... but I'm pretty sur eyou just called me ignorant. Blanket
> > statements like that one above are themselves ignorant.
> > 
> > Cheers,
> > Rob.
> 
> Well then you're ignorant because I didn't call you ignorant!  Didn't
> you write your own template system?
> 
> Seriously though, I should have worded that differently.  I guess the
> second paragraph was more what I was after.  But to clarify the first
> paragraph, I would suspect if they are anything like me, many of those
> that know and use PHP prefer to do control type things in PHP (loops,
> ifs, includes, etc.).  I know I do.  I like templating in that I use a
> template (HTML file) and add echos, or use simple templating logic so
> that {somevar} echoes $somevar, but why replicate what PHP can do with a
> separate language?

To punt what is repeated over and over during runtime to a single
compilation phase when building the template target. To simplify the use
of parameters so that they can be used in arbitrary order with default
values. To allow for the encapsulation of complex content in tag format
that benefits from building at compile time and from being encapsulated
in custom tags that integrate well with the rest of the HTML body. To
remove the necessaity of constantly moving in and out of PHP tags. To
speed up a site. To speed up development. To make easier to use for
non-developers. To integrate standards compliance checks into the build
phase. To do sooooooooooooooo many things that are just inconvenient and
tedious using intermingled PHP code with fixed parameters order (or
alternatively a big fugly array).

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux