Connecting Tech Pros Worldwide Forums | Help | Site Map

libraries and templates

Martman
Guest
 
Posts: n/a
#1: Jul 17 '05
Can someone point me to a good resource explaining how and why to use
templates in php. I am new to php and wondering if these so called templates
are just include files or what. And I have read several things about
libraries in php but some of the applications I see are using includeonce
files. Please don't tell me these are the same as libraries. I would
consider libraries an application global resource that does not need to be
referenced on every page to be utilized. Maybe included in something like a
global.asa (from windows world) to make available to entire application.

Can someone shed some light on these subjects and/or point me to a good
resource?

Thanks
Marty



nospam@geniegate.com
Guest
 
Posts: n/a
#2: Jul 17 '05

re: libraries and templates


Martman <martman100@nospam.insightbb.com> wrote:[color=blue]
> Can someone point me to a good resource explaining how and why to use
> templates in php. I am new to php and wondering if these so called templates
> are just include files or what. And I have read several things about
> libraries in php but some of the applications I see are using includeonce
> files. Please don't tell me these are the same as libraries. I would
> consider libraries an application global resource that does not need to be
> referenced on every page to be utilized. Maybe included in something like a
> global.asa (from windows world) to make available to entire application.
>
> Can someone shed some light on these subjects and/or point me to a good
> resource?[/color]

I've never really understood why there are separate PHP template libraries
either, seems kind of like overhead since PHP itself is a template
engine of sorts.

A good reason for using "views" (or similiar) is that the application
logic is separate from the presentation logic. As far as I'm concerned, those
"views" could just as well be PHP files with some facility to get data
(from the application) into them prior to display. (this is the way I
like to do it)

Jamie

--
http://www.geniegate.com Custom web programming
User Management Solutions Perl / PHP / Java / UNIX

Closed Thread