Forum Moderators: coopster
i've been coding PHP for couple of years, nothing special (not employment related), mostly building small websites, php allowed me to speed up the repetitive coding process a bit.
then came two projects that were a bit bigger than usual - my friend recommended me a templating system. i couldnt get convinced but when those two sites were done i was a true templater :) i liked it.
then my friend told me he's gone further - added xml functionality: one xml framework file holds all pages' urls and their structure (blocks). this, connected with template system, is functioning as a main site "engine".
i modified his idea to my needs plus after reading some articles i decided to use mod_rewrite "trick" and use only one index.php file and have some small "engine" process the urls and requests. it was quite okay i should say..
schematically it could be described like so:
1. REQUEST: /some/url/ -> mod_rewrite sends this to /index.php
2. INDEX.PHP looks inside a xml file for the requested url, upon failure goes to defined error page.
3. URL IS FOUND: the page-engine reads xml file section for the blocks that exist in that page.
4. PAGE BLOCKS are processed by a template-engine. function displays it all.
(there are of course database requests, but they dont play an important role here)
...
now, at work, i'm building an intranet site. it's growing bigger and bigger, and with the idea described above it seems to me that it's not really effective.. it all seems to me like i'm trying to reinvent the wheel - when building it i thought it's going to be really flexible, now i see that i need to modify the main engine for another use..
///
i learned php by myself (as most of people :) but i didn't have a true IT-based studies - and i can say that my object-oriented thinking is not too good.. therefore my dillemas and a bit chaotic approach to this - first i think that's IT! after some time i realize that's NOT IT..
= i'd like to know how do YOU people code your sites and applications?
= do you use templating engines (i've read in many places that it's a waste of time, common quote: "php itself is a templating engine.."), what do you think of them? do you use xml suppport anyhow?
= is there a universal, flexible, fast method/system/engine that can be used for website development? (especially for different sites that reside on one host: i mean root / holds some site but /othersection/ holds completely different site, but they both use the same "engine")
...
i know.. lot's of questions but.. i'd like to hear some of your opinions..
thanks a lot for reading!
cheers!
(i didn't want to crosspost.. i tried to search such topic on the forums but with no success..)