On Sun, 19 Feb 2012 18:51:54 +0100, Cédric Beust ♔ <[email protected]>
wrote:
On Sun, Feb 19, 2012 at 5:30 AM, Moandji Ezana <[email protected]> wrote:
I was just reading a 37 Signals blog
post<http://37signals.com/svn/posts/3112-how-basecamp-next-got-to-be-so-damn-fast-without-using-much-client-side-ui>about
how they do exactly this. Instead of passing JSON to the client, they
pass server-rendered HTML. A previous bad experience with a project that
did that made me wary of the approach, but now I'm rethinking my stance.
With a good templating engine <http://www.jamon.org> (ie. not JSP) and a
disciplined approach, maybe it could work well.
I think there are valid reasons to follow this approach, the most
important
to me being: what language is more convenient for you to render the
template? There are a few cases where Java's module support can lead to
more reusability/maintenance than Javascript when you start generating
complex HTML+CSS stuff. This also applies when the UI composition is done
on the back-end with something like GWT, obviously. Obviously, another
advantage is a more unified stack (everything is done in Java/Scala as
opposed to having to throw HTML/CSS/Javascript in the mix).
After so many years, a thing that I still don't like, but it's present in
FreeMarker, Play, etc..., is that templating uses a syntax other than
HTML. This is fine for pure programmers, not good when a graphic designer
must be involved - or when you want to use a HTML editor. I prefer an
approach where everything is HTML.
--
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
[email protected]
http://tidalwave.it - http://fabriziogiudici.it
--
You received this message because you are subscribed to the Google Groups "The Java
Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/javaposse?hl=en.