CMS or PHP Framework?

Morning all,

I'm struggling a little to get a grip on the roles for cms and php frameworks and am after some advice please. . .

I understand what a cms is and have used a few (most recent and most liked - Concrete5) and I understand that a PHP Framework is used for making web applications and widgets etc, but would you use a php framework to design web sites or is it just better to use it as an application development platform? I looked at code igniter and am impressed but am not sure what direction to take.

View Replies:
ScottC replied on at Permalink Reply
This totally depends on what you want/need to do.

I have package for concrete5 that mainly works to mesh concrete5->cakePHP or how rails works, where autosaving just kind of works.

For this app/package, I have borrowed a bunch of stuff from cakePHP(mainly the inflector) to singularize class names and things like that.

So basically you need to treat the CMS and being a System, and the framework as a framework(aka blueprints). With concrete5 you get a CMS and a framework, but if you dig into 3rdParty stuff you'll see where concrete5 uses a lot of Zend stuff, and a bit of codeigniter for getEnv and things like that as well....there's also ADODB_ActiveRecord but mostly used for fileversion, filesets and some ecommerce.

SO concrete5 specific code operates on top of the framework, and to me whenever you dip below SQL you are stepping into concrete5 framework stuff(though not absolutely), concrete5 does blur both so it isn't an absolute example, I'd suggest comparing rails to concrete5 to see where the differences lie(as in concrete5 has a devise-ish user thing baked in, versions and a whole lot of awesome stuff...etc).
andrew replied on at Permalink Reply
I'd say ScottC is right on the money, but I'd probably add a little bit and clarify some of it:

concrete5 is a framework insofar as it contains useful conventions and components that can make a web developer's life easier. These are typically items that can be used without any GUI component – meaning code (usually PHP, sometimes PHP and JavaScript.) This includes

- The MVC syntax for managing single pages
- The third party libraries for connecting to the database, caching data, sending mail, working with captchas/JSON, sanitizing input, working with URLs, etc...
- A set of widgets designed to make form generation easier
- concrete5 specific routines for dealing with/storing/inspecting files, working with user accounts and authentication, image handling, archiving/unarchiving zip files.
- A system for building interactive widgets (blocks) and placing them on pages.

Then, on top of those components, concrete5 is an application. It's a CMS application, that provides a web-based GUI for editing pages, placing and configuring blocks, working with users, files and pages, and interacting with a working, active website. This application can extend itself using the package system.

Does that help at all? Now, I'm not saying that concrete5's framework is abstracted or useful enough to be used without concrete5 the application (i.e. it's not as flexible or standalone as CakePHP or Code Igniter, but then it was never meant to be) but that a lot of thought was given to concrete5 as a framework in addition to the app – moreso than I believe was the case for apps like Wordpress, Joomla, etc...