

| 
Introduction
The main features a quality web application framework needs to provide are:
- Quality components for Model, View and Controller, with integration between components
- Sessions, authentication, and authorisation
- View layer - Display helpers, javascript support, and internationalisation
- Reusable components and form handling
- Administration tools
- Other features, e.g. comet, web services
Dispatch
ORM
Template
JS lib
Auth*
Widgets
Admin
+Little stuff (i18n, comet, ws, flash, paginate, web helpers)
MVC
See intro for info on good orm/template/dispatch
Integration:
Automatic transactions
Template convenience
Dispatch
Map web calls to python code
Provide low-level access to request/response
Cookies?
Sessions, Authentication and Authorization
For convenience, I will refer to "sessions, authentication and authorisation" as auth*. A good auth* system will:
- Provide a range of session storage options - memory, database, files, encrypted cookies, etc.
- Support a range of authentication techniques - HTML forms with cookie, HTTP basic/digest, OpenID, Windows authentication, etc.
- Provide code hooks to let authentication work against arbitrary user database back ends.
- Provide a range of authorisation approaches, both coarse and granular. Permissions can be managed without modifying code.
- Provide user registration and forgotten password features.
- Be implemeneted securely, e.g. supporting lockouts.
- Have good handling of real-world problems, such as cookies being disabled.
View Layer
Display Helpers
Many frameworks have the concept of display helpers. This is a bit of a catch-all for various functionality, generally functions that can be called from templates, to help with common tasks, including:
- Separating search results over multiple pages
- Displaying once-only status messages on pages
- Formating data for output, e.g. 1000000 -> 1 Million
Looking forwards, it may be sensible to make display helpers be reusable components, although at the moment some functionality could not be implemented that way.
JavaScript Support
Most modern web applications make heavy use of JavaScript and Ajax. Support for this has two main parts:
- Use of a JavaScript library on the client. This is largely separate from the server-side framework.
- Generation of JSON from controller methods.
TBD: the details of the JavaScript library isn't really my area - please send in suggestions.
Internationalisation
TBD: this isn't really my area - please send in suggestions.
Reusable Components and Forms Handling
Reusbale Components
A framework needs to provide the following:
- A a way to package and use reusable components, comprising of template code, JavaScript and CSS resources, and server-side code.
- A useful set of components - e.g. popup calendar (see below)
- A community area for sharing components
- A means to view information on components installed on the system
Useful Components
- Popup Calender
- Rich text editor
- Autocomplete
- Editable list
- Captcha
- File upload with progress
Validation and Forms Library
The aim of a forms library is to handle form validation, with detailed error messages returned to users on failure. A common design is to build this on top of the component system, which relies on components being nestable. The requirements for such a system are:
- Generate a form, validate the response; in case of an error, display the form with inline error messages.
- Allow custom validation functions, and customisation of error messages. Needs to support validation of one field having dependencies on the value of other fields.
- Allow customisation of the appearance of the form.
- Support generation of JavaScript validation code, based on rules defined in the server, and support Ajax validation.
- Support dynamic client-side forms, e.g. grids that grow on the client, and fields that appear where certain options are selected.
- A smart, neutral default style, with icons such as: calendar, add, del, copy, paste, etc.
- Security - CSRF protection, choice validation, viewstate
Automatic Forms
- The ability to automatically generate form definitions from model code. The model needs to allow annotation to give hints to the form generator. Also, the generator should support user-defined policies for form construction.
- An automatically generated data manager, based on the model.
A framework should also support other approaches for forms support, e.g. HTML generation and htmlfill.
Administration Tools
- Package applications for deployment - can usually be done using standard language features
- Project creation from skelton
- Database management, schema evolution
- Web management interface
Development Tools
- Auto reload during development
- Error handling
Comet
- Provide a means to have long-lived connections handled in a non-blocking manner by a separate thread.
- High-level API for application to "signal" a client, calling a JavaScript function.
- Reliable support for common browsers, with a choice of transports and a strong default (no loading indicator in the browser).
- Hooks for detecting disconnected clients.
- Support "inline" deployment where everything goes through one port, and "split" deployment where the comet connections are on a different port or ip address.
Web Services
TBD: this isn't really my area - please send in suggestions.
© 1998 - 2008 Paul Johnston, distributed under the BSD License Updated:11 Feb 2008 |