moving document handlers to session

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

moving document handlers to session

Philippe Marschall
Hi

I hope an can attend the Pharo Sprint at Feb 18./19. and repurpose it
to hack on Seaside. One thing I'd like to do is moving the document
handlers from registry to session.

Pros:
 * simple
 * adding a document handler no longer potentially expires a session
 * expiring a session expires all it's document handlers
 * session tracking code becomes much simpler

Cons:
 * #urlXXX methods on WARenderContext only work with sessions (a
fallback could be added in theory)
 * #urlXXX methods on WARenderContext need to become class extensions
of the Seaside-Session package
 * not really clean framework-framework Endlösung

Cheers
Philippe
_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
Reply | Threaded
Open this post in threaded view
|

Re: moving document handlers to session

Julian Fitzell-2
Thinking totally off the top of my head, but what if it was implemented as a filter? A few helper methods on WARequestHandler (or subclasses) could add an instance if it's missing and then add the document and return a URL...

Julian

On Sun, Jan 22, 2012 at 1:57 PM, Philippe Marschall <[hidden email]> wrote:
Hi

I hope an can attend the Pharo Sprint at Feb 18./19. and repurpose it
to hack on Seaside. One thing I'd like to do is moving the document
handlers from registry to session.

Pros:
 * simple
 * adding a document handler no longer potentially expires a session
 * expiring a session expires all it's document handlers
 * session tracking code becomes much simpler

Cons:
 * #urlXXX methods on WARenderContext only work with sessions (a
fallback could be added in theory)
 * #urlXXX methods on WARenderContext need to become class extensions
of the Seaside-Session package
 * not really clean framework-framework Endlösung

Cheers
Philippe
_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev


_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
Reply | Threaded
Open this post in threaded view
|

Re: moving document handlers to session

Philippe Marschall
2012/1/22 Julian Fitzell <[hidden email]>:
> Thinking totally off the top of my head, but what if it was implemented as a
> filter? A few helper methods on WARequestHandler (or subclasses) could add
> an instance if it's missing and then add the document and return a URL...

A filter on session? Yes that should work. That has the advantage that
session doesn't first have the check whether the request is for a
document handler. It also gives us a bit more parallelism because it's
outside the session lock. Additionally you can override
#initializeFilters and not add it if you don't need it. Registering
the document handler gets a bit more complicated though because you
have to find the right filter on session.

Cheers
Philippe
_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
Reply | Threaded
Open this post in threaded view
|

Re: moving document handlers to session

Julian Fitzell-2
On Sun, Jan 22, 2012 at 6:11 PM, Philippe Marschall <[hidden email]> wrote:
2012/1/22 Julian Fitzell <[hidden email]>:
> Thinking totally off the top of my head, but what if it was implemented as a
> filter? A few helper methods on WARequestHandler (or subclasses) could add
> an instance if it's missing and then add the document and return a URL...

A filter on session? Yes that should work. That has the advantage that
session doesn't first have the check whether the request is for a
document handler. It also gives us a bit more parallelism because it's
outside the session lock. Additionally you can override
#initializeFilters and not add it if you don't need it. Registering
the document handler gets a bit more complicated though because you
have to find the right filter on session.

Could be session or application in theory, but yeah, our distribution could set it up on session. Make the query key configurable and someone could put them anywhere. 

That finding-a-filter thing really is a bit annoying... 

Julian

_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev