Pretty by default
Ok, I've done the rounds now. All of the python web frameworks (and
possibly all of the open source ones - that's a bit too large a task
for lil ol me) are failing miserably. We're almost at 2010 people, and
I'm NOT HAPPY.
that almost any web application needs. Obviously we're talking about a
90/10 rule here - every now and then the web app you're trying to
build is going to be a bit weird, and so you'll have to do some extra
work, maybe install a plugin, probably write some stuff yourself. But
the idea is that the web framework covers off the 90. More
importantly, the idea is that it covers it off *well*. There is no
point having a web framework full of crappy implementations, because
it just means that either a) shit sites get released with it or b)
people end up doing so much work installing plugins or whatever that
they may as well have started from scratch. In the old days (2007) we were still trying to figure out a lot of the
basic ideas about how to integrate javascript into sites, how to deal
with CSS, authorization etc. We've done that now, we know how to do a
decent job of it. Yet all of the web frameworks are busy pretending as
though nothing has happened. Along the same vein, a great deal about
UI has become standardized over the last couple of years - we've got a
whole library of widgets that don't come with HTML by default, but
which are vital for a good implementation of many sites. And then there's design. Maybe it was ok in the 90s to have the first
run at your web app come out looking like something carefully targeted
at NCSA Mosaic, but that's not the case any more. We're in a hurry, we
have a lot of solid apps to put together, and many of them are
in-house or administrative applications that don't require the
services of a graphic designer (not that they wouldn't benefit, as we
constantly tell our customers, but there's no budget so that's that).
The web frameworks really need to step up here, because at the moment
the stuff they're pushing out by default looks like garbage, and worse
there's no reason for it to be so. So, how specifically are we failing? let me iterate the ways:
Client-side form validation
This is no longer a debate. Yes, you must validate your data
server-side, always. But we're in 2009 now, there is almost no
validation that you should not be able to perform on the client side,
including validation that has to make callbacks to the server to
verify (like username availability). It's too easy to get this stuff
wrong, it needs to be right there in the framework. Widgets Calendar selectors, themeable select widgets, wysiwyg textareas, tag
entry boxes, upload fields with progress indicators, shuttles, ratings
controls - all of this and more needs to be in there by default with
appropriate validation. Standard UI widgets like accordians, tabs,
modal dialogs, and basic charting all need to be in there as well. Form capabilities
Forms need to be able to be specified in some useful programatic way,
rather than spending your life screwing around with markup. Markup
should be easily doable in the event that one or two forms need
special work. Validation needs to integrate with the client side
automatically - an Email() validation should be validated in the same
way both client and server side (without ajax callbacks unless
necessary). A variety of form modifiers need to be in by default: Duplicate/remove form sections (repeaters)
Show/Hide form sections on conditions (including automatic validation
management) In addition, the web framework should automatically and transparently
implement XSRF defenses. Identity sessions
(see http://phirate.posterous.com/the-complete-identity-session-checklist
for a starter list). There is no excuse for not getting this stuff
right anymore, all of the listed requirements should be in there and
set to secure settings by default. Icons Icons are recognized as a vital part of the UI interface now. All web
frameworks should come with an iconset that covers the basic web
tasks, and use those icons appropriately within widgets. There's no
excuse for this, web app interfaces that are full of nothing but text
are difficult to read, it's not a debate, it's a fact, fix it. Buttons I don't care how pretty the default buttons in Safari on OSX are,
they're not good enough. Designers have gone out there and solidly
proven that you need at least three classes of form button (accept,
should be greenish, reject, should be redish, cancel, should be
greyish). If the web framework doesn't supply a way of specifying
those buttons in its forms, if it doesn't provide the CSS and
javascript necessary to make those buttons appear using simple markup
and degrade gracefully, then it fails. Design Finally, every damn thing about the framework needs to use a
consistent CSS schema. This schema should be easy to read and modify,
and may optionally require the use of a basic grid framework. Some
widgets, such as charts, that may need non-CSS configuration related
to their look and feel should provide configuration files for this.
There are a million other things that need fixing, but this is a start
and at least would get us to the point where we're not looking like a
bunch of rank amateurs. Quick note: If you're thinking of posting a comment that involves the
word "plugin" (or for pylons people, "template"), just don't. I don't
care, plugins are for optional extras, not core-critical things. Quick note #2: This post is not entitled "Beautiful by default".
Beautiful is what you get when a talented designer does their thing on
your code. Pretty is the best we aim for by default.

