Here is a summary of updates I have made last Friday and today.
* Moved KeyValueAccess from MiddleKit to MiscUtils and renamed it to
NamedValueAccess. The move was due to the fact that KeyValueAccess turned
out to be more generally useful than originally anticipated. The rename was
appropriate given that valueForName() was the most popular method.
* There is a new sidebar/navigation bar for the examples. The previous top
links and bottom links have been subsumed by this. The nav bar includes all
the goodies like examples, contexts, exits, versions, etc. This was
accomplished via the new SidebarPage class which both AdminPage and
ExamplePage inherit. The new look is cleaner, more professional and, I
think, easier to navigate.
* Created Adapter, a subclass of Configuration. Made OneShotAdapter a
subclass thereof, with the others to follow. This is part of an adapter reorg.
* OneShotAdapter has a config file in Configs/. When capturing output,
provided option to word wrap it so the table doesn't get so wide.
* A 'transaction' global variable is passed into servlet scripts as a hook
for the script to get information about the request that caused it to load.
This should be rarely needed, especially with Jay's recent addition of
__init__.py support of contexts, where you can do special initialization.
But in general, hooks are a good thing if they don't clutter the code or
mangle the architecture. So it's there.
* Added Testing/ to MiscUtils. Added TestDataTable.py.
* Changed Application's SessionTimeout to be expressed in minutes instead
* Revamped Application's session sweeper method to be cleaner/tighter.
For your review/understanding:
* The OneShot adapter loads everything (WebKit, plug-ins, contexts, the
target servlet) once, serves the request and then exits. It is useful when:
* developing web sites
* developing WebKit and plug-ins
* running in a CGI-like mode rather than an app server mode if you so desire
* NamedValueAccess is a useful mix-in class that allows you to query
objects like: obj.valueForName("account.address.city"). Each field could be
a method such as obj.account() or attribute such as obj.account or
obj._account. The valueForName() method will follow the hierarchical dot
notation through objects and dictionaries.
This kind of querying can be useful when setting up templates. It's also
the basis for setting up the columns that get stored in the access log. The
config file for Application stores these names and then runs through them
And there's even decent documentation embedded in the source file and a
test suite to boot. I've also exercised this class in a few sites, so it's
advertised feature set are stable.
On my short term radar:
[ ] FormKit/
[ ] Page: Add features for style sheets.
[ ] Handle unknown session ids with a specific page.
[ ] Fix ExamplePage to handle Plug-ins generically.
[ ] Add Last-modified: to generic files that get served up.
[ ] When I do a CVS co on FreeBSD, I get 'cache', but not 'Cache'
[ ] Disk based session storage.
Having lots of fun,