Jump to content


Photo

Laravel or Cakephp


  • Please log in to reply
2 replies to this topic

#1 tobeyt23

tobeyt23
  • Members
  • PipPipPip
  • Advanced Member
  • 250 posts
  • LocationSalisbury

Posted 15 February 2017 - 06:37 PM

Which framework is better and why? Or what other framework?



#2 gizmola

gizmola
  • Administrators
  • Advanced Member
  • 4,439 posts
  • LocationLos Angeles, CA USA

Posted 15 February 2017 - 07:11 PM

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/20...erent-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.

#3 tobeyt23

tobeyt23
  • Members
  • PipPipPip
  • Advanced Member
  • 250 posts
  • LocationSalisbury

Posted 16 February 2017 - 03:39 PM

Thank you very much! On an off subject what is good to begin in .net asp and c#






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users