Need advice about which tool to choose?Ask the StackShare community!
CakePHP vs Symfony: What are the differences?
Key Differences between CakePHP and Symfony
CakePHP and Symfony are both popular PHP frameworks used for web application development. While they share similarities in terms of their MVC architecture and object-oriented programming approach, there are several key differences that distinguish them from each other.
1. Ease of Use: CakePHP is known for its simplicity and ease of use. It follows the convention over configuration principle, meaning that developers can get started quickly without having to spend much time on configuration. On the other hand, Symfony provides a more flexible and modular approach, allowing developers to have more control over the configuration and customization of their applications.
2. Community and Documentation: Symfony has a larger and more active community compared to CakePHP. This means that there is a wider range of resources, tutorials, and plugins available for Symfony developers. Additionally, Symfony has extensive and well-documented official documentation, making it easier for developers to learn and troubleshoot issues. CakePHP, while having a smaller community, still has a dedicated user base and offers decent documentation.
3. Flexibility and Scalability: Symfony is known for its flexibility and scalability, making it an ideal choice for large, complex projects. It includes a wide range of reusable components that can be easily integrated and customized. CakePHP, although less flexible than Symfony, provides a more opinionated approach, which can be beneficial for smaller projects with less complex requirements.
4. Performance: Symfony has a reputation for better performance compared to CakePHP. The Symfony framework incorporates various optimizations, such as caching and opcode caching, to improve the overall speed and performance of web applications. While CakePHP also performs well, Symfony's emphasis on performance sets it apart, particularly for high-traffic or resource-intensive applications.
5. Database Abstraction: Symphony provides a powerful and extensible database abstraction layer called Doctrine. This allows developers to work with different databases seamlessly and provides advanced features like query caching and support for database migrations. In contrast, CakePHP uses its own ORM (Object-Relational Mapping) called CakePHP ORM, which is simpler compared to Doctrine and may be a better fit for developers looking for a more straightforward approach to database interactions.
6. Learning Curve and Code Reusability: Symfony has a steeper learning curve compared to CakePHP. Its extensive feature set and flexibility require developers to invest more time in learning the framework's concepts and best practices. However, the upside is that Symfony's modular architecture allows for a high level of code reusability, enabling developers to leverage existing components and libraries easily. CakePHP, on the other hand, has a gentler learning curve and promotes rapid development with its conventions.
In summary, CakePHP offers simplicity and ease of use, suitable for smaller projects, while Symfony provides flexibility, scalability, and performance optimizations, making it more suitable for larger and complex applications with a steeper learning curve.
Hi all, I need to create a simple IoT interface application that connects the end device API with a GeoTab API. I am considering using Bubble due to its simple interface and configuration tools, but I fear it's too simple. We will want to add features and new devices as we grow - I was thinking of using CodeIgniter or CakePHP on a hosted site for the application. Must support JCOM encoding between the two APIs and there is no need for a separate interface as GeoTab already has one; we are just connecting and pushing data. Thoughts?
You should check out Partunity.com if you want to get plugged in with innovative tech startup ideas!
Hi everyone! I'm starting a personal project that I've been postponing for a little while and I need a bit of advice. I thought that it will be a bit of a challenge but I figure the best way to learn is by doing!
The plan is to build an app with loads of automation build in for reporting which would make it very easy to perform tasks, The plan is to build something similar to an HR app using microservice architecture, separating services e.g. employee data, payroll (including calculations based on easily entered info like tax %), employee services (vacation, sick day allowance booking and tabulation) and automated reporting on a pre-defined schedule (bi-weekly, monthly).
I am considering Django (as I currently know a bit of Python) and Symfony (as a friend who is a developer recommended it) but I am well aware there are other (and probably better) tools out there for the job (like maybe ExpressJS/Node.js for the backend and React/Vue.js for the front).
Background:
I have got knowledge as a DevOps, Site Reliability and Cloud engineer so once the app is built I'm very comfortable taking it to deployment.
Thank you all for your help and responses.
Hi. I guess it all depends on what your goal is. If you wanna make fast prototyping Django or ExpressJNodeJS might be really good candidates. You can write your services quickly and easily by using anyone of them. Maybe we can also put Laravel in the same category.
Symfony is also another application framework that comes with many reusable components. It provides great flexibility with the configuration and dependency management solutions. So that you can inject or override anything, anytime without doing something hack-ish. You don't have to depend on any components that come with the framework and, replace them with whatever you prefer unless encounter any integration issues. I can say that Laravel also provides most of the Symfony futures as it uses its components under the hood. However, my personal experience with Laravel was not so good because it made me feel like I use a modernized version of Codeigniter. But anyway. :) So if I have to choose one of them, I would choose Symfony.
From the backend perspective, all of those have some pros and cons. For example, If strict type declaration is important for you and you don't like code magics like monkey patching etc., maybe Python and NodeJS might not be good candidates and maybe you could choose Symfony/php. However, in this case, you'll be missed out on the most powerful future of NodeJS which is non-blocking io. if you plan to do IO-intensive works, I think it would be a big loss.
So, maybe I can recommend you to have a look at typescript + NestJS also. https://nestjs.com/ The futures that NestJS provides might be a good balance between the strengths of Symfony and NodeJS.
As I'm backend dev., I haven't work too many frontend projects but from my personal experience, I loved ReactJS more than Vue although Vue was simpler. Maybe a front-end developer can give us more helpful details about those.
Hope it helps.
Hi, Which tool will you recommend:
I need to build a web application, oriented to small businesses, like a small ERP. It will have intensive use of Sql to access a PostgreSQL database. It has to be secure, as it will handle information on customers, sales, inventory.
If you think another tool will be better, please let that know.
Thanks a lot
Laravel and Postgres will be the better solutions you can add more like Redis for caching and React/Vue for the frontend.
Check Spring, if security and reliability is needed along with Lots of Database , check Spring Data, spring web, spring security
Laravel works well in this context, you can build a secure and fast ERP using it with postgresql and all Laravel environment like caching, queues, jobs. And for frontend if you need productiviness I would go with Livewire to help
I'm about to begin working on an API, for which I plan to add GraphQL connectivity for processing data. The data processed will mainly be audio files being downloaded/uploaded with some user messaging & authentication.
I don't mind the difficulty in any service since I've used C++ (for data structures & algorithms at least) and would also say I am patient and can learn fairly quickly. My main concerns would be their performance, libraries/community, and job marketability.
Why I'm stuck between these three...
Symfony: I've programmed in PHP for back-end in a previous internship and may do so again in a few months.
Node.js: It's newer than PHP, and it's JavaScript where my front-end stack will be React and (likely) React Native.
Go: It's newer than PHP, I've heard of its good performance, and it would be nice to learn a new (growing) language.
Go with Node.js. There's something really satisfying about being able to use a single language across your entire tech stack. Especially once you integrate GraphQL, which is effectively JSON.
Your second best option is Go, but the ecosystem around Node.js is quite a bit stronger. This will play a big factor when you start building functionality like file management, messaging (especially in real-time), and authentication. The libraries and documentation are just stronger for Node.
For a full-stack app or just simple APIs I'd go 100% with Laravel. You get a clean architecture, beautiful documentation and friendly and always growing community: the project is yours, from A to Z. With their docs and resources like Laracast you can start from zero and build what you want, when you want. The learning curve is definitely smaller when compared to Symfony and, with the help of a bit of "magic" (Facades etc.) you get the same results in the half of the time with cleaner code.
Pros of CakePHP
- Open source35
- Really rapid framework25
- Good code organization19
- Flexibility13
- Security best practices10
- Clean architecture7
- ORM5
- Less code5
- Composer friendly4
- Convention Over Configuration4
- CakePhp Book2
- Cake Bake2
- Built-in Validation2
- Ctp view File extension1
- CakePhp inflector1
- Quickly develop1
- Rest Full Apis1
Pros of Symfony
- Open source177
- Php149
- Community130
- Dependency injection129
- Professional122
- Doctrine80
- Organized75
- Modular architecture71
- Smart programming47
- Solid45
- Documentation20
- LTS releases16
- Decoupled framework components10
- Robust10
- Easy to Learn10
- Good practices guideline8
- Service container8
- Bundle8
- Powerful7
- Simple7
- Flexible6
Sign up to add or upvote prosMake informed product decisions
Cons of CakePHP
- Robust Baking Tool1
- Follows Good Programming Practices1
Cons of Symfony
- Too many dependency10
- Lot of config files8
- YMAL4
- Feature creep3
- Bloated1