Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mixing front-end and server-side technologies (Spring, Thymeleaf, AngularJS)

I'm a newbie in web application development and try to explore some technologies. I have some (very) small experience with Spring-MVC and AngularJS. Recently, I've started to learn Thymeleaf.

Having some really basic knowledge of these technologies, I'm trying to figure out whether and how to use them jointly.

I know there are combinations like REST API as a Spring-MVC controller + AngularJS as a front-end technology that consumes the given data. And that's might be enough for your Single Page Application. But what about applications consisting of many pages which should reuse some components (ex. navbars)? And what about including security mechanisms in those applications?

I've just got to know that there exists Thymeleaf which seems to be a decent template engine. So far I've only used it to create some templates for my HTMLs, but I've heard there are many more appliances - like taking advantage of its nice integration with Spring.

I'm going to create web application consisting of a few pages with security mechanisms (registration, logging etc.), database integration and a lot of user interaction. It would be sort of order system.

Does it make any sense to mix front-end technology like Angular and back-end's Thymeleaf, especially in my case?

I've seen nice post here, but still need some clarification.

like image 650
user3541916 Avatar asked Oct 12 '15 19:10

user3541916


People also ask

Is Thymeleaf front end or backend?

Thymeleaf is used to render the frontend, e-mail templates and also Handlebars fragments for the dynamic part of our EnSupply frontend. Even though Thymeleaf has a huge number of features, its learning curve is relatively flat. Due to its good integration into the Spring ecosystem can be productive from day one on.

Is Thymeleaf server-side or client side?

Thymeleaf is a modern server-side Java template engine for both web and standalone environments.

Is Thymeleaf server-side rendering?

Thymeleaf is a serve-side template engine for Java. It has built-in support for Spring framework and is widely used in Spring based Projects. In fact, Spring Boot itself has been promoting thymeleaf via several thymeleaf based projects and examples in its blog.

Should I use Thymeleaf or angular?

Angular is for development while Thymeleaf takes care of the design aspects. Moreover, Thymeleaf can be said to combine a template with data model and functionality to produce end-result while AngularJS provides actual functionality for an application.


1 Answers

I would suggest jhipster. Recently I wrote application with this API and I think its one of the best startup for application with back-end based on SpringMVC and front-end with AngularJS. You can easily generate template from command line which is fully editable

like image 189
Artur Boruński Avatar answered Sep 26 '22 15:09

Artur Boruński