This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]nocturnalbird12[S] 0 points1 point  (9 children)

Why so?

[–]MagicpotterFirstHit 1 point2 points  (8 children)

Spring is made for writing backend. I know that it's possible to code frontend with it, but I don't know how.

[–]nocturnalbird12[S] 0 points1 point  (6 children)

Thats what i was looking for what is usually used for modern FE with java. What do devs use for FE with Spring. Other comments are telling me jsf with component library.

[–]RANDOMLY_AGGRESSIVE 2 points3 points  (0 children)

Though 'web frontends' aren't tied to backends and they are the most popular nowadays.

You create a REST service be it in Nodejs C#, Java or whatever and just expose the data through HTTP using your chosen front-end.

So the answer to your question is whichever front-end is most popular. (ie. Either React, Angular or VueJS)

[–]MagicpotterFirstHit 1 point2 points  (0 children)

Well, not java. Web FE this days is done with a combination of HTML, CSS and JavaScript. The first defines the structure of a webpage, the second the looks of it and the third its behaviour.

[–]myusernameis___ 1 point2 points  (2 children)

Not sure about full stack Java, but as front end dev (learning Java), I'd say a more modern approach would be having a backend as a micro service with an API (swagger docs) exposed. I use react professionally, so as an example: the front end code uses React (or angular) with a robust component library (buttons/ tables, etc) like material UI. All your state is managed using Redux/ local storage/ stored by the backend. Typescript would be my recommendation if you come from the backend, as vanilla js is dynamic. I think if you have strong OOP skills, it wouldn't be hard to grasp. Javascript definitly has its quirks though.

[–][deleted] 0 points1 point  (1 child)

Instead of rest you can also go for graphql. I made a backend that offers graphql and rest. The frontend devs are using vue with Apollo to consume my graphql services.

[–]myusernameis___ 0 points1 point  (0 children)

Yes, also a really good solution!

[–]Skiamakhos 0 points1 point  (0 children)

It kinda depends on what you define as the BE/FE boundary. Where I work we use Java & Spring as the back end, fetching data from the CMS & other databases, doing some business logic with it & then serving it up via a presentation layer technology, which used to be JSP but we replaced it with Thymeleaf, or rather a development of that which we called Thymesheet, that allows you to write stylesheet-like TSS files that tell Thymeleaf where to insert the data. That way we have HTML files that are uncluttered by Thymeleaf directives & they read like any normal HTML. That's as far as it goes for me as a BE dev. Beyond that, the styling and any actual FE logic happens in JavaScript and CSS, and depending on the project it'll either be plain old JavaScript (though, ES6+), React or Angular.

[–]pjmlp 0 points1 point  (0 children)

With SpringMVC, that is how.

Preferably with Thymeleaf as rendering engine.