Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rewriting a php app in CakePHP

Tags:

php

cakephp

So, I'm very tempted to rewrite my application using a php framework, as I think it'll make it easier for folks to get involved, as well as improving the design of the app.

CakePHP looks like the best of the PHP web frameworks. Does anyone have any experiences of it? What are the caveats I should consider going from handcoded PHP to using a framework?

like image 417
mattl Avatar asked Aug 05 '09 18:08

mattl


3 Answers

Not depending on the framework you'll chose, the first thing you have to know is that :

  • it'll take some time for you to know it
  • you'll do crapping things, during that time ^^
  • so, take into account the fact it'll take some time before you are fully operational :-)

I think those points are the most under-estimated points : using a framework takes not much time... Using it well and to the full extend of its abilities takes... Well, a couple of months, maybe... Which means, when you are at the end of your project you'll say "I should rewrite that with all the stuff I learned while re-writing it the first time" :-D

What it means is : learn what the framework can do, learn how to use it, and use it for a while on small applications, before starting rewriting your big one !


Then, there is probably no "best framework" : one framework may be very well suited for one project, and another one may be best for a second, different project.

I've never worked with CakePHP ; I really like Zend Framework. But that is a personal opinion, and O know people who really like symfony ; they are not wrong : symfony is great -- and I am not wrong either ^^
Still, we sometimes agree on some things ; like the fact that Doctrine (default ORM layer of symfony) is really great stuff, and we tend to use in both symfony and ZF-based projects...


If motivated, you can take a look at many posts on SO, about frameworks... Here are a couple of those :

  • What PHP framework would you choose for a new application and why?
  • Is Symfony a good framework to learn?
  • What, in your mind, is the best PHP MVC framework?
  • Is Symfony a better choice than Zend for a web development shop (10+) because it is a full stack framework?
  • Best PHP framework for an experienced PHP developer?

Good luck with those ^^
("Which framework" is a quite pationnating -- and subjective -- question ^^ )

like image 65
Pascal MARTIN Avatar answered Sep 25 '22 06:09

Pascal MARTIN


CakePHP has it's good parts but there is no "best" framework. Here's a thread with some clues about what's good in most popular PHP frameworks.

If you never used MVC frameworks before (and Cake is MVC framework) I think you should first familiaze yourself with MVC architecture.

like image 41
RaYell Avatar answered Sep 24 '22 06:09

RaYell


"CakePHP looks like the best of the PHP web frameworks."

This is subjective. You should compare the pros/cons of other PHP frameworks that will suit your needs.

These posts may help you:

https://stackoverflow.com/questions/2648/what-php-framework-would-you-choose-for-a-new-application-and-why

Why do I need to use a popular framework?

https://stackoverflow.com/questions/249984/php-framework-decision-analysis-paralysis

like image 45
Brian Liang Avatar answered Sep 23 '22 06:09

Brian Liang