On Apr 17, 2006, at 12:33 PM, Andrew Plotkin wrote:
On Mon, 17 Apr 2006, Peter Wagener wrote:
Any updates to the SVG document must be done through the
UpdateManager's runnable queue.
This comes up so often that I wonder if it's worth putting low-cost
error checking in all the DOM update functions.
I like this idea. But instead of manually modifying the existing
code, you can also do this sort of thing via Aspect-Oriented
Programming. Create an aspect that checks current thread is the
update manager. Then weave that aspect into all the DOM-updating
functions.
I did something similar on a J2EE project to verify developers were
following certain rules. The rule that comes to mind from that
project is ensuring no one was creating unmanaged threads in EJB's.
The "development" build included these aspects, whereas the
production one did not. Initially some folks worried about having
code running in development that wouldn't be included in production,
but I saw that has being less of a concern than having inexperienced
programmers trying to grok EJB's and still deliver products.
So if the Batik community wanted to do a little non-invasive AOP,
maybe there could be a "beginner" build including helpful aspects
that check certain rules, and then another clean version that does
not include the aspects. Just an idea.
Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]