E
E
Eugenue Cesarevich2020-11-12 22:12:59
Java
Eugenue Cesarevich, 2020-11-12 22:12:59

How is the frontend for Java applications made?

I ran into not understanding how the front is usually implemented for a Java application.

I have a few ideas about how this could be: everything is done exclusively on the power of Java.

2. On the Java server, only the backend is made, which gives data for rendering, but does not draw them itself (i.e., the backend is in Java, and the front is made separately in another application that is more suitable for this) .

I understand that it can be done either way. But I'm interested in how this is usually done, including for large projects, it is very desirable with examples (if, of course, you have them) .

Answer the question

In order to leave comments, you need to log in

3 answer(s)
O
Orkhan, 2020-11-12
Hasanly @azerphoenix

Hello!
I think that everything first of all depends on the budget allocated for the project.
Of course, the 1st option (jsp, gsp, thymeleaf, mustache, freemarker) is cheaper than full-fledged front-end development on javascript frameworks (Angular, React, VueJS, etc.).
In the first case, a backend is made in Java on ordinary controllers (if we are talking about Spring). In the second case, a RESTful service is being developed that will interact with the js framework.

S
Sergey Gornostaev, 2020-11-13
@sergey-gornostaev

This is not a Java specific question. Java, like any other language, uses both approaches. When you are developing a website, for example, a collective blog like Habr, you do not need a developed front-end, you can not spend resources on its development, it will be easier for you to promote it in search engines. When you are developing a web application, such as online banking, like online.sberbank.ru, you need a front-end, you need a SPA, because the user expects the same UX as from a desktop application.

V
Vasily Bannikov, 2020-11-13
@vabka

> Usually
Depends on the task.
If the site almost entirely consists of semi-static pages with little or no interactive - you can use jsp.
If the user cannot refuse to use your application - you can use jsp.
If we aim at the mass consumer, then it is better to invest in a normal front-end.
If there are a lot of interactive elements, then there will be a lot of js and there is not much point in mixing with jsp.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question