PHP Frameworks and A Very Nice Application Flow Chart

Published in Programming and Scripts on Thursday, March 22nd, 2007

I was surfing around checking out some of the popular entries to the PHP framework world today, when I came across this excellent Application Flow Chart diagram over at CodeIgniter.

The Flow Chart

CodeIgniter looks to be an interesting framework from the people behind Expression Engine. My interest was peaked when looking through their expansive documentation and coming across the following diagram:

This is an excellent visualization of how a system could work in PHP, and it's worth reading the page its on if you are newer to PHP and toughing it out by building your own systems without a framework.

Frameworks

There are some great offerings out there these days, and having spent some time looking around it wouldn't be easy to choose one from the bunch. If you happen to be in that situation, here's a pile of posts worth checking out:

Some of the systems above do have a lot to offer, if you happen to use one of them, feel free to let me know why in the comments. I'm still having trouble convincing myself that it is worth it, being somewhat attached to the idea of a no framework-framework...

Comments and Feedback

That certainly is a nice visual, but isn't this really basically the exact same architecture that Django, Rails, and most other MVC-style frameworks use?

Tom von Schwerdtner Thu, 22nd of March, 2007

@Jeff: Mostly, but they don't have that nice visual in their docs :)

Indeed. CodeIgniter keeps on being compared to CakePHP, and the latter is a blunt attempt at a port of Rails to PHP.

Hey Jeff, for sure it is, but it goes beyond the typical MVC idea and shows the process, not simply what the M, V, and C are for.

In that sense, it's a good visual for people who would be trying to lay out their own app without going the way of a framework.

That being said, the pretty picture doesn't guarantee that the ideas will be followed...

Cool. /me goes to make a pretty visual like this for the Django docs.

Sweet, link it up when yer done :-)

Pretty Django visual:

http://flickr.com/photos/jcroft/432038560/

(Tried to make this a link, but kept getting an error when I include an anchor tag).

:)

Nicely done Jeff, a cool high up overview of the system. And thanks for the heads up on the anchor issue. I'll have to dig in and see what's up there...

Hello all, I'm on the CI dev team, and just wanted drop in a quick note.

Seeing this image again reminds me that I really need to update that image. Its pretty good, but "scripts" has been deprecated (it was really just another name for "plugins") and this image also doesn't reflect the ability to add in custom hooks or extensions, which allow you to extend the core functionality, and add "events" before normal processing (for example, to build an authentication system).

Hey Derek, thanks for stopping by and for the update. Looking forward to the updated image! As I said above, this one does convey the ideas of how the flow thru a system could work quite nicely. Congrats on building a nice framework in CodeIgniter.

That is indeed pretty nice, but what does CodeIgniter use helpers for? I've alwyas known them to be view-helpers -- little formatting functions and the like that know nothing of application logic (and thus would be in front of the application controller).

Before 37s got all jiggy with the homepage, the RoR homepage used to have a similar graphic: http://web.archive.org/web/20051217180959/www.rubyonrails.com/images/request_cycle.png (given decidedly more programmer-speaky than CodeIgniter's)

No idea on the helpers Kyle. I'm not using any PHP frameworks, just found the image browsing thru the functionality and docs to see if there was a reason to start...

You got it.

Helpers, as the name suggests, help you with tasks. Each helper file is simply a collection of functions in a particular category. There are URL Helpers, that assist in creating links, there are Form Helpers that help you create form elements, Text Helpers perform various text formatting routines, Cookie Helpers set and read cookies, File Helpers help you deal with files, etc.

http://www.codeigniter.com/user_guide/general/helpers.html

Thanks for the info Derek!

I think I need to deal with that <a> posting bug...

Check out the blog categories for older content