Skip to content

Better Laravel monoliths: Keep it loosely coupled, Keep it layered, Provide separation of concerns.

Notifications You must be signed in to change notification settings

mansha99/laravel-monolith

Repository files navigation

What this Repo is for ?

It contains source code for tutorial published https://medium.com/@mansha99/developing-better-monoliths-in-laravel-3b784d3a356e

What it demonstrates?

Better Laravel monoliths: Keep it loosely coupled, Keep it layered, Provide separation of concerns.

Discussion

Every customer comes up with at least three basic demands: " I want my App to be scalable, maintainable and reliable".

What does it mean ?

Scalability is the ability of an Application to ensure quality and efficiency under growing load and users, thus ensuring user experience.

Maintainability is the ability of an Application to fix bugs and defects, allowing updates and modifications with ease. It is possible if App allows a component to be replaced or modified without modifying the remaining system.

Reliability is the ability of an App to recover from failures, faults and exceptions thus ensuring availability, integrity and security.

"Initially user registration appears to work well, it was fast and responsive, and now we have issues. It is taking a lot of time. Sometimes it seems to be dead. Our traffic has yet not grown considerably, but we are getting performance bottlenecks"

"What else?"

"Our new developer is finding it difficult to detect bottlenecks and other issues. Adding new features or updating existing once is taking a lot of time. Earlier it was not the case"

"Oh, so you are stuck in Big Ball of Mud "

"What does it mean?"

"Unregulated growth, and repeated, expedient repairs"

"?"

"We tried to put everything in a single place. We provided no separation of concerns"

"Please explain further"

"We were supposed to separate concerns like validation, database access, presentation and transformation. We should redesign our App to implement layered Architecture"

"But another guy was suggesting microservices to me. Should we not be doing that ?"

"Microservices are awesome, and make sense when we want to design an enterprise application catering to hundreds and thousands of users. Such apps should decouple their business logic using domain driven design. At this stage it is advisable to go with a layered monolith. Later on we will use Strangler pattern to move from monolith to microservices"

"Ok let's start designing better monolith"


Laravel Logo

Build Status Total Downloads Latest Stable Version License

About Laravel

Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:

Laravel is accessible, powerful, and provides tools required for large, robust applications.

Learning Laravel

Laravel has the most extensive and thorough documentation and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.

You may also try the Laravel Bootcamp, where you will be guided through building a modern Laravel application from scratch.

If you don't feel like reading, Laracasts can help. Laracasts contains over 2000 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.

Laravel Sponsors

We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel Patreon page.

Premium Partners

Contributing

Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the Laravel documentation.

Code of Conduct

In order to ensure that the Laravel community is welcoming to all, please review and abide by the Code of Conduct.

Security Vulnerabilities

If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via taylor@laravel.com. All security vulnerabilities will be promptly addressed.

License

The Laravel framework is open-sourced software licensed under the MIT license.