Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

Sorry, you do not have permission to ask a question, You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please type your username.

Please type your E-Mail.

Please choose an appropriate title for the post.

Please choose the appropriate section so your post can be easily searched.

Please choose suitable Keywords Ex: post, video.

Browse

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Logo Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Logo

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Navigation

  • Home
  • About Us
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • About Us
  • Contact Us
Home/ Questions/Q 7301

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Latest Questions

Author
  • 60k
Author
Asked: November 28, 20242024-11-28T02:32:08+00:00 2024-11-28T02:32:08+00:00

Coding in a Monolith

  • 60k

In my experience, I found that web application monoliths are very common in a lot of successful businesses. There are probably many reasons for this, but I found that most companies start out, and continue to build upon, their minimum-viable product. This type of product is usually prototyped quickly, using full-stack web-frameworks like Django, Laravel, of even ASP.NET's MVC framework. Developers then continue to build on top of that MVP as new feature requests are asked from them — this is largely due to finding product-market fit, leading to an app that is sometimes built on a wobbly foundation… so, what do you do if you are working with a product like this?

To Rebuild or Continue the Majestic Monolith?

It almost feels like a video game. Now that you've progressed in the game, do you restart your character and add points to the areas you know you need to be successful (now that you know what the game is like), or do you continue from where you left off, and try to adapt your acquired skills as the game continues to take you to uncharted places?

To Rebuild:

Pros
  • No more legacy code 😸
  • You can now use the latest technologies πŸ“‘
  • You understand the business better, so your architecture will be significantly better thanks to the advantage of hindsight. πŸ‘€
  • Overall, better development experience πŸŽ‰
  • Higher flexibility to adapt to future business changes. With better architecture comes better flexibility. ⚑️
Cons
  • Your customers are not going to wait until a new build is complete, they will continue to ask for more features. Now you have a problem – adding features to the old app while building the new. 😀
  • Introduction of a new system of bugs πŸ›. Despite the old system having a lot of legacy garbage, its had years of bug fixes & testing. This rebuild will not have that out the gate, leading to some instability in the new system.
  • Questions from stakeholders asking you – when is it going to be done? πŸ’€ This is the most challenging thing to predict. It took years to get you to the legacy system – how does one estimate a rebuild of an entire system?

To Continue? 🚌

Continuing an app doesn't really require Pros/Cons. If you're considering a rebuild, you already know the cons of continuing the current monolith. The Pros are usually straight forward – features continue to be built, albeit at a slower pace.

Third Option? πŸ—

This last option is a combination of the other two — you build parts of a brand new system, while also continuing your existing monolith. For example, say you have a subsystem to handle notifications. I can imagine your monolithic folder structure would look something like this:

app/    Events/       NotificationDelivered.php    Mail/       OrderSuccessfulEmail.php       ItemShippedEmail.php    Jobs/       ProcessOrder.php       ShipItems.php    Actions/       SubmitOrder.php       ShipOrders.php 
Enter fullscreen mode Exit fullscreen mode

In this example, SubmitOrder.php will dispatch the ProcessOrder.php job. This job then delivers an Email to the user (OrderSuccessfulEmail.php), which then fires a generic event called NotificationDelivered.php. You can consider these 3 files as part of a larger “domain“, such as “Orders”. Some of the other files can be considered as part of another domain called “Shipping”. Let's refactor these classes around domains.

app/    Events/       NotificationDelivered.php  domain/    Orders/       Mail/          OrderSuccessfulEmail.php       Jobs/          ProcessOrder.php       Actions/          SubmitOrder.php    Shipping/       Mail/          ItemShippedEmail.php       Jobs/          ShipItems.php       Actions/          ShipOrders.php 
Enter fullscreen mode Exit fullscreen mode

So what do we gain from this?

  1. Your domains are clearly defined within these domain folders.
  2. All these features are just groups of related domain functions.

Having these domains split into their own feature folders allows us to detach these domains in the future. For example, the entire Shipping feature could be copied into its own Laravel instance, run separately as a micro-service someday πŸ˜΅β€πŸ’«. Of course, it doesn't need to happen right away, but moving your monolith to a pattern like this will put you in the right direction for slowly breaking it apart in the future 😸.

At my current company, this has been our approach. It allows us to bite chunks out of this elephant a little bit at a time. It’s a huge challenge considering we’re also growing as an organization and introducing new processes all at the same time. Growth pains of a startup 😬.

Just wanted to share some of my experience. If you’ve worked with monoliths in the past, I’d love to hear how your company was able to adapt! The more knowledge we can share, the better ❀️.

laraveltestingtipswebdev
  • 0 0 Answers
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

Sidebar

Ask A Question

Stats

  • Questions 4k
  • Answers 0
  • Best Answers 0
  • Users 1k
  • Popular
  • Answers
  • Author

    How to ensure that all the routes on my Symfony ...

    • 0 Answers
  • Author

    Insights into Forms in Flask

    • 0 Answers
  • Author

    Kick Start Your Next Project With Holo Theme

    • 0 Answers

Top Members

Samantha Carter

Samantha Carter

  • 0 Questions
  • 20 Points
Begginer
Ella Lewis

Ella Lewis

  • 0 Questions
  • 20 Points
Begginer
Isaac Anderson

Isaac Anderson

  • 0 Questions
  • 20 Points
Begginer

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help

Footer

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise

Querify Question Shop: Explore, ask, and connect. Join our vibrant Q&A community today!

About Us

  • About Us
  • Contact Us
  • All Users

Legal Stuff

  • Terms of Use
  • Privacy Policy
  • Cookie Policy

Help

  • Knowledge Base
  • Support

Follow

© 2022 Querify Question. All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.