1

I'm using alloy on titanium, I want to use modules but I'm worried about breaking the MVC principles. How can I achieve this?

Thanks.

Loïc Gammaitoni
  • 4,173
  • 16
  • 39
  • IMO, MVC is used to separate your Model, View and controller logic. But as this logic is already implemented in a module you have no control over its implementation. What you have is some methods which you have to use. Consider google analytic module you have to just call a method to use it. You have no control over the implementation. So I think you are not breaking MVC pattern if using module. – turtle Nov 28 '14 at 11:09

1 Answers1

1

In our projects we are using Titanium modules as service layer. (If a piece of business logic will be used in more than one controller, we refactor the logic into a module, so logic can be injected in all controllers). I do not see any violations of the original MVC architecture.

What we're trying to achieve in our projects is close to MVCS architecture (more info here)

Community
  • 1
  • 1
WeMakeSoftware
  • 9,039
  • 5
  • 34
  • 52