From: Jeremy Lowery <jermnsar@ho...> - 2003-03-06 02:28:42
From: Geoffrey Talvola <gtalvola@...>
I'm thinking that rather than try to share servlets (which I would
be very difficult to re-use unless the application is identical), it
more sense to share "components" (such as a login component or a site
navigation component) that provide some functionality and are designed
_used_ in servlets with a minimum of fuss. Whether those components are
mixins or simply helper classes, I'm not sure.
I may have a page that needs to display a login component, a tree
component, and news of the day. I ought to be able to grab those 3
components and easily assemble them in my own servlet. I wouldn't
find a reusable servlet that provides this combination.
I am inclined to agree. Using a component to include fine-grained
functionality for servlets to use would provide a great level of
flexibility. For business logic (any many other things), I believe that
object composition (helper classes) makes client code more easily
understandable than inheritance.
(stolen from many other systems) Interfaces could formalize the API of
components for plug-in play functionality. I've been looking at the
Zope3 source a bit and this is going to be their entire new architecture
logic. Seems that DC and Zope developers learned, as many others have,
that providing all functionality thru inheritance makes a hard-to-use
Probably at first, the components would be instantainiated directly by
the servlets, but using an ORB (like the ServletFactory for servlets)
would add more framework, possibly allowing the use of objects from
other systems (for integration purposes) like PYRO, CORBA, etc or making
webware distributed. Of course, one of these other architectures could
be used directly in Middleware.
Jeremy S Lowery
Get latest updates about Open Source Projects, Conferences and News.