Decoupling Java from HTML [SPR-12089] #16705
Labels
status: declined
A suggestion or change that we don't feel we should currently apply
type: enhancement
A general enhancement
spring-projects-issues commentedAug 17, 2014
Andrew Luhring opened SPR-12089 and commented
Spring's view technologies do not offer a method to only access the lowest level of front-end data.
The problem is that most of that is unnecessary. In reality the only information the front end needs is:
By giving us data as a JSON or XML object, you decouple the data requirements of the requests from the implementation of the html.
For instance, this:
will output this:
so what is a Front-End dev supposed to do if they disagree with that markup for that implementation? What if they want the markup, in this case, to be:
Most of that can actually be done with jsp (or the other templating languages), EXCEPT this part:
That seems like not a big deal, and it isn't if it were just that one case, but if you take this problem and do it for every templating element, it becomes a serious problem-- and that's assuming the Front-End isn't using any of the new frameworks like Backbone, Angular or Ember. If they ARE, they would be forced to mix JSP or worse Java, with their JavaScript.
So, please consider a shift in how spring implements the bridge between the front and back ends. The front end is growing more complicated by the day and back-end developers shouldn't have to think about whether they should template something as a section, article, main or aside element.
We collaborate through data, but lets keep our concerns separate.
Reference URL: http://spring.io/understanding/view-templates
0 votes, 6 watchers
The text was updated successfully, but these errors were encountered: