1
2 Comments

Two frameworks in the same project, will it work?

Can I let you in on a secret? Working with two frameworks in one project might sound like juggling knives while riding a unicycle, but I've found it can be more of a harmonious ballet if played right.

Not so long ago, I had my hands deep into a project, a complex web application requiring diverse functionalities. That's where the two-framework idea strutted into the scene - Angular for the frontend, Spring for the backend. An unlikely duo, but with more chemistry than you'd think.

First things first, a clear line of division is crucial. Let's treat them like roommates - they live together, but each has their space. Angular was our king of the client-side castle, responsible for creating a smooth, interactive user interface. Spring, on the other hand, was the maestro orchestrating server-side operations, managing data and security.

But, here's the thing. Communication is key. Data sharing and interaction between Angular and Spring were as vital as the oxygen we breathe. APIs were our best friends here, serving as perfect intermediaries, letting Angular and Spring have their heart-to-hearts.

This dual framework approach wasn't without its challenges. There were initial hiccups - learning curves, setting up, getting the two frameworks to play nicely. It was a bit like trying to sync two different dance routines. But, as we found our rhythm, things started to flow. Performance improved, features got developed faster, and the result? A robust, efficient, and maintainable application.

In my opinion, using two frameworks in the same project can work brilliantly if managed well. It's all about understanding their strengths, creating clear boundaries, and fostering efficient communication. It might be a tad more complex, but the trade-off can be well worth it.

Before signing off, for all you fellow Java enthusiasts out there, I found this super useful article on the "Top 10 Java Frameworks for Web Development." It's a great read for anyone looking to explore more about Java frameworks. So, go ahead, take a look, and maybe you'll find your next perfect pair!

https://www.aimprosoft.com/blog/java-framework-for-web-development/

on July 26, 2023
  1. 2

    First, I was confused. 2 frameworks: one for the frontend and one for the backend. What is so special about this? It is obvious. Then, I reminded myself that there are frameworks which can do everything, for example Django or Ruby on Rails.

    There is the popular and true advice that you have to choose the tech stack based on the project you are doing.

    Using 2 frameworks is great for separating the two main parts of the project.

  2. 1

    I'm glad people came arround and started to accept that monorepo's could be a great thing in situations like this.