I've been working a bit with lift lately and next to cursing a lot
(because it for example "magically" changes IDs, form input names and
so on), there are a couple of things that are actually rather nice
over there.
One of them is the approach to templating which is very
designer-friendly in that you just write HTML and add things inline,
e.g.
<div id="someId" class="lift:doSomeMagicFoo">
<p>This is just some example markup that will disappear at
runtime and could be replaced by something entirely different.</p>
</div>
If I'm not mistaken this kind of inline way of doing things is also
used in Wicket and I've seen it used in other template engines
(Cambridge comes to my mind).
Additionally since lift is "DOM-based" it is also possible to add in
example markup that gets replaced at runtime by real DOM markup.
And this does come in handy when you for example have a designer that
can start off by preparing the general HTML layout, add in some
example content, and then developers come in afterwards and extend the
HTML templates in a non-intrusive way by adding these inline code
snippets.
Now I do realize that this is not the same approach to templating as
the play-scala templating engine.
My question is more along the lines of: what methods do you use in
order to keep the designers in your project happy with this kind of
template style? Are they generally fine with the inline syntax, how do
you deal with example markup, etc. ? Are there any nifty tricks
involving diff tools to have a HTML-only version for designers and a
"technical" version for developers?
Another mechanism that comes to my mind is to use e.g. knockoutJS
which does data-binding via HTML5-like "data-bind" attributes. Then
again, I'm not too sure how one would deal with example data there.
Any input on this topic would be welcome, I'm curious what approaches
exist for this.
Thanks,
Manuel
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/KeXys7J7xP8J.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
I myself am not a designer. In a new project / team I am working, the
design part does play a key role and this is one of the main arguments
for going with lift. Being a developer who likes to be in control of
things (amongst which, how javascript gets executed, form controls
rendered etc.) I feel some kind pain with lift however, so I am trying
to see means to replicate some of that functionality / behavior with
Play.
>> I don't seem to understand, what stops u today in play from writing pure
>> HTML templates for wireframes before filling in data?
From the experience the guys I'm working with have, there's often a
need to add bits and pieces of design work when the project is already
well under way. With templating engines such as Freemarker this
becomes problematic for designers because it's kindof hard to find a
way in a jungle of expressions and loops (which you usually get when
the templates grow complicated).
So in essence, what I mean with "designer-friendly" is a system in
which the view code remains readable to folks that know mostly HTML
and CSS, but don't want to / need to get to know other constructs to
do their work.
One solution may be to work on improving a wireframe and have
developers port that to the real implementation. That being said, I
can easily imagine that the amount of effort required by this process
is directly proportional to the complexity and the amount of templates
involved. This is why I was asking about some kind of nifty diff tool
that would make that kind of work easier.
> --
> You received this message because you are subscribed to the Google Groups "play-framework" group.
Cambridge is a Template Engine for generating Markup Languages. It can be used to render web (html) pages or to generate xml documents or even for generating plain text with dynamic data in it. It can be used as an alternative to other Templating solutions for Java like JSP, Freemarker or Velocity.
What makes Cambridge different than other template engines?
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/kHqc3IjmFUMJ.