By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,642 Members | 1,687 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,642 IT Pros & Developers. It's quick & easy.

libraries and templates

P: n/a
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
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Martman <ma********@nospam.insightbb.com> wrote:
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?


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

Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.