Jump to content

Recommended Posts

The best framework is the one you are most productive with.

 

Of the 2 you listed, they are both of a type, and that type is that they were designed around "convention". What that means is that they utilize conventions to provide you a lot of "magic" and many people enjoy the productivity that comes along with magic behavior. They also interface with databases via an implementation of the ActiveRecord design pattern. If you need a database you are going to use their db layer, and the pattern is Active Record. It is fast and easy, but limiting and kludgy in more advanced applications in my experience and does some binding of business logic and persistence to the database model code which at first glance is often appealing to people but has inherent issues. Just for reference, Laravel's database library is called Eloquent. You will get farther in your research knowing that when googling.

 

Cakephp is very simple, and also very old. It's simplicity is appealing to many developers who are starting out, but it's really dated.

 

If I needed to choose between those 2, I would choose the more modern of the two, so I'd choose Laravel.

 

As an alternative, there are frameworks that are designed around configuration rather than convention. There is less or even no magic, and there are those who do not want magic behavior baked into their framework.

 

Symfony is the big competitor to Laravel these days, and that is the real choice most people are making (symfony or laravel). Symfony can be used with various database layers but it has good support for and cross pollination with the Doctrine2 project, which is an alternative to an ActiveRecord based ORM. Doctrine2 implements the "Data mapper" pattern and I prefer that to Active Record for many reasons. Here is a really nice introduction to this subject: http://culttt.com/2014/07/07/doctrine-2-different-eloquent/

 

I also have to add that there are many "micro framework" choices out there like slim, lumen and silex. You have a lot of high quality choices and the state of php frameworks is better than it has ever been, given the move to component library development, namespaces, PSR-0 and the creation of composer.

Link to comment
https://forums.phpfreaks.com/topic/303202-laravel-or-cakephp/#findComment-1542810
Share on other sites

  • 1 month later...

Just had a call from a job agency as I'm currently looking to get back into IT.  I've loads of IT experience but not commercial PHP experience, more hobby level stuff.

 

I asked what frameworks he recommended and he suggested Laravel as being the best PHP framework for jobs.  I assume this is from experience of what companies are asking for and wasn't necessarily based on any technical merits of the framework.  For me it the best thing to learn purely from the job prospects point of view.  So if anyone can recommend a good tutorial for Laravel, then please let me know.

Link to comment
https://forums.phpfreaks.com/topic/303202-laravel-or-cakephp/#findComment-1544288
Share on other sites

  • 5 months later...

I think there is no the best choice.


All depends on your preferences and project requirements.


I work with Laravel mostly because I’ve found a lot of documentation about it and a good book about it.


But I sure that CakePHP is a good choice too.


I’ve seen CakePHP documentation and it sounds as the very attractive framework.


Remember that all solutions have their pros and cons!


Work with the most attractive solution for you!


Good luck!


Link to comment
https://forums.phpfreaks.com/topic/303202-laravel-or-cakephp/#findComment-1551258
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.