Hello everyone in Twisted land,
This is an experimental Woven View refactoring that I have been working
on for the past two weekends. What does it do?
* Uses a flat list of outstanding DOM nodes instead of recursion to
keep track of where Woven is in the page rendering process
* Removes View's dependency on DOMTemplate as a base class, in
preparation for deprecation of DOMTemplate (all of the same semantics
are now directly implemented in View). As a result, View has no base
classes, making the inheritance chain cleaner.
* Stores the namespace stacks (model, view, and controller name lookup
chain) in the View directly, and each widget gets an immutable
reference to it's position in the lookup chain when it is created,
making re-rendering Widgets more reliable
* Represents the namespace stacks as a cons-like tuple structure
instead of mutable python lists, reducing confusion and list-copying;
instead of copying the current stack lists each time a Widget is
created, it just gets a reference to the current tuples for each of the
What does that mean?
* The tracebacks are far shorter now, since we're no longer recursing
deeply into the DOM tree
* Namespace stack behavior is less buggy now; some of the outstanding
mysterious bugs regarding rendering Widgets that have a Deferred model
should hopefully go away
* View has no base classes now, making the inheritance tree much
What do I need before I check it in?
* Feedback! If you have a Woven application, please apply this patch
and let me know if anything breaks. There are no API changes, and
behavior should be the same (unless you were relying on the older,
possibly buggy behavior; this shouldn't be the case)
Assuming all goes well, I will check this in this weekend. Once I do,
it paves the way for further cleanup of the Woven codebase. Onward and
upward towards stable Woven!