Java web application Front end

daoud175 picture daoud175 · Feb 24, 2015 · Viewed 24.6k times · Source

I have a large application that is using Java on the backend and struts, Jsp and JSTL tag library on the front end. Database is DB2 and we rely heavily on Stored procedures.

We are planning to upgrade the application to a new architecture/framework.

The main framework we are considering is Spring, although our leads are trying to push us to adopt Java EE instead claiming it's better framework.

Any recommendations as to which way to go with Spring or Java EE? Any main reasons to prefer one over the other (advantage/disadvantage)?

For each one of those, what is the best alternative for JSP taglib ? We use to have to write all the html tags manually to display dynamic data with JSTL. I am reading about new frameworks like Angular and JSF components. I am not sure also what is widely used these days. I read that more and more programmers are passing the data from REST services as JSON to front-end. What do they use to render the data, is it JSF, Angular?

I do .NET programming, and in ASP.NET we have data binding and components like ListView, etc. Are JSF and Angular the same?

Any web-site with good examples, documentation (especially architecture) that you recommend?

Answer

Dogs picture Dogs · Feb 24, 2015

Java EE and Spring are both very good and very comprehensive frameworks for writing backends. Both of them should be able to do exactly what you want. I would recommend using whichever your team is familiar with but I'm going to stay out of the details since you will be able to make a high quality application with either one very easily.

As far as the front-end goes, I have personally gotten the best results out of creating a RESTful API and using that to send data to a front-end Javascript framework. Angular is really good for this. One reason for this is that the Javascript frameworks tend to provide a lot of power when it comes to writing good web front-ends. JSF is a server-side, component based MVC framework, and that generally gives you less control over the the HTML + JavaScript that's being created and makes it a lot more difficult to write tests for.

I've also found that at large shops, you can't always trust people to do things the right away. Separation of concerns is important, and I like using a JavaScript framework like Angular for the front-end because it goes a long way to keep front-end code out of the back-end. The JSF applications we have at my workplace are rather terrible, because the developers abused things like sessions. The JSF code also lived in the same deployment as the backend. Instead of using web services and taking a service oriented approach and keeping everything loosely coupled, we wound up with giant 'blobs' of code that 'do everything'.