i'd like to introduce you to a little friend of mine...it's called fusebox..and if you develop complex sites you should have a look..

what it is:

not a language but a methodology...it was intially dev'd for coldfusion (cfm) but it's applicable to almost any web dev language...asp, php, jsp...as long as it can do dynamic includes...

i'm no experts at it (yet)...but i have dev'd several sites using it and i can tell you that once you "get" how it works it makes prog'ing for the web soooooo much easier

the basics

every file "goes thru" a single file index.cfm (or php or whatever)

you have a file called fbx_circuits which sets the layout of the site

<cfset fusebox.Circuits.home="home">
<cfset fusebox.Circuits.admin="home/admin">

then you have a file called fbx_switch which acts as the ..well..switch...

<cfcase value = "main">
<cfinclude template="dsp/dsp_navigation.cfm">
<cfinclude template="dsp/dsp_maincontent.cfm">

<cfcase value = "login">
<cfinclude template="act/act_login_processor.cfm">


then you reference your url like


which gives you whatever includes you've added to the "main" switch, in this case
dsp_navigation.cfm and dsp_maincontent.cfm

if you have a call to the admin circuit


then the circuit knows the dir path home/admin so it know to look there and then it process files in the login part of the switch.

so why is this good...

for one thing...you can work on very complex pages in small chunks...each include is a section

for instance, if you dev a new search feature which you want everywhere...instead of regen'ing code on all you pages, you just add the include to you switch box...and boom it's on every page referenced by the switch. entire site design change can be made with the upload of one file...

another part of the methodology is the use of prefixes for files types..

dsp_file - a display file, what users will see
act_file - an action file, does something, sql inserts, form processing etc..users don't see usually
qry_file - query files to pull info from the backend

this makes editing and dev so much easier..and allows for reuse of code

i had an static ecomm site with over 1500 individual html pages, i can do it all using fusebox with less than a couple hundred...and it's much easier to dev...

look into it...it's free...it's easy...once you get the concept...and it's coooool

check out fusebox.org for the source framework (cfm and php only yet...more to come i expect)..and your on your way..