5 Replies Latest reply on Nov 24, 2010 12:39 AM by Claudiu Ursica

    Cairngorm 2

    simplesid

      In which layer of MVC design pattern does the cairngorm command class come? i.e. Does it come under the 'Model' Layer of the MVC or the 'Controller' ?

      Sorry if this question seems pretty stupid.

      Thanks!

      Sid

        • 1. Re: Cairngorm 2
          Claudiu Ursica Level 4

          Controller.

          C

          • 2. Re: Cairngorm 2
            simplesid Level 1

            Thanks for the answer.

            If it comes under the controller layer, then where should i be writing my business logic? (If i am not using any more design patterns)

            Thanks!

            Sid

            • 3. Re: Cairngorm 2
              Claudiu Ursica Level 4

              Well I did said copntroler because you ask in the MVC context, however nobody

              stops you from having a command package on it's own where to put commands. The

              controller only maps the events to the commands and makes sure a command

              instance is created as a response to the event being dispatched. You will have

              some logic inside the commands e.g manipulate domain model objects, you can also

              use business delegates to deffer work for the service calls and obviously you

              have the domain model objects. I would look at cairngorm 3, the separation is

              more obvious there.

               

              HTH,

              C

              • 4. Re: Cairngorm 2
                simplesid Level 1

                you can also use business delegates to deffer work for the service calls and obviously you have the domain model objects

                Like i said, i am not using any more design patterns. Not even delegates. And my project is already using CairnGorm2 not 3. So in this context, where should i write the business logic? I only want to know, that if i write the business logic in the command class, then it will come in which layer of MVC?

                Thanks!

                Sid

                • 5. Re: Cairngorm 2
                  Claudiu Ursica Level 4

                  In your context just keep the same structure that is already there. Can you show

                  a simple use case make sure we are talking the same language ...

                  C