--
You received this message because you are subscribed to the Google Groups "foam-framework-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to foam-framework-di...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to foam-framework-discuss+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "foam-framework-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to foam-framework-discuss+unsub...@googlegroups.com.
Does this approach really help? When thinking about it, I keep comparing it to a DAO's put() method and we've never needed a canPut() on the interface to help decorate. I just worry that this could set a precedent for splitting async foo() methods up into a sync canFoo() and async doFoo().What are you trying to accomplish with this change that can't be done by decorating the handle() method alone?
And is there an expectation that, if canHandle returns true, handleRequest always succeeds or can race conditions cause it to fail still?
On Mon, Sep 18, 2017 at 2:34 PM, 'Braden Shepherdson' via foam-framework-discuss <foam-framework-discuss@googlegroups.com> wrote:
+1Decoration is power, and this makes decoration much more flexible.Braden
On Mon, Sep 18, 2017 at 1:04 PM Mark Dittmer <mark.s....@gmail.com> wrote:
tl;dr: This email sketches a proposal to turn Handler.handle() into synchronous Handler.canHandleRequest() and asynchronous Handler.handleRequest(). If you use foam.net.node.Server and/or foam.net.node.Handler please respond with "This affects me!". Also, any feedback you have is much appreciated :-)--foam.net.node.Handler.handle() conflates two things:This makes the interface difficult to decorate, because a decorator cannot ask its delegate whether or not the delegate should handle the request, but not ask it to handle it just yet. This is useful for, e.g., a caching decorator.
- Can this Handler handle this request? (synchronous response value);
- Handling of the request (usually asynchronous flow).
I propose that handle() become a canHandleRequest() ? handleRequest() : noop(). Handlers can be changed without touching foam.net.node.Server to start. Then we can port Server and add a deprecation warning to handle(). Then handle will be removed.Thoughts on this change?//Mark
You received this message because you are subscribed to the Google Groups "foam-framework-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to foam-framework-discuss+unsubscri...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "foam-framework-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to foam-framework-discuss+unsubscri...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to foam-framework-discuss+unsub...@googlegroups.com.
Responded inline.
To unsubscribe from this group and stop receiving emails from it, send an email to foam-framework-discuss+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "foam-framework-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to foam-framework-discuss+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Responded inline.
To unsubscribe from this group and stop receiving emails from it, send an email to foam-framework-discuss+unsubscri...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "foam-framework-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to foam-framework-discuss+unsubscri...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "foam-framework-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to foam-framework-discuss+unsubscri...@googlegroups.com.
There are unresolved design questions. Are you planning to address them or stick to your original design?
To unsubscribe from this group and stop receiving emails from it, send an email to foam-framework-discuss+unsub...@googlegroups.com.