MVC vs 'regular' Enyo

edited October 2013 in Enyo 2.4
I've only just begun looking deeper into the new MVC features of Enyo 2.3 and I'm still trying to wrap my head around the new bootplate-mvc application architecture. I'm not sure if I see a lot added value in the MVC approach but then again I don't yet understand half of it. Just out of curiosity: Is the new mvc application structure going to be considered standard/best practice moving forward or is it more like an alternative approach?


  • Martin, give it a try. You'll like it.

    Having Enyo manage all the data retrieving and visualization speeds up development, but also makes the code more maintainable.

    For an existing app, you must weight if the change worths the effort, but I think it's a must for new projects.
  • Yes, it's still quite possible to write with the old style, or just adopt a few features, like some binding to avoid needing to write so many "changed" handlers.
  • Let me clarify. I do understand the advantage of separating business logic and UI, and I've worked with a couple of 'classical' MVC frameworks before. But pulling controller code out of UI components seems like an anti-pattern to me in Enyo. Specifically, binding 'global' controllers within UI components feels like breaking the encapsulation principle. I've started using the Model/Store/Source kinds as well as data binding and I quite like those parts but for now I'm steering clear of Controllers.

    Maybe once the documentation catches up and we see some examples this will make more sense to me. Meanwhile, can somebody give me an example of where using controllers makes more sense than simply binding models?
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!