1

I am understanding the logic behind working in separate folders in Magento 2 and came across bundle of articles talking about same thing in different ways.

Some explain MVC logic behind it and some say it is MVVM

Meanwhile Official Website says to follow MVC architecture in extension development.

If we are following MVVM (or any other) architecture can somebody explain it by relating it with Magento 2 directory structure.

Thanks.

  • Did you found an answer for this? – Tajveez Rehman Mar 20 at 9:48
  • Still Looking for satisfactory answer. – Ajwad Taqvi Mar 20 at 14:49
1

Magento 2 has its own unique implementation; MVC, MVVM or HMVC, none of them are specifically followed. When you create a new module, you are following MVC or HMVC, on the frontend and especially on checkout MVVM is implemented with the strong blend of KnockoutJS and on admin side it is HMVC.

After all this, I will repeat, Magento 2 has its own implementation unique to Magento 2 and none of them are specifically followed.

There are rumors going around about KnockoutJS, it might be dropped from future releases of Magento (I am not sure though).

  • 1
    Quite satisfying one ! Thanks – Ajwad Taqvi Apr 2 at 6:17
1

Magento 2 is a Model View ViewModel System and no more a design structured by MVC. The MVC model was incorporated in the previous version and seems to be quite similar to MVVM, but MVVM is a way more rich in dividing the View and Model in an application. Reference: https://weblizar.com/blog/magento-2-is-model-view-view-model-system-and-not-mvc-explained/

  • I have gone through this link and attached in question as well. Please check all hyper links and get more confuse about it :) – Ajwad Taqvi Dec 13 '18 at 12:24
1

Magento 2 — No More MVC, it’s closer to a Model, View, ViewModel (MVVM) system.

What is MVVM Syste?

https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93viewmodel

Magento 2 Module-based Architecture

0

Magento 2 is a Model View ViewModel (MVVM) system. While being closely related to its sibling Model View Controller (MVC), an MVVM architecture provides a more robust separation between the Model and the View layers.

https://www.toptal.com/magento/magento-2-tutorial-building-a-complete-module

https://www.yireo.com/blog/2017-08-12-viewmodels-in-magento-2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.