Which framework is better and why? Or what other framework?
Laravel or Cakephp
Posted 15 February 2017 - 07:11 PM
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.
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#
Posted 17 March 2017 - 09:22 AM
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.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users