Ever wonder if what you have designed is a good design?

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
User avatar
MrPotatoes
Forum Regular
Posts: 617
Joined: Wed May 24, 2006 6:42 am

Ever wonder if what you have designed is a good design?

Post by MrPotatoes »

i'm wondering this right now. of course it's for my own system and it's WICKED fast. as in nothing is slower than 1/1000th of a second.

well i've just about finished putting what i call PrettyURLs in there and have to convert everything int he system from regular HTTP crap to this version. (http://localhost/framework/index.php/written). well i've got to change my extensions to parse this as well.

i've created a many to one Model/Controller setup and it's really easy to use. the system actually takes the URL and parses only from certain parts on. so the root front controller (index.php) parses the first 2 parts of the URL and the extensions take the next two (possibly more) from then on. it's passed down from each.

well, with this setup everything is pretty tight and for the most part everything is where it needs to be, nothing is called when it shouldn't be called. basically it's REALLY tightly knit and changing one thing is a day's work of fixing. this is prolly what gives me my speed but then i'm losing dynamics for this. which is fine i'm not really crying about it.

but making a new extension is very much exactly the same format for each one. any deterance and you won't have a functional extension. which is fine because startup is really easy but porting could be a PITA.

i'm not going to change it but what do you guys think? is this a bad way to go or a fine way to go. i think it's great for speed and certain other aspects. but any major change (as in PrettyURLs) and it's a major project to take on...

tell me what you think :D
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

I tend to choose easy maintenance over speed any day.
User avatar
MrPotatoes
Forum Regular
Posts: 617
Joined: Wed May 24, 2006 6:42 am

Post by MrPotatoes »

it is fairly easy maintenence. it's still a framework that i'm building right now and there is alot of functionality :D
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post by alex.barylski »

MrPotatoes wrote:it is fairly easy maintenence. it's still a framework that i'm building right now and there is alot of functionality :D
So share it with us :P

Tell us, what were some obstacles you encountered and how did you fix them?

What were some design choices, and why did you choose them...

Giving a community an overview like that I bet would yield much higher opinions...

Just source code...likely won't do much...as I won't bother sifting through source, trying to figure it out...and it's not well known, so I couldn't be bothered to learn it...

But if you explain some aspects of it...and I take that into consideration in cmoparing other frameworks...I might jump ship and you'll land yourself a new developer...

Cheers :)
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

PHP will run fast. Maintenance is not easy. So I tend to develop with maintainability as a priority with speed/performance a very close second. As it relates to your question PotatoMan, whatever feels right to you is the way you should go.
Post Reply