Can application with separate frontend be considered monolithic?

Asked

Viewed 61 times

2

I researched a lot but I could not solve this doubt I had when studying on monolithic applications, when backend and front are isolated.

I have an X application that the frontend and backend are separated. The backend is a modular EJB project (EJB module, business module, ...) made in Java, and the frontend is section, made for example with React.

Knowing that a monolithic application is when all functionalities and codes are in a single process:

1 - Can I call the X application as a whole monolithic? Both if the back and front are on the same machine sharing their resources, but in separate processes, or each on a different server? I don’t think so, but I couldn’t be sure.

2 - I can call mine backend monolithic? Or not, when referring to it I should say that it is only a modular design?

  • 1

    literatures (read on wiki, medium, Docs.microsoft, etc.) says that a monolithic application contains "all layers together", i.e., according to literatures nay can be considered monolithic since it has separate front/back. Now, if you look at the whole back as an application, for example, it has endpoints, api, or other interface that allows you to use it, it could be understood as an application, and the front end as another, so that would be a mono, but I don’t think there’s going to be an overwhelming response to that, but if it follows the concept, the literature, is not a monolithic application

1 answer

2


It depends on the context that is using the term. It is used in different ways.

I’m not going to talk about all contexts because some would make no sense.

Executable distribution

Within the original concept, and that seems to be what the question wants to know, at least in the beginning, the fact that it has more than one executable file is no longer monolithic. I mean, if you have a lot of script in PHP, Javascript, Python or other languages, or Dlls or something similar generated with Java, C#, C++, or other languages, so you no longer have a monolith. See more in What’s the difference between DLL and lib?.

So having something run in different layers certainly doesn’t have a monolithic solution. But if you consider only a part there can have a monolith only in this part, which can occur easily in the backend and today it is possible to have frontend, though unlikely, or near impossible, if you consider that you need at least one HTML and something else to have something useful.

But this is even complicated to classify because the original idea only thought of executable. I don’t know if the concept applies.

Anyway run in separate processes or not, defines nothing, because the monolith has to do with the file that is distributed. If you have the same processes but there are different files it is not monolith, and if you have more than one process started with the same single file, then it is.

Running on the same machine doesn’t make something a monolith, but if something runs on another it certainly isn’t, because there are already parts.

Architectural pattern

If you want to talk about monolithic as opposed to microservices architecture, then yes, not only can it, as it is. Have a part frontend and backend does not mean that these parts are microservices.

Almost nobody understands what microservices are, and even less people know that doing this is extremely difficult and pays a very high price, and so "nobody" should try to do something like this. The best thing that can happen is that one makes separate executables and says that it’s already in fashion, and has little or no gain, and architecture remains monolithic. But it can actually do microservices and creates a nightmare for life.

Then you need to know what concept you’re talking about. If you are talking about being modular then the subject is already architecture, and even something modular is still a monolith, unless the separate services, and therefore modular, are completely independent, which is very difficult to do, and almost nobody needs it. Modular is a good thing in most scenarios. When you have one frontend and a backend separately some modularity has already obtained.

The frontend is completely independent? If so then it is a service that is not part of a monolith. You probably have something hybrid that in some part has a separate service. And the relationship between the parts is very simple, which makes it feasible to be managed by most programmers. But it’s hard to make something completely independent, and it will only be at a certain point and synchronize when it’s possible, which is even harder to do right. Run away from those things. Opt for the monolith unless you’re a very experienced engineer, have a huge team and an extraordinary need to adopt something different. Most engineers who opt for microservices are just a little experienced, if they were more, they would not choose (save very rare exceptions).

  • Thank you so much for the detailed explanation. I just didn’t understand this part: "Is the frontend completely independent? If it is then it is a service that is not part of a monolith. You probably have something hybrid that in a certain part has a separate service." R: It requires backend data. The frontend calls the REST services from the backend, receives the return in JSON, renders the page and returns to the user. What you meant to have something hybrid in this WEB application?

  • 1

    So this I find controversial. Because rarely is there something so independent that it doesn’t depend on anything else. The question may pass through it working even if it is with limitations Another interpretation is that it has as dependency only what provides what it needs with nothing else. Hybrid that is one part is one way and another part is another way..

Browser other questions tagged

You are not signed in. Login or sign up in order to post.