Web2py must stay a python programming framework, and I love the ease
it porvides for a programmer. However, when I want to have great
looking pages re layout etc my design skills are a bit less. So I want
help from somebody who can do great stuff with html, css and jquery
stuff and they prefer tags and javescripts etc, and are less skilled
with python, the part we are great in (and web2py helps us too look
great). And the {{=<insert your favourite pythone code here>}} looks a
bit funny to them, and they cannot use it to generate mockups that we
can easily feed into our web2py app - esp if you have to do some
conversions back and forth.
Hence the reference to Tapestry, I'm not quite aware how things are
now, but when I worked with it they had both a good framework for the
programming part and allowed the html guys to work with tags that
their tools understand. So they could produce something like the very
simple:
<html>
<head>
<title>Tutorial: HelloWorld</title>
</head>
<body>
<p>The current data and time is: <strong><span jwcid="@Insert"
value="ognl:new java.util.Date()">June 26 2005</span></strong></p>
<p><a href="#" jwcid="@PageLink" page="Home">refresh</a></p>
</body>
</html>
The jwcid attributes makes the magic happens, where the html tags
become components that can have certain behaviour. In the example the
@insert will replace the mock value of "june 26 2005" with a realdate.
And yes, the @insert could perhaps be done by some javascript stuff
but that is some other discussion.
When they render the file, it looks good in their tool and gives a
sence of how the page will look like. When rendered with the framework
it looks even better, cause of all the dynamic stuff that happens and
data from the db is stuffed into that template.
The current custum forms are rendered with
{{=form.custom.begin}}
{{=form.custom.widget.somefield}}
{{=form.custom.end}}
rendering is nice when run in web2py, but doesn't look like html
anywhere else. This might be more html-friendlier for the source:
<form web2py="form.custom.begin">
<input type="text" web2py="form.custom.widget.somefield">
</form>
(the form.custom.end is implied by the closing form tag linked to
form.custom.begin, and if the widget for somefiled is say a radiobox,
it will replace the current used text input tag)
This way also tables with specific rendering can be made, making use
of the power of the framework to make it into the live site and by
allowing mock data in the html files so the designer will have some
feeling how it looks like.
This is not a must, more something I saw somewhere else and what i
liked. For me this does not make web2py into something different what
it is and/or what it should be. It may even be a plugin or so for
web2py.