views:

6813

answers:

17

My group is going to attempt to build a new CMS from scratch, designed to serve the needs of our organization. It should be noted that none of us have any formal programming education, but we've picked up this and that from developing different websites, among others the one our community uses now. We've decided to program the new CMS in PHP, with total MVC seperation. Not wanting to re-invent all the little cogs and wheels needed for such a potentially large project as this, we've been looking into using a PHP framework, and some googling and blog-surfing landed us in a discussion: Zend vs Cake?

Anyone have any useful input here? Also, any other tips for embarking on this project would be appreciated. (Except for suggestions for existing CMSes, we know they're out there.)

EDIT: It seems I was a bit unclear. None of us are NEW to PHP - in fact, we all have fairly extensive experience from previous projects, including the current solution our community's website runs on which we built ourselves. The decision to not use an existing CMS is a very informed one, so although I appreciate all the good suggestions we really are going to do this ourselves. So. Zend vs Cake?

+3  A: 

Drupal. After all, The Best Code is No Code At All.

Aaron Maenpaa
I completely agree. Drupal is sooooo customizable and able to support just about any situation. I would look into tweaking the drupal CMS to your needs.
bryanpearson
Thanks, but as I said, we're going to do this from scratch.
gorzan
Out of the box CMS packages are a double edged sword. You must be ok with periodic security updates because, after all, someone did the auditing and code fixes for you. Without a packaged CMS, your site could be horribly insecure and you'd never know, but with symptoms localized to only your site.
spoulson
Can't compare CMS with frameworks
helloworlder
it is a cms framework
Thorpe Obazee
+1  A: 

Do not write your own until you have explored existing projects most of which are highly customizable.

This will not be the first CMS we build, only the first we build using an existing framework.
gorzan
A: 

1) If you don't know PHP don't do it, there are alot of security implications when building a CMS

2) Don't use a framework, a CMS is suprisingly simple, an experienced PHP dev (like myself) could (has) built and entire CMS in a matter of hours, with a WISIWYG for content editing.

Unkwntech
+3  A: 

An article I recently stumbled across was about this exact topic.

Their - and my - conclusions:

If you are new to MVC, require PHP 4 support, want stricter conventions, or want powerful code generation tools, CakePHP is the choice for you. CakePHP's Scaffolding, Bake, and ACL scripts provide definite advantages when the need to quickly build an application arise.

If you know MVC, need more control over application design, or want built-in support for popular Web services, the Zend Framework is choice for you. The Zend Framework provides a greater degree of flexibility in designing applications that scale effectively in high-performance environments.

Check it out --> http://2tbsp.com/node/87.

bryanpearson
Actually, I've already read that article when googling this, but thanks anyway :)
gorzan
Well if u need the zend libraries, cakephp can use them as vendors with little effort.
Alexander Morland
A: 

Kohana is another one you might want to look at. It's a more light-weight MVC framework that lets you get right down to coding, without forcing you into doing things a certain way.

I know you specifically said you didn't want suggestions of existing CMSes, but really writing your own CMS is re-inventing the wheel for the 900th time. Drupal in particular makes a very good platform to develop applications on. It has some learning curve, but once you get it, and see it as more of an application framework with a CMS pre-built, as opposed to a CMS with modules, you can build some pretty complex things in a short amount of time.

gregmac
Thanks, will look into Kohana.
gorzan
A: 

You should also CodeIgniter, as it's a simple PHP/MVC framework, though you should really look at the existing CMS systems out there (Drupal, Joomla, Wordpress, ExpressionEngine, etc.).

Bruce
A: 

If your group is not too PHP savvy, but you want a easy to use a MVC framework, give Symfony a try.

Christopher Dolan
A: 

I have recently had very good success simply bolting WordPress onto an existing site. This works especially well when you have a client that simply wants CMS capability on their existing website. You simply pick a theme that somewhat matches your existing look and feel (or your new design) and tweak it to match. For simple CMS functionality, it works beautifully, costs little to implement, and takes little time to get up and running. I've found other CMS packages to be overkill for most applications.

madcolor
+15  A: 

ZendFramework is built from scratch with PHP5's new object support in mind, meaning everything is cleanly laid out in individual files per class, Java-style. The downside is that it's all modular with very little glue - you basically pick what you need and start putting it together. This is also an upside if you want to add new functionality that the framework does not provide as there is no rigid system any plugins have to fit into.

CakePHP on the other hand has a lot more "magic" to it, meaning a lot of stuff that goes on under the hood taking care of the basic stuff. It can be annoying to advanced developers that want to know what's going on and maybe change some things, but to a beginner it's good for Getting Stuff Done(tm). As mentioned CakePHP has a lot of support in the form of plugins to help with different functionality, template setup, etc. CakePHP also comes setup so everything is glued together and you can start churning out pages.

In your case, I'd recommend CakePHP as there is still room to tinker with advanced stuff when you're up for it, while Zend might have a steeper learning curve at the start.

Another framework I have used a lot myself is CodeIgniter / KohanaPHP which is more lightweight than the other 2 but still comes with the starting glue that enables you to start work on your site out of the box. It is more open-ended but not nearly as feature-packed as the other 2 frameworks. If you chose this path, you should go for KohanaPHP, which is a pure PHP5 branch of CodeIgniter that is more actively developed.

Christian P.
An actual advanced developer would not be "annoyed" with CakePHP as it is easy to see under the hood. And also easy to modify the engine as required, only doing so when needed.
Alexander Morland
+3  A: 

My recommendation would be CakePHP. Its code generation tool "Bake" will save you weeks when building the CRUD for your CMS. Given a database table, you can be up and running with full CRUD functionality, with pagination on your list views, validation on your models and loads more, within minutes. You can extend and customise the code that bake generates too, so your CMS can be just the way you want it. To cap it off, if you need some of the features in some of the classes in the Zend framework, its stack nature allows you to pick and choose those classes and use them within CakePHP through its "vendor" feature.

neilcrookes
+5  A: 

If you really, totally, absolutely want to build a new CMS, go with the route the Mambo team has gone and develop it on top of a good framework, like Cakephp. Please, please, please, don't write everything yourselves from scratch. There's too much you won't pay attention to, and in the future, it'll come back to hunt you (security being number one I guess). The Mambo team has a lot more experience writing CMS software than you (no offense intended), so read what the say about the subject and follow their path.

On the other hand, I only have experience with the CakePHP framework, so my opinion might not be objective. But this framework has a nice community behind it, that keeps writing documentation and tutorials, so getting help or advice should be no problem. And it also comes with a lot of bundled "magic", so repetitive tasks (like CRUD generation) are automated. Finally, a lot of things are built/developed by nice, logical conventions, that you learn in a matter of days and help you everyday.

Hope this helps.

Javier Constanzo
What happened to that project?
Thorpe Obazee
They forked it. Now there's Lithium and CakePHP following different paths, but the framework continues under development.
Javier Constanzo
A: 

you might have to fiddle a lot with cakephp's code while implementing it's ACL features.

Gaurav Sharma
A: 

Wow.. you say you have great experience with PHP and comments are "if you have no experience with PHP".. hmm.. my answer is. The Zend i sbest choice for future development. after framework stand a company which developping PHP, so in Zend framework you will have always the newest techniques..

Hope you CMS wil be available for testing ;-)

A: 

Depends. Zend is more like "do it yourself" and cake is more like "here you are" :) Zend offers more space for you to extend and tweak it where cake presents you with more "prefabricated" classes :)

Tomáš Fejfar
+10  A: 

The question has been asked over a year ago, so I guess you've already made up your decision. But I will answer it in a general way in case someone else is having trouble making up their decision for their own project.

For my current project I'm also having a hard time deciding whether to go for the Zend Framework, CakePHP or Symphony.

But I think I'm going to go for the Zend Framework for these reasons:

1. Learning Objectives

I know with CakePHP you can get started quicker, but with a blackbox framework such as that I feel I'd be missing out on a lot of learning. If I used CakePHP I'd be missing out on learning about OO concepts and patterns because I just won't get the chance to apply them. And, if I were to stop my freelancing work and look for a job I want to be able to tell me employer I really understand OO programming, as it's in pretty high demand now. A common argument is to go for CakePHP if you're new to programming, but I strongly disagree. When you're new you want to understand the concepts behind all these things first, before you start using a framework that hides implementation details from you. And when things do break in a blackbox framework such as CakePHP you want to know exactly what's going on in the background so you can fix it. It's kind of like using Dreamweaver but not understanding HTML! You need to understand the architecture of CakePHP, and for that to happen you need to know the OO concepts, patterns and architecture behind it.

A bit of learning goes a long way. It might be harder in the beginning when you need to write more code by yourself, but in the long run it's a lot more enjoyable to understand what is actually going on. There is dogma that says "Don't write anything yourself that has been written before". OK, I agree mostly, but if you have much to gain from writing something yourself, it's better to do it. The things to gain may be having a more flexible framework at your disposable, and of course better understanding of what you're doing.

2. Documentation and Support

What if the Framework developers decide in a flash of brilliance that no one needs documentation for version XXX of the framework and overwrite it with a new documentation version, but you are still using that old version? I'd say you're screwed in a big way. The guys at ZF put all the doc versions at your disposal -- http://framework.zend.com/docs/api and it's something you'd just expect. I strongly believe that a framework is only as good as it's documentation.

If you're going to create a very long running project with lots of unknowns, I'd go with the Zend Framework. It's got corporate backing and official training courses. CakePHP does have a great community, but there's always more security with corporate backing. The fact that Zend is commercializing it's products (the Zend Framework is open source), does not bother me in the least, and is more or less irrelevant. I couldn't care less about ideologies on free software or whatever, I just want to get things done.

3. Flexibility

You never know what the client will ask for next (or what you yourself will need next). If he/she asks for some insane/strange feature from Mars that will break or stretch a framework beyond its capabilities, then you're going to be in trouble. The Zend Framework is well known for being very flexible - you can pick the components you want to use and it doesn't force an architectural doctrine on you. In some cases you could go for an existing CMS, but CMSs are only good for websites that fit a certain mold, beyond that they're no good.

4. Project Hand-off to Other Developers

If it ever comes to this, you want to make sure the clients have access to a large number of developers who understand the framework you have used. I don't know the numbers here so I can't honestly say whether Zend or CakePHP has a larger developer base. My guess is Zend as it has a lot more financial backing than CakePHP and the organization has the ability to officially train developers who use it. Probably it's easier to hire a Zend developer by asking for his/her certification.

5. Continual Development of the Framework

Is the framework continually developed and at what pace? Is the documentation able to keep up with the framework development? And, does the organization support older versions of the framework? What if the lead developer of a framework gets hit by a truck? What's going to happen now? Is the organization that develops the framework as brilliant managerially as they are technically? I give Zend Framework the go here.

helloworlder
A: 

Think 1 hour in the following:

Top 1 php framework, as following orders:

  1. Zend Framework (which company is the father? Smell IBM)
  2. Cakephp (which company is the father? 1 programmer)
  3. Drupal (which company is the father? 1 small team)

Top server operating systems:

  1. Aix provided by IBM
  2. Solaris provided by Oracle
  3. Other linux provided by Xyz ...
  4. Windows provided by Microsoft

Top server scripting products:

  1. PHP (where is his father of investment management etc???) (are we blind?? IBM is remaining here!! they need also a product to meet)

  2. JSP (Oracle is the father)

  3. ASP (Microsoft is the father)
Stackfan
A: 

I see that this discussion is old but I want to add another good framework. yiiframework.com It has similarities with cakephp (active record etc) and it has good features. I thing symfony is more difficult to master and zend is huge, if you need some "libraries" of zend use it (my opinion)

dimis