[Twisted-web] Writing a web application - how to make twisted/nevow "look good"

Paul Moore twisted-web@twistedmatrix.com
Mon, 09 Feb 2004 20:42:56 +0000


I've been playing with twisted, and lately nevow, for a while now. My
idea is that I'd like to be able to develop a replacement for an
in-house database application, which is written in Oracle's HTML DB.

The application code side of things is easy - it's a pretty simple
application, with a few screens of tabular data (grab data from a
SQL table, and display it in a HTML table), and corresponding update
and "create new entry" forms. Plus delete buttons. I've not written
the code in all its glory yet, but it's not going to be taxing.

The problem is getting a good look and feel for the whole thing. My
design skills are pretty ropey at best, and worse still when I'm
coding HTML. But Oracle HTML DB comes with built-in flashy-looking
designs - little "task list" boxes with rounded corners, tabbed
webpages, etc. If I can't produce a nice look and feel, my Twisted
code is going to look clumsy and amateurish in comparison - even
though from a technical point of view, it may be more responsive, more
maintainable, etc etc. But HTML DB applications *look* good, even when
developed by someone like me, with the design skills of a prune.

I know all the nice look comes from clever use of images, tables, CSS
etc. I've read the page source for some of the HTML DB stuff, and it's
an unreadable mess (probably because it's generated). So stealing it
isn't really a possibility :-)

I was wondering - is there anywhere an example of an open source
Twisted/Nevow application which focuses strongly on look & feel, and
which can usefully be used as a source of sample code?

Alternatively, a nice idea might be a "widget library" in Nevow -
little classes which can be used as higher level building blocks in
stan. An example might be something like:

    document = ..., headed_list("The title")["line1", "line2"], ...

The "headed list" could render as a table - something like

    <div>
        <table>
	    <tr style="background-color: yellow"><td>The title</td></tr>
	    <tr><td>line1</td></tr>
	    <tr><td>line2</td></tr>
        </table>
    </div>

(I told you my design skills weren't much good :-)) The idea being
that you can build your pages at a higher level than raw HTML layout.

And at the other extreme, I guess it should be possible to define a
"page template", which defines a site's overall look and feel - tabbed
format, left hand navigation bar, whatever.

OK, I'm rambling now. I haven't the skill to build anything like this,
but I'd *love* to be able to use such a thing.

Any suggestions would be gratefully accepted!

Paul.
-- 
This signature intentionally left blank