Page 2 of 2

Posted: Mon Jun 26, 2006 3:10 am
by Maugrim_The_Reaper
I'm afraid you lost me after mentioning you were not a fan of OOP...;).

Frameworks are going to make little sense until you grasp OOP fundamentals and see the results of developing with best practice OOP for yourself.

Re: What framework do you prefer?

Posted: Mon Jun 26, 2006 12:55 pm
by AKA Panama Jack
The Ninja Space Goat wrote:With all the talk about frameworks going on in PHP Theory and Design, I thought I'd start a poll just to see how many people use a framework and if so, which one.

EDIT: I meant to add an "other" but oh well post your other if you don't use any of the above.
For me a PHP Framework is like using Frontpage to create a website. :P It adds a whole hell of a lot of overhead for very little benefit. You can write much smaller, faster code without a framework. (shudders)

Re: What framework do you prefer?

Posted: Mon Jun 26, 2006 12:56 pm
by Luke
AKA Panama Jack wrote:
The Ninja Space Goat wrote:With all the talk about frameworks going on in PHP Theory and Design, I thought I'd start a poll just to see how many people use a framework and if so, which one.

EDIT: I meant to add an "other" but oh well post your other if you don't use any of the above.
For me a PHP Framework is like using Frontpage to create a website. :p It adds a whole hell of a lot of overhead for very little benefit. You can write much smaller, faster code without a framework. (shudders)
After about 3 days of working with cake, I have come to the same conclusion... I'm now building my own (with a lot borrowed from arborint)

Posted: Mon Jun 26, 2006 4:13 pm
by Maugrim_The_Reaper
You can write much smaller, faster code without a framework. (shudders)
Totally true, but performance measures are unimportant for many people. For those of us on the "eek the last drop" a framework is an invitation to scupper the boat and drown the crew...:). For myself I can't abide developing without some form of framework though. I've done it before and it just turns into a bloated mess most of the time. Usually I'll roll something up quickly which is minimalist and keeps things halfway comprehensible...

Posted: Mon Jun 26, 2006 9:54 pm
by Luke
I am building my framework now... and I am sort of jotting down classes I may need. Any suggestions? I've got:
HTTP:
Request
Response
Upload
Download

Input:
Alpha
Numerical
Date
Email
Length
Range

Sessions

Namespace

Database

Posted: Tue Jun 27, 2006 1:18 am
by pedrotuga
I dont really get what ppl mean when one says "i use my own framework"

What is really a 'personal framework'?

would it be ok if somebody show off all the code so i see what is that wole "make your own framework" thing?


About the usage of frameworks... well, i am not a professional ph developer... i belive that somebody who is asked for 2 sites a week will defenatly try to use a framework, even if the final product gets a bit unpersonal.

Posted: Tue Jun 27, 2006 1:22 am
by Luke
Well I don't really know the definition of "Framework", but basically what I am talking about is a set of commonly used classes & functions that together make it quick and easy to build an application. Take a look at the second post on this page:

viewtopic.php?t=50372

Arborint posted his architecture/framework and it helped me immensely.

Posted: Tue Jun 27, 2006 4:14 am
by Maugrim_The_Reaper
You'll need to expand some categories since they require (or should) multiple classes within themselves...

I'm going through a refactor of a small framework I started up last Autumn. The classes I utilise (to date):

Response
Request
ServiceLocator
Settings (INI, XML, SimpleArray, VariableList)
DataSpace (ViewData, SessionData)
Controller_Front
Controller_RequestMapper
Controller_Dispatcher
Controller_Action
InputFilter (todo
View
ViewTemplate_Adaptor (SmartyAdaptor, TemplateLiteAdaptor)
DataObject
DataAccess
DatabaseAbstractionAbstractFactory (see The Factory and Abstract Factory Patterns in PHP)

That's the bare minimum I expect. I'm aiming for a very light weight framework which can very easily be extended and adapted in the future. The design (started refactoring 2-3 weeks ago part time) is test driven.

In writing this framework, both the original hackish version and the updated "clean" version I found that discussing each class was a powerful tool unto itself. Also I mangled aborint's FrontController code a few times...;).

Posted: Wed Jun 28, 2006 3:40 am
by Ambush Commander
Regarding the definition of framework, I have to disagree. While a toolkit defines a set of useful classes (code reuse), a framework defines the overarching design of the application. That is, it makes all the architectural decisions for you, so you can get down to solving the specific problem domain.

In this manner, when you code plugins for existing applications like phpBB, MediaWiki, etc., they act like frameworks.

Of course, this is only a mere technicality.