I hope that you already have forgotten about JSF (JavaServer Faces) :)
Not long time ago, all feeds were overloaded by post about, why everyone has to stop using JSF. However JSP (JavaServer Pages) is usually a kind of pain in ass for developers as well, because it's badly readable, not reusable, different from html syntax, not obvious, coupled, etc.
So, here is a better way, that should be chosen in favour of JSP:
Not long time ago, all feeds were overloaded by post about, why everyone has to stop using JSF. However JSP (JavaServer Pages) is usually a kind of pain in ass for developers as well, because it's badly readable, not reusable, different from html syntax, not obvious, coupled, etc.
So, here is a better way, that should be chosen in favour of JSP:
Themeleaf
Thymeleaf is a Java library. It is a template engine capable of processing and generating HTML, XML, JavaScript, CSS and text, and can work both in web and non-web environments. It is better suited for serving the view layer of web applications, but it can process files in many formats, even in offline environments.
It provides an optional module for integration with Spring MVC, so that you can use it as a complete substitute of JSP in your applications made with this technology, even with HTML5.
As mentioned above, Thymeleaf is well integrated with Spring and allows more intuitive way to handle views part, which makes it's quite easy usable & useful especially for small fast projects.
It provides an optional module for integration with Spring MVC, so that you can use it as a complete substitute of JSP in your applications made with this technology, even with HTML5.
##Think about REST
Despite Themeleaf is definitely much more better than JSP.
In my humble opinion, REST is a better option to choose even in favor of Themeleaf.
You could find the list of advantages in my article about REST
Anyway among the big advantages are also the following ones:
- front-end & back-end could be developed independently;
- server code becomes clear;
- front-end isn't coupled to any java stuff, which doesn't restricts JS framework choosing options;
- back-end could be smoothly exchanged, and still keep same API.
No comments:
Post a Comment