123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|638|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Web Development -> PHP Frameworks

Sun, 25 Jul 2010, 14:05
JL235
There are several frameworks available for PHP; such as CakePHP and the Zend Framework. I have not used any of them and so was wondering if anyone else has, and what your experience was like. What was good, what was bad and what would you recommend?
Sun, 25 Jul 2010, 14:41
mindstorm8191
I have used PHP a lot, but I haven't used many frameworks. I have had a look at WordPress, but not enough to try to understand any of the inner code. I'm honestly not a big fan of frameworks in general; without modifying the basic code, you're limited to the framework's features, and only that. I much prefer a module or library design, where you can use the module's features, and attach any other modules you want to your program. You still have to build a framework to manage all the modules, but well-built modules should make this easier.

Unfortunately, I don't know of any existing PHP modules (and not frameworks) worth looking into.

-=-=-
Vesuvius web game
Sun, 25 Jul 2010, 16:01
Afr0
I have had a look at WordPress


What's the definition of a framework though? I think Wordpress is a pretty poor example of a framework.
Firstly because I think frameworks are supposed to contain basic functioning so that it is easier for developers to achieve specific goals (such as allowing developers to make their own IM applications by using a framework that implements the MSN Protocol). Wordpress doesn't really qualify because it is already a fully featured blog/CMS which doesn't even really seem to be very clear in it's intention (is it a blog-system, a CMS or something inbetween?).
Secondly, Wordpress is designed to be extendable, but when you're developing a plugin for Wordpress it feels more like you're trying to make Wordpress do XYZ that it doesn't already do rather than building a new application (or website, if you like) that stands (out) on its own.
You could edit/build upon the core of Wordpress to create something new of course, but if you need to go that deep you probably might as well start from scratch.

-=-=-
Afr0 Games

Project Dollhouse on Github - Please fork!
Sun, 25 Jul 2010, 16:49
Stealth
I'll hop in to this topic because I think I know what DD is wanting to know.

I've looked in to two popular frameworks for PHP: CakePHP and CodeIgniter. Both are MVC orientated and they are both excellent frameworks. CodeIgniter has an advantage of not requiring use of the command line and I think it's the better of the two. There is a great hello world tutorial on their website.

I ultimately decided that I wanted a more lightweight PHP framework after looking at how bloated these both were and decided to build my own (I love the keep-it-simple-stupid approach). I looked at the advantages of CakePHP and CodeIgniter and merge them together for the best of both worlds. This project finally hit version 1.0 last week and I'm pretty happy with it. Unfortunately, I'm still working on documenting it and therefore it's not ready for the world yet (I will post it to the showcase once it's ready). But I was successful with my goal. The script weights 12kb and database driven pages (on average) execute within a mear 0.005 seconds.

-=-=-
Quit posting and try Google.
Tue, 27 Jul 2010, 05:32
JL235
Thanks Stealth, that is the kind of info I'm after. CodeIgniter catches my eye as it looks more hands off then the others, I think I'll be trying this.
Tue, 27 Jul 2010, 06:21
LostUser
I've used CodeIgniter the most in my projects, it's very good; but bewarned it does not have Modules (ie: stand-alone grouping of project code) out of the box, it does not have an Auth layer out of the box.

I was working on a modular CMS for my former employer and it annoyed me that there wasn't a proper Auth layer (with multiple roles, etc); and that there are so many different solutions to common problems, but none backed by the company that makes CI.

What I do like about CI is that it doesn't restrict you to using Terminal (like Symphony) and you there is a lot of crossover from Legacy PHP to PHP5 so the transition is made easier. JQuery Ajax calls is a bit more of a bugger to do.

CakePHP is meant to be the Rails framework for PHP, I didn't like it; sure it was fast -- I really loved its AutoMagic stuff where it did a lot of ORM stuff for you; but what I didn't like was there is a lot of coding all over the place and it can be hard to follow what you've done.

Django (Python) looks really good. It solves my issue of modular CMS with an auth panel right out of the box; but the problem is if you don't know Python then there is a risk involved with implementing it across your whole web output.

Kohana is like CodeIgniter, but is meant to be more stripped down, but it has its own Auth Layer and Modules out of the box; but what I don't like is its documentation; its not very good or detailed -- CI has a getting started wiki like page that comes with every download, but Kohana (PHP5 strict) does not.

I have not used any of the other frameworks. I would choose CodeIgniter or CakePHP; I'm looking forward to CI 2.0 when hopefully they solve the modular and auth layer business out.

Alternatives are using CMS frameworks like MODX, Drupal, or Expression Engine; all of which have a good framework behind them, plus you get a CMS to boot.


Sun, 01 Aug 2010, 07:25
HoboBen
This is why I really don't like working with frameworks.

-=-=-
blog | work | code | more code
Sun, 01 Aug 2010, 11:57
Stealth
That's exactly my complaint Ben. So I built my MVC to be contained in one file. By default, there are no includes. Each model, view, controller, or extension you use adds one include to the list. Everything operates in an on-demand basis. It's so clever that if a page ends up not needing MySQL, it won't even connect to the database.

Thats how I was able to achieve such fast load times. Everything was built with performance in mind.

-=-=-
Quit posting and try Google.