Re: Are Application Services = Controllers
bodrin <[email protected]>
| Newsgroups | gmane.comp.programming.domain-driven-design |
|---|---|
| Message-ID | <CAMa=kcPHhV_iqKr=Qndou4WHGGde9rHOmB-2y9LQdhhOC5GSxQ@mail.gmail.com> |
Oh, seems that I have mixed command handlers with controllers :) So you have a REST Controller (presentation layer) which only dispatches to multiple command handlers = application services (application layer). Then the main difference is that Controllers are part of some presentation layer while application services are from the application layer so the application services doesn't know about controllers and the controllers are (re)using application services ... and you of course must not put application service code into the controllers.. On Tue, Sep 17, 2013 at 5:13 PM, Greg Young <[email protected]> wrote: > ** > > > A controller can handle many use cases (think a controller that supports > get post and delete) > > Authorization is not a use case. It is a cross cutting concern. There is > logically one use case per command handler / application service. > > Greg > > > On Tuesday, September 17, 2013, bodrin wrote: > >> ** >> >> >> >There is one application service per use case >> An application service can serve multiple use-cases!?.. e.g. >> authentication/authorization >> >> >controllers are not matched to use cases >> Sometimes even a single command can match an use case, so seems like >> there can be no difference at all... >> >> >> On Tue, Sep 10, 2013 at 1:32 PM, Greg Young <[email protected]>wrote: >> >>> ** >>> >>> >>> "There is one application service per use case while controllers are not >>> matched to use cases. That is a fairly large difference." >>> >>> >>> On Mon, Sep 9, 2013 at 6:50 PM, <[email protected]> wrote: >>> >>>> ** >>>> >>>> >>>> What do you mean? >>>> >>>> >>>> --- In [email protected], <gregoryyoung1@...> wrote: >>>> >>>> One per use case is an example. >>>> >>>> >>>> On Thursday, September 5, 2013, wrote: >>>> >>>> ** >>>>  >>>> >>>> Is there a difference between Application services and Controllers? >>>> >>>> >>>> -- >>>> Le doute n'est pas une condition agréable, mais la certitude est >>>> absurde. >>>> >>>> >>> >>> >>> -- >>> Le doute n'est pas une condition agréable, mais la certitude est >>> absurde. >>> >>> >> > > -- > Le doute n'est pas une condition agréable, mais la certitude est absurde. > > >