Hi Sumit,

> So what's the difference between a Handler and a Finder?

The Finder class still has the same role. It can find and instantiate
target handlers. As Resource is a subclass of Handler, it can also
instantiate target resources like today.

> The flow of the request would go through the following after this
> refactoring.
>
> Server -> Component -> Application -> Router -> Finder -> Handler
>  -> Resource -> Domain Object

No, it stil directly goes from Finder to Resource for the reason above.

> I'm trying to understand the separation-of-concern/value-add that
> each layer offers.

The extraction of Handler as a super class is just a way to clarify
roles and abstraction level changes. Handler is closer to the Uniform
interface, which is a lower-level API. Resource is closer to REST view
of things, and closer to your domain objects.

Again, the changes proposed are fully backward compatible with your
existing code. If we ever need to more radically change this design,
we would do it in a major 2.0 release. But we are not there yet :)

Hope this clarifies,
Jerome

Reply via email to