When comparing Yesod vs CakePHP, the Slant community recommends Yesod for most people. In the question“What are the best backend web frameworks?” Yesod is ranked 12th while CakePHP is ranked 50th. The most important reason people chose Yesod is:
While not required, Yesod offers templating through a Shakespearean family of languages to produce page code.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Offers templating for type-safe, well-formed content
While not required, Yesod offers templating through a Shakespearean family of languages to produce page code.
Pro Uses type-safe URLs
Ensures that data provided by the URL is type-safe. This means that data in the URL has a definitive type.
Pro Can be used without knowing much Haskell
While Yesod is written in Haskell, developers can achieve basic functionality without much investment in the language.
Pro Built-in ORM that's easy to use
Cake has a built-in ORM which is pretty easy to use and learn. Building queries can also be done very easily and fetching entire columns can be done in one or two lines of code.
Pro Fast development
Developing in CakePHP is very fast and flexible.
CakePHP is about fast and reliable development, it achieves this by following the convention over configuration principle as it's heavily inspired by Rails (which follows the same programming paradigm).
Convention over configuration is all about making it easier for the developer to start immediately writing code without worrying on what's going on "under the hood".
Pro Large library of helper classes
CakePHP has a large library of helper classes with features such as:
- Authorization
- AJAX
- Forms
- E-mails
- Internationalization
etc...
Pro Exhaustive list of resources to learn CakePHP
Cake's great community has thrown together an exhaustive and amazing list of resources to get started with CakePHP. It's open source and can be found on GitHub.
Pro Open Source
CakePHP open source and is licensed under the MIT license.
Cons
Con Is hard to customize
Learning how Yesod works internally is hard. It is a large framework with complicated components. Finding the appropriate code and understanding how it contributes to the framework is difficult, meaning developers will struggle.
Con Too much template haskell
You actually want to code in haskell and not some DSL with "magic" hidden under the bonnet.
Con Slow
Because of legacy code, old concepts and prioritizing development speed over everything else, CakePHP is bloated and slow.