|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Esthetics, centralized module or not
This is for a wamp system... I guess (win 2k, apache, mysql, php) but it has very little to do with the operating system.
I'm writing my own webpage content management system (although I'd prefer to call it a html parser because that's what it really is >.<). Here's the situation: I have a main.inc.php that does all the work. Everything from getting username, ip address, login and log offs, and generating the webpage from templates and what-naught. A page just needs to have 3 variables in it and include the main.inc.php for it to generate a webpage. The system is designed to allow users to have their own sections, let alone blogs and what-naught (i.e http://mywebsite.net/sleepingkirby/index.php, http://mywebsite.net/swordkirby/index.php, etc.). Here's the question: Is it esthetically better to make the blog software for each user included in the main.inc.php or in their respective directories. Just looking fo rsome advice on that. |
|
#2
|
|||
|
|||
|
RE: Esthetics, centralized module or not
lksfjslkjdfs
stupid captcha didn't like what i typed and made me have to hit the back button and i lost everything i just typed... anyways.... .... uhm, oh yeah, basically i do it this way: i have my index.php just check the URI for a section. the sections are stored in my mysql db, along with sub sections and modules etc etc etc (lots of borign stuff) anyways, if a section is found, i simply just include that section and run that code. (basically it's the factory design pattern) since you don't need the blog stuff to run main.inc.php you don tneed to include it every time you run it. but you should only include it when that section is called up. so if you have an index page for that section that *does* need the blog stuff, along with several other items, you just make a factory for that section's sub page, and that sub page will do all the work. and you make another sub page that will handle other things in that section... ... that help a little? |
|
#3
|
||||
|
||||
|
RE: Esthetics, centralized module or not
No that's actually really good... O.O I'll do that. It'll probably increase run time too.
|
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Programming Theory > Esthetics, centralized module or not |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|
|