Sidnei da Silva wrote:
On Mon, Dec 12, 2005 at 09:19:39AM -0500, Jim Fulton wrote:
| >| Note that the Z3 publication framework splits functionality
| >| currently provided by the Z2 publisher into a publisher and a
| >| publication object.  An initial step might be top come up with
| >| a Z2 publication object that works with the Z3 publisher.

Here's a status report:

I've started a Z2 publication object in the 'publication-refactor'
branch of Zope 2.

Awesome!

I am not 100% sure this is what you had in mind, but basically i've
broke down the 'publish' method from ZPublisher.Publish into the
methods of IPublication, and it seems to have mapped quite well with
some minor exceptions.

Cool. It should.  IPublication was designed by insoecting all
the odd hooks in Zope 2.

I haven't gotten around to implementing the traverseName method, which
will need some deep surgery on ZPublisher.BaseRequest.

Now, what I have in mind moving forward is to replace the code in
ZPublisher.Publish and ZPublisher.BaseRequest to use the Zope 2
IPublication instead of duplicating code once I'm done with
implementing the interface.

My only fear so far is that there might be some issues with the
request object itself being not 100% backwards compatible, but I think
we can have backwards compatibility implemented as an adapter from the
Zope 3 request to Zope 2 request.

Possibly.  Note that the request itself is pluggable.  Zope 3 has a
notion of request factories.  When you set up a particular server,
you can specify which request factory is used.  It would be nice though
of Zope 2 and Zope 3 requests could be handled by the same server
(host/port).

Adaptation may be a good way to start, although arranging for the
adaptation to happen could get interesting.

It might be better to see if we can come up with a request that provides
both Z2 and Z3 request APIs, if possible and then start a process of
deprecation of features we don't want in the future.  This might
be easier and simpler than adaptation.

How does that sound?

Sounds like a great start.

Later Sidnei da Silva wrote:
> Another update:
>
> On Mon, Dec 12, 2005 at 04:18:48PM -0200, Sidnei da Silva wrote:
> | I haven't gotten around to implementing the traverseName method, which
> | will need some deep surgery on ZPublisher.BaseRequest.
>
> This is done now.

cool

> | Now, what I have in mind moving forward is to replace the code in
> | ZPublisher.Publish and ZPublisher.BaseRequest to use the Zope 2
> | IPublication instead of duplicating code once I'm done with
> | implementing the interface.
>
> This is done too.

Great.

Jim

--
Jim Fulton           mailto:[EMAIL PROTECTED]       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org
_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to