Divmod Nevow¶
[[PageOutline(2-3,Contents)]]
[[Image(http://divmod.org/tracdocs/nevow_whtbck.png, left)]]
Nevow - Pronounced as the French ‘nouveau’, or ‘noo-voh’, Nevow is a web application construction kit written in Python. It is designed to allow the programmer to express as much of the view logic as desired in Python, and includes a pure Python XML expression syntax named stan to facilitate this. However it also provides rich support for designer-edited templates, using a very small XML attribute language to provide bi-directional template manipulation capability.
Nevow also includes Formless, a declarative syntax for specifying the types of method parameters and exposing these methods to the web. Forms can be rendered automatically, and form posts will be validated and input coerced, rendering error pages if appropriate. Once a form post has validated successfully, the method will be called with the coerced values.
Athena - Finally, Nevow includes Divmod Athena, a two-way bridge between Javascript in a browser and Python on the server. Divmod Athena is compatible with Mozilla, Firefox, Windows Internet Explorer 6, Opera 9 and Camino (The Divmod Fan Club). Event handlers can be written in pure Python and Javascript implementation details are hidden from the programmer, with Nevow taking care of routing data to and from the server using XmlHttpRequest. Athena supports a widget authoring framework that simplifies the authoring and management of client side widgets that need to communicate with the server. Multiple widgets can be hosted on an Athena page without interfering with each other. Athena supports automatic event binding so that that a DHTML event (onclick,onkeypress,etc) is mapped to the appropriate javascript handler (which in turn may call the server).
Download¶
- Stable: Latest release - 0.9.31
- Trunk: svn co http://divmod.org/svn/Divmod/trunk/Nevow/ Nevow
Features¶
- XHTML templates: contain no programming logic, only nodes tagged with nevow attributes
- data/render methods: simplify the task of separating data from presentation and writing view logic
- stan: An s-expression-like syntax for expressing xml in pure python
- Athena: Cross-browser JavaScript library for sending client side events to the server and server side events to the client after the page has loaded, without causing the entire page to refresh
- formless: (take a look at formal for an alternate form library) For describing the types of objects which may be passed to methods of your classes, validating and coercing string input from either web or command-line sources, and calling your methods automatically once validation passes.
- webform: For rendering web forms based on formless type descriptions, accepting form posts and passing them to formless validators, and rendering error forms in the event validation fails
Documentation¶
- The Nevow Guide An introductory guide covering Nevow basics (Getting Started, Object Traversal, Object Publishing, XML Templates, Deploying Nevow Applications)
- Nevow API
- Meet Stan: An excellent tutorial on the Nevow Document Object Model by Kieran Holland
- Twisted Components: If you are unfamiliar with Interfaces and Adapters then Nevow may not make much sense. This is essential reading.
- Error Handling: How to create custom error (404 and 500) pages
- Form Handling (A summary of Nevow form handling techniques) * JavaScript WYSIWYG Editors integration with Nevow/formal
- deployment
- emacs
- Putting Nevow Page under Apache Proxy
- Using Nevow with Genshi templates: original and dynamic
- Tutorial: Using Storm with Nevow
- Nevow & Athena FAQ
Bleeding Docs - SURGEON GENERAL’S WARNING: Reading the docs listed below pertain to code that has not yet been released and may cause Lung Cancer, Heart Disease, Emphysema, and Pregnancy complications.
- Context Removal - Conversion steps for moving from
context
-based Nevow code tocontext
-less code.
Examples¶
To run the examples yourself (Source in [source:trunk/Nevow/examples]):
richard@lazar:/tmp$ cd Nevow/examples/
richard@lazar:/tmp/Nevow/examples$ twistd -noy examples.tac
2005/11/02 15:18 GMT [-] Log opened.
2005/11/02 15:18 GMT [-] twistd SVN-Trunk (/usr/bin/python 2.4.2) starting up
2005/11/02 15:18 GMT [-] reactor class: twisted.internet.selectreactor.SelectReactor
2005/11/02 15:18 GMT [-] Loading examples.tac...
2005/11/02 15:18 GMT [-] Loaded.
2005/11/02 15:18 GMT [-] nevow.appserver.NevowSite starting on 8080
2005/11/02 15:18 GMT [-] Starting factory <nevow.appserver.NevowSite instance at 0xb6c8110c>
... visit http://localhost:8080 and you’ll begin to appreciate the possibilities!
Help / Support¶
You will find plenty of experts on the mailing lists and in the chatrooms who will happily help you, but please make sure you read all the documentation, study all the examples and search the mailing list archives first. The chances are that your question has already been answered.
- Mailing list: The twisted-web and divmod-dev mailing list pages have subscription instructions and links to the web based archives.
- IRC: Nevow developers and users can be found on Freenode in #twisted.web
- Blogs: dialtone, fzZzy, Tv
- Tickets (More tickets)
Index of Nevow documents¶
- Getting started with Divmod Nevow
- Nevow Tutorial: part 4
- Form Handling (A summary of Nevow form handling techniques)
- Error Handling
- Formless
- Authentication and Authorisation
- Context Removal
- Nevow Guard
- Unit Testing
- Putting Nevow Page under Apache Proxy
- Reverse Proxy
- Divmod Athena
- Divmod Athena
- Athena FAQ
- Nevow & Athena FAQ
- Demo: news edit
- Demo: results
- Tutorial: Using Storm with Nevow
- A possible approach with Nevow and Storm/twisted-integration