2004-02-26 21:55:02 +01:00
|
|
|
PyProtocols extends the PEP 246 adapt() function with a new "declaration
|
|
|
|
API" that lets you easily define your own protocols and adapters, and
|
|
|
|
declare what adapters should be used to adapt what types, objects, or
|
|
|
|
protocols. In addition to its own Interface type, PyProtocols can also use
|
|
|
|
Twisted and Zope's Interface types too. (Of course, since Twisted and Zope
|
|
|
|
interfaces aren't as flexible, only a subset of the PyProtocols API works
|
2005-05-23 12:27:02 +02:00
|
|
|
with them. Specific limitations are listed in the documentation.)
|
PEAK is the "Python Enterprise Application Kit". If you develop "enterprise"
applications with Python, or indeed almost any sort of application with
Python, PEAK may help you do it faster, easier, on a larger scale, and with
fewer defects than ever before. The key is component-based development, on a
reliable infrastructure.
PEAK is an application kit, and applications are made from components. PEAK
provides you with a component architecture, component infrastructure, and
various general-purpose components and component frameworks for building
applications. As with J2EE, the idea is to let you stop reinventing
architectural and infrastructure wheels, so you can put more time into your
actual application.
But PEAK is different from J2EE: it's a single, free implementation of
simpler API's based on an easier-to-use language that can nonetheless scale
with better performance than J2EE.
2004-02-26 21:37:43 +01:00
|
|
|
|
2004-02-26 21:55:02 +01:00
|
|
|
If you're familiar with Interface objects in Zope, Twisted, or PEAK, the
|
|
|
|
Interface objects in PyProtocols are very similar. But, they can also do
|
|
|
|
many things that no other Python interface types can do. For example,
|
|
|
|
PyProtocols supports "subsetting" of interfaces, where you can declare that
|
|
|
|
one interface is a subset of another existing interface. This is like
|
|
|
|
declaring that somebody else's existing interface is actually a subclass of
|
|
|
|
the new interface. Twisted and Zope don't allow this, which makes them very
|
|
|
|
hard to use if you're trying to define interfaces like "Read-only Mapping"
|
|
|
|
as a subset of "Mapping Object".
|