Thursday, November 29, 2012

Back to JSP

Alright, so JSP is old and perhaps no longer endorsed by Oracle (there's no section on JSP in the Java EE 6 tutorial).  But it, I find, remains a sane, mature, and better-supported choice of technology for generating web content.  Many other templating engines suffer from lack of support and continued development (due to less usage), crippled integration with other technologies (i.e. frameworks), or unsatisfactory tooling.

Most of the hate-bordering rants on JSP that I see have nothing to do with the JSP technology itself.  The problems they face arise from anti-patterns: spaghetti code, lack of separation of concern, or simply outdated version of JSP spec.

What would be cool for the next JSP spec update is a way to supply partial XML directly from the controller, like that in Lift web framework.  With CDI, yeah.  Something like:

@Produces
@XmlNode
@Named("calendar")
def getCalendar:XmlNode = {
  return 

Calendar

Monday to Sunday
}

No comments:

Post a Comment