how can I integrate slim framework in cakephp?

Why isn't Cakephp popular despite being one of the earliest php framework to be written?

  • Adoption rate for cakephp is quite disappointing despite it being one of the earliest php framework to be written. What do programmers dislike about cakephp that has hindered its adoption?

  • Answer:

    Because, compared to frameworks like Laravel, Cake is clunky and sooo 2005.

Jacques Grové at Quora Visit the source

Was this solution helpful to you?

Other answers

Having dealt with CakePHP for a semester as part of a co-op work term, one of the main reasons I disliked it was for the simple reason that if you were not using Cake to "bake" your schema, there was almost no concept of a model. Everything was returned as deep arrays from the database when using their ORM. Another problem with Cake was the documentation. It is not very helpful when trying to figure out how to do something the "Cake" way. It seems like the only application CakePHP was designed for was building blogs. CakePHP is not the framework to use if you plan on trying to port over previous code or database schemas. I believe the framework has more potential in the case where a developer gets to start building an application from scratch, or is going to be doing a software rewrite. Then again, Cake does not take advantage of PHP's newest language features, so it may be beneficial to use a framework that does not support older versions of PHP (5.4 and below) On the positive side of things: Cake did make integration with Memcached / Amazon Elasticache and Redis quite simple. Even though I ended up writing my own Memcached plugin, it was pretty straight forward. As for the context: the application I was working on was a mobile version of one of Quebec, Canada's largest online job boards with some pretty deep tech debt from poor maintenance over the years.

Sam Jesso

I would not say the adoption rate is disappointing as that seems alot subjective however, there are so many options to pick from and Cakephp is alot as opinionated as Rails. Hence, not much Php developers like that as mostly PHP developers are usually not completely fans of OO. I am not  implying that All PHP developers don't like OO concepts but majority are usually beginner to intermediate level programmers.

AbdulHakim Khalib Haliru

It's complicated, uses ORM for everything, it's outdated, misuses concepts and patterns. It's not even comparable to modern frameworks. It's like apples and oranges, though both are fruits... Not to mention it locks you into the framework deeply. It's the Cake way or the highway. If I were to choose a framework today it's either Symfony2 or Laravel4 and I would stay far far away from Cake, CodeIgniter and the like.

György Fekete

Disclaimer: I'm a core member of the project. You mention a couple of issues in your question: popularity, adoption and disliked features. So, I'll try my best to answer each of these points separately... Popularity First of all, I'm not sure how you came to the understanding that CakePHP isn't popular, or how you measured its popularity. What I can tell you is that it's currently the 4th most popular PHP framework on GitHub (as well as being featured under https://github.com/showcases/web-application-frameworks), and is also in the top 5 most popular Open Source projects using PHP, out of some currently 155,499 projects. I'd say that's pretty "popular". Just this past month we've had 120 pull requests merged to the framework repository. Excluding merges, 38 authors have pushed 29 commits to master and 442 commits to all branches. Seems quite a bit for a project that you don't consider "popular". Over the last year we've had over 31 million page views from some 8+ million unique visitors to our websites. Our servers are generously donated by Rackspace, who I think wouldn't support that traffic if the framework weren't "popular". On the social side of things, we currently have 12,484 followers on Twitter (https://twitter.com/cakephp), 14,932 likes on Facebook (https://www.facebook.com/pages/CakePHP/112600242088531), 19,013 members in our Google group (https://groups.google.com/forum/?hl=en#!aboutgroup/cake-php), and 105 people connected to the #cakephp IRC channel on Freenode right now. The number of attendees at CakeFest (http://cakefest.org) has also been consistently growing. You can listen to the keynote from that on a podcast here: http://podcast.cakephp.org/listen/episode-3-cakefest-recap Popularity? Maybe. Adoption I guess this is a thing of perception, and how you intend on measuring it. There are currently 21,197 questions tagged with "cakephp" on Stack Overflow. I'd say that's quite a lot of potential developers "adopting" and asking about the framework. Over just these past two weeks we've had 10,695 clones of the git repository, and 63,299 page views from some 12,880 unique visitors to the GitHub page for the framework (note that there are many repositories under the organization's account, I'm only counting the core framework repository). This is just for a period of 2 weeks. For a longer timeline view, here's the full commit history (which includes the 3.0 branch), and clearly shows developer "adoption" as far as contribution stands (I would argue that someone doesn't contribute to a project if there's no gain for them, it's an investment). We currently have 286 contributors to the project (including a core team of 25 members), which doesn't include some of the 355 contributors to the documentation, which is also Open Source. All of these people have "adopted" the project to some extent. The project itself is 100% community driven. There is no injection of capital or fundraising beyond donations to the project via the http://cakefoundation.org and it's efforts, such as http://training.cakephp.org, http://certification.cakephp.org and events. So all growth originates from the developer community. Without "adoption", it would all be impossible. Disliked Features There's no doubt in my mind that if you asked anyone who had worked with versions 1.x or 2.x what they disliked, the fact that models return arrays will most likely be on that list. Truth be told, and as a core member of the framework, it was on my list too. However, it's worth noting that version 3.x no longer returns arrays, it returns objects. Like many things people complain about in CakePHP, these are now things of the past, which unfortunately live on thanks to past notoriety or misinformation. Another big complaint is that it's slow. Well, to be honest, in the 1.x days that may have been true. But since the 2.x series, which saw a significant performance boost, those claims can no longer hold their weight. For example, here's an application built on CakePHP, which has been in the top performing sites on New Relic's index: Also, check out this talk by Christian Winther, if you really want the low down on making an application scale (spoiler: "CakePHP got very little to do with actually making a scalable application in the first place"): And, as to that one about the quality of the code base, here it has an A+ rating for code consistency: http://squizlabs.github.io/PHP_CodeSniffer/analysis/cakephp/cakephp/ To give a little background, the framework was inspired by early versions of Ruby on Rails, which advocates convention over configuration, sometimes causing a love/hate relationship with developers, because it's opinionated. This means that CakePHP has a way of doing things, which if you follow along for the ride, you get a lot of the work done for you, and more time to spend on building your application. These conventions aren't a secret, they're clearly defined for developers. It's important to remember that CakePHP was one of the original PHP frameworks (as you mentioned in your question). It's been around for going on 10 years now, which is a very long and "respectable" time for a community built project to survive. However, this also means that it's very mature, and thoroughly tested in real-life scenarios and environments. For reasons why this is probably a positive thing, I'd recommend checking out José Lorenzo's talk on the "grandpa" status of the framework: The framework started back in the PHP 4 days, when a lot of the object-oriented goodness were lacking in the PHP langauge itself. Back then, the framework worked around these short-comings by providing a lot of the magic that has been introduced natively in PHP 5+ (for example, model behaviors were basically traits, way ahead of their time). For more insight on the history of CakePHP, check out this article by Larry Masters, an original founder of the framework: http://cakedc.com/larry_e_masters/2014/06/28/cakephp_3_0_is_coming On the topic of longevity, CakePHP has always had very strong support for BC (backwards compatibility). This could be reasoning for a somewhat slower introduction of newer features based on updates to the PHP language, in favor of not causing developers to have to perform rewrites of their code bases. Even so, when new versions of the framework are released (around 110+ to date) a migration guide is provided. Additionally, for major and minor updates, there is also an upgrade shell, as well as tools to help developers move from one version to another. Although this (slow progression, less BC breaks) may be one of the reasons more impatient developers choose newer and shiny things, it's also the reason others stick with CakePHP, because they know they won't get left behind. This is probably my only worthwhile answer for the potentially "hindered adoption" you alluded to. Any other reasons probably have something to do with arrays. Conclusion Unfortunately, the PHP community can be somewhat combative when it comes to frameworks. This isn't necessarily a bad thing, the tool you use and your choice will always be somewhat opinionated, based upon your likes and experiences, and will have some level of bias based upon your style and approach as a programmer. This is probably a bit of shameless self-promotion, but I did a talk on the benefits of CakePHP, as well as good approaches to development, you can find the slides here: http://www.slideshare.net/JamesWatts4/enterprise-cake Also, for those who preach the "doesn't follow design patterns" mantra, here's another talk as a counter argument to that: Final thought: Try out everything, different frameworks and libraries. Be aware of false prophets and avoid following the hype, the best solutions are the ones which deliver the results and can prove their worth, and stand the test of time.

James Watts

It depends on programmer it self.  In the past, i'm using CakePHP and i love it, then i try to switch to Laravel 4.x.  I will not say that Laravel is a bad framework, no! Or CakePHP is not popular, it's not! Although, popularity it's not important (at least for me). Laravel is a great framework, but i acknowledge that with Laravel, i just using the tools of framework not the framework it self, such as: composer / packagist, migration system, and command line options, i really love it! Until i realize, that all command line things inside laravel, was available in CakePHP, and plus i like CakePHP's way to manage objects, like Behavior, Component, Helper and others. I'm not compare between laravel and cakephp, and try to decide which is better, absolutely not! I just want to say that, it's not matter that we are using framework which is 'popular' or not, the main important thing is the power of framework it self, whether the framework can help us or not to develop and finish our apps. Focus to our business logic, and use framework that can support our apps development.  It's more important thing than popularity of framework. Know about framework features and decide that the framework can help us or not.

Hiraq Citra Mahardika

There are pros and cons to any framework. When it comes to proof of concept I have come to find out that it is difficult to get a concrete answer as to why users think one framework is better than the other. Most opinions I see about these frameworks are biased... it is based on many factors but not facts... I have worked with both CakePHP and Laravel and I think both have great features and both have features that needs improvement. It all depends on what you like... To put things into better perspective, I like working with Laravel's ORM more, but I like CakePHP's Routing System better. Also, in general, I like creating websites (ie. blogs, corporate sites) with CakePHP, but when it comes to creating APIs, I like to use Laravel. I have no actual "lab" results to prove why I like one more than the other... it is just personal choices and what fits better to my vision as a programmer... Praises to all involved in creating these frameworks and actually maintaining them with the same passion!

Andre Santiago

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.