Thursday, October 13, 2005

Guess What! Divmod Nevow 0.5 Release!

It's been a long time since one of these (very roughly, 17660815 seconds. For those of you following along at home:

>>> from epsilon import extime
>>> then = extime.Time.fromISO8601TimeAndDate('2005-03-23T18:47:39')
>>> now = extime.Time()
>>> now.asPOSIXTimestamp() - then.asPOSIXTimestamp()
17660815.259869099
>>>
), and we've got a lot of great new stuff to show for the wait. Skipping a lot of things, because they'd make this post way too long, we've got:
  • We've given LivePage a significant overhaul. We're not done in this area yet, though: watch for changes here in the next release.
  • A lot of code has been updated to work with zope.interface and Twisted 2.0. Nevow 0.5 requires each of these.
  • Formless no longer adds __nevow_carryover__ to the redirect URL unless it actually needs to carry values over to the next request.
  • Improved documentation and more example applications, including examples for:
    • Working with Fragments
    • Using macros
    • Integrating with Axiom
  • A JavaScript Object Notation serialization and parsing has been added, to allow more complex objects (still no duplicate references or user-defined classes, though) to be used with LivePage
  • LiveEvil, the previous implementation of LivePage, has been removed
  • Guard has been expanded to more easily support persistent (eg, saved in a database) sessions
  • Bugs have been fixed in a lot of areas:
    • VirtualHostList
    • Behavior relating to quoting of '/' in URL segments
    • Corrected XML namespace prefixes in generated output
    • The default 404 page is now well-formed XML
    • The radio input now correctly selects the default value and its display elements line up in a more aesthetically pleasing manner
    • Remove duplicate request-finishing in the unhandled exception error path
    • Fixed macro/xmlfile incompatibility
    • Fixed a huge object/memory leak in applications that did not re-use all their Page instances to serve each request
    • Fixed rendering of Fragments so as not to interefer with their parent's rendering process
    • Fixed rare Deferred/tag/slot-filling interaction which caused some slots to be filled with empty values instead of useful content

A word about livepage

Nevow 0.4.1 provided a better-than-ajax feature known as LivePage, via the nevow.livepage.LivePage class. This was a replacement for an older implementation, nevow.liveevil.LiveEvil, which was deprecated in 0.4.1. Nevow 0.5 removes LiveEvil and augments LivePage with a bunch of new features, but also some API incompatibilities. Where possible, backwards compatibility has been maintained, but it is likely that any extensive LivePage applications will be broken at least a little bit by 0.5. Of course, there's a lot of other changes in Nevow that will probably jar such applications anyway. Most people whom this affects have been in the IRC channel or on the mailing list and already know this.

What's not as well known yet is that the next release of Nevow will likely provide still another new implementation of the same idea. This time nevow.athena.LivePage will be the preferred API. Where the LivePage implementation in 0.5 encourages the definition of JavaScript functions in the server code using Python, nevow.athena.LivePage encourages a much stricter separate of client and server concerns. It also provides an API for asynchronous data passing between client and server (initiated by either side), rather than the current API for passing code from the server to the client to be executed.

Another area of upcoming change will be form generation. formless is capable of some wonderful things, but some of its limitations are becoming clearer. A simpler system is just around the corner. Look for it in the next release -- which will be in much less than 17660815 seconds from now.

Download Nevow 0.5 or visit the project page

No comments:

Post a Comment