Page 1 of 1
PHP Frameworks
Posted: Tue Apr 24, 2007 10:45 am
by evilmonkey
[I'm not sure where to post this, feel free to move it at your discretion]
I started looking at PHP Frameworks for rapid development (I got a little tired of reinventing the wheel for every project I do). I have so far looked at
Cake,
Trax,
Zend, and
Symfony. So far, symfony looks to be the best. However, all frameworks suffer from one fatal flaw: garbage documentation. (Aside from Zend...but I don't like it for some reason) Despite the fact that Symfony has its own book and some pretty good tutorials, it still lacks a class and function reference. It gives great examples on how to use some of the features, but the rest are doomed to obscurity. As a prominent example, (in symfony documentation), there are numerous references to the pagination class (which is pretty darn important), but no explanation of how to actually use it! If I have to reverse-engineer this from looking at the backend code, this saves me next to no time in development.
To me, these frameworks need php-style documentation. Every class and every function documented with usage guidelines, examples, and warnings; same way the language itself is documented. Does anyone have any further comments, or perhaps suggestions as to what I should use? Keep in mind: I know PHP, but I know nothing about these frameworks. Thanks.

Re: PHP Frameworks
Posted: Tue Apr 24, 2007 12:41 pm
by Ree
evilmonkey wrote:So far, symfony looks to be the best.
I happen to have the same opinion at this point. I have started a project with symfony and so far I am pretty happy with it.
evilmonkey wrote:As a prominent example, (in symfony documentation), there are numerous references to the pagination class (which is pretty darn important), but no explanation of how to actually use it!
Don't just read the book. Read ALL the tutorials you can find
here. Btw, you can find an example of using the pager class
here.
evilmonkey wrote:Does anyone have any further comments, or perhaps suggestions as to what I should use?
I'm finding symfony a decent framework to use. It has most things you could want: integrated ORM (currently Propel), a very nice 'cascade' configuration model, native support of internationalization (may not be essential for you, but for many it's a must), great routing system, handy logging capabilities, multiple and easily configurable environments, built-in unit testing framework, AJAX integration (scriptaculous, prototype), configuration based form validation, reusable view (template) fragments and components, caching (multiple levels), admin generator (looks quite impressive) and many other small things and helpers to make your life easier. Add a couple of handy plugins available and you've got a pretty attractive package.
The one thing with symfony is that it's not too fast, but it's acceptable, IMO. Propel is probably the main culprit here. There are plans to replace Propel with Doctrine (which is faster and uses PDO) in the further versions of symfony. There's even an already existing plugin available that does just that, but I haven't had the chance to test it simply because I don't have a need to and chances are I won't.
Posted: Tue Apr 24, 2007 1:35 pm
by shiznatix
I myself don't like to rely on a third party framework that I don't know every single bit of. I went out and wrote my own framework and have been constantly building on it. I like it best when I have complete control over everything and know how everything is working together. I suggest you do the same thing or just switch to my awesome framework of doom.
Posted: Tue Apr 24, 2007 1:38 pm
by Chris Corbyn
I'm using symfony right now and am very happy with it.
Posted: Tue Apr 24, 2007 1:41 pm
by evilmonkey
Ree and d11, thank you for the feedback. Shiznatix, unfortunately writing my own framework is unfeasable at this point (partly because I'm interested in RAD, partly becasue its reinventing the wheel).

Posted: Tue Apr 24, 2007 8:04 pm
by alvinphp
The problem I have found with many frameworks is that they change every year or so. What might save you a lot of time now will be a headache later on when that framework loses popularity and someone has to work on your code or vice versa.
Posted: Tue Apr 24, 2007 8:29 pm
by John Cartwright
My personal favorite is the Zend Framework at the moment, although I would not consider using it for commercial development at least until it has a stable API (version 1.0). It definetly has some maturing to do before I full out throw away other frameworks on my radar.
And I agree, Symphony is a pretty decent framework, and is the runner up in my books, followed with Cake.
Posted: Tue Apr 24, 2007 10:35 pm
by alex.barylski
My personal favourite is my own SWIFT framework - an extremely simplified version (and better) of Zend.
If I had to choose I would go with Zend, simply because the docs and people backing it. Although it's sorely lacking good documentation as well and has it's problems which I have given in the past and had others coff at - so I'll keep the rest to myself and my own benefit.
p.s- SWIFT=Spectra Web Interface Framework and Technology
As in, it's my company, PCSpectra's internal framework used for my projects and clients. Not open source. BTW: I had the name before d11 and have unoffical trademark papers to prove it, I also have a domain which was registered before his, as proof of purchase.
Actually there is another company with a similar name - whom I've been contacted by in the past, so neither of us are out of the woods, but nothing happened yet so I guess were cool.
Cheers

Posted: Wed Apr 25, 2007 5:14 am
by Jenk
You'll have trouble trademarking SWIFT.. given it's already in use by the transnational finance company.

Posted: Wed Apr 25, 2007 9:56 am
by alex.barylski
Jenk wrote:You'll have trouble trademarking SWIFT.. given it's already in use by the transnational finance company.

I've looked into it. If memory serves me correct, because we are in different market segments, according to Canadian trademark law, I believe it is acceptable. Dont' quote me on it.
I do believe they offer an API called SWIFT, I'm not sure it's quite like my own. In anycase, that was more of a joke, just so people wouldn't bark at me for copying d11 - when I'm the egg in this case.
I have no plans on officially trademarking the idea unless I become extremely successful.

Framework mental
Posted: Fri Apr 27, 2007 2:46 pm
by inghamn
Seems everybody and their uncle (myself included) has gone framework mental. I believe if you know what you're looking for in a framework, you can probably write your own and avoid all the baggage from the existing frameworks. They all try to be everything to all projects and suffer a bit from the complexity that entails.
If I had to choose from the existing ones, though, it'd most likley be Zend's. It's not production quality yet, but getting there. And you can more easily pick and choose what you use from it without having it force you down a certain route.
As for, me, I've been using my homebrew one here. :) Just to handle the few things that I got tired of dealing with over and over. But for that matter, I've also got Zend's on my hardrive, and am using the Zend_Search_Lucene, so I'm using bits and pieces anyway. --So what do I know?