So Anders Pearson made a
very small application called Tasty that does tagging. Well, I don't
know how small it is, but it's a kind of partial application, in
that the application alone speaks only JSON; it's only interesting
when coupled with other applications. Which (as he actually mentions)
is just the kind of application I was talking about in my post on
little apps.
It also brings up the issue: how do you make a system of little
applications workable? From a SQLObject search RSS feed I came upon
this Plone post
where Tasty is mentioned, and the idea of porting it to an alternate
backend to make it easier for Zope/Plone people to use (it's currently
a TurboGears app).
I, of course, would propose that instead they (for some vague
definition of "they" that could include any number of people) should
make it easy to embed the application into Zope. I don't think it
needs to be a lot of work:
- Make CherryPy applications well behaved WSGI applications, so that
multiple such applications can easily live in the same process, and
so that programmatic configuration is easy. This requires changes
to CherryPy itself, so this is perhaps the hardest step.
- Make a Zope WSGI Server Product (it's a server because it makes Zope
a server/container for other WSGI applications). This shouldn't be
hard programming. The only hard part that I see is how to specify
what Python function (or instance) to call. Paste Deploy is one way to do that; other ways
are possible, maybe just adding a set of key/value pairs to the
product instance's properties, which would actually be nicely
complimentary to Paste Deploy configuration files, which are just
the same thing in a text file.
- After those are done everything should work, but to clean it up make
it easy to build specialized Products that build on the WSGI
Product, so that a Tasty Product will have its own name and
constrained configuration. I bet you could make this doable with
like one text file and one update to the setup.py file. Maybe
one other Python file is required, but only maybe.
- Use Zope Basket for
all the products, since TurboGears and Tasty are already eggs, and
entry points are a nice way for the WSGI Product to find
applications. It's an easy fit.
With these things in place it could be possible for every TurboGears
application -- and Wareweb, Pylons, and other frameworks -- to be
instantly available to all Zope users, only an easy_install away.
And none of what I've described requires radical rethinking or
rewriting of anything.
I think that's a whole lot more interesting and useful than
reimplementing and forking a working application in order to change
frameworks and backends.