views:

277

answers:

6

I want to create an platform for a local old-timer club, which has:

  • built in forum (not so over sized like phpbb & others. lightweight and highly integrated.)
  • member profile with 20 fields
  • members can create a garage
  • members add car pictures to their garages
  • others can vote and comment the pictures
  • members can message each other

and some more, but you get the point. A truly dynamic platform. Sure that's a waste of time, but it's for a friend.

I want to do very strong MVC, DRY, object oriented and clean coding.

I only know that there is a framework called "Cake PHP". Is that really the best option? Which others do you know, and which ones would you suggest here?

+1  A: 

I doubt Cake is the best choice here. I like CodeIgniter, but in your case something like BitWeaver might be more suitable.

codeguru
+3  A: 

I would suggest using the Zend Framework, as it allows you the freedom to use whichever bits of it you're interested in, and leave out the bits you don't want. It's not heavily convention-based, and as such does not require so much 'hacking' from time to time to get simple things done.

The web site looks a bit overly-corporate mish-mash, but it's really down-to-earth and fun. Check out the quickstart tutorial:

http://framework.zend.com/docs/quickstart

I would also suggest checking out Codeigniter, all the cool kids are talking about it, though I've never used it myself.

karim79
+1  A: 

I find that if you stick to CakePHP standards, especially for the Database naming scheme, it is very helpful for making a working prototype. Not to mention, the community is huge.

Essentially, once you get your database set up, use the console to "Bake" your project. I run "cake bake all" to get a working prototype. Again, if everything is correct, you'll have a working prototype in less than 5 to 10 minutes.

Getting started with database naming scheme:
book.cakephp.org/view/68/Creating-Database-Tables

Getting started with the Console:
book.cakephp.org/view/108/The-CakePHP-Console

This will help you get started with CakePHP in general (if you decide to go this route):
book.cakephp.org/

Jefe
+3  A: 

The Zend Framework is well engineered PHP code, but kind of takes an À la carte approach to the whole "framework" thing. This gives you more control, but it can be overwhelming to a newcomer and you may ended up implementing a lot of things the framework could have done for you, if only you knew they existed. It's a great approach for general software projects, but it doesn't sound like you're reinventing the wheel here.

Cake and Code Igniter are two general MVC PHP frameworks that come-up a lot. They're not as deep as the Zend Framework, but they do provide a decent standard way of routing between URLs/controllers/views, and a simple but good-for-most-cases ActiveRecord/CRUD style model (don't write SQL, just call create, retrieve, update, and delete methods on objects that are semi-auto-generated from Database tables). Cake is, in a lot of ways, starting to show it's age. There's a lot of, um, "lowercase crud" hanging around the codebase from the "Let's make an OO framework in PHP 4" days. Still a worthy framework, but if I were starting from scratch I'd go the Code Igniter route. It's probably worth mentioning that Code Igniter forked a few years ago into Kohana.

All of that said, it sounds less like you want an application framework, and more like you want a CMS that will get you 75% of the way there and then have a good environment for you to build the remaining 25%.

Drupal has some really clever procedural code to give you an OO like environment, but it's definitely NOT MVC in the traditional web application sense. The flip side of this is Drupal has a ton of modules for performing common CMS like tasks. There's also the drake module that will let you embed a PHPCake application in a Drupal site. I used Drake a few years ago and it good enough for our needs, although it looks like the project has stagnated a bit.

I've never personally used Joomla, but I've heard their module system is MVC based and I remember being impressed when I looked at the 1.5 code-base. Like Drupal, there's a ton of third-party modules that will help you do what you need to do. It's probably worth looking into their docs and see if anything draws you eye.

Finally, Concrete5 is a relative newcomer that's a CMS/Framework hybrid. While it's not as old as Drupal and Joomla, is has a growing community behind it and offers a clean MVC framework for module development AND a general url/route/controller/view MVC framework (called "single pages"). They're kind of model/ORM agnostic, but there's nothing stopping you from dropping something like Propel or Doctrine in place. I've only had a few month experience with it but so far it's done everything I need it to and hits that sweet spot of well-engineered but loose enough to get things done.

Alan Storm
+1 good all rounded answer
alex
I'd recommend ZendFramework, but everything I've heard about Code Igniter is horrendous
David Caunt
I'm curious horrendous how? In my experience Code Igniter is always well spoken of, the only complaints I've heard recently is it's not a pure PHP 5 project, so there's a small amount of PHP 4 cruft floating around.
Alan Storm
+2  A: 

I want to do very strong MVC, DRY, object oriented and clean coding.

If you want to take advantage of PHP 5's improved OO support, you should use Kohana.

This will help with cleaner coding, as CI is still based on PHP4's primitive support for objects.

alex
Thanks for the hint. Kohana looks interesting. What's CI?
Thanks
CI = Code Igniter
alex
A: 

Any one of the Symfony or cake-php will be a good choice for this kind of app. Symfony already has plugins like sfSocialPlugin and sfSimpleForumPlugin, Which should make your work easy. Even cakephp has similar plugins.

Cydork