Demandware MVC Concept

I am the new guy for Demandware and I am moving from Magento to Demandware. Demandware is not open source. I do not get the right textbooks, things to understand his concepts.

I am from Magento, so I know the structure of Magento MVC. But in Demandware, we have different concepts, such as pipelines, pipes, ISML scripts, ECMA script, DW scripts, etc.

I want to know the MVC Demandware template. How does it work and what is the main concept that I need to focus on?

+6
source share
4 answers

I would suggest that you request a Demandware XChange account for you as soon as possible so that you can access the Demandware community and API documentation.

In short:

  • Models are objects of the Demandware Forms and Demandware API.
  • Controllers are Demandware Pipelines (there are recently released JavaScript controllers, it might be easier for you to understand them if you have Node.js experience). They can invoke DW scripts (DemandwareScript is based on the ECMAScript 5.0 standard for JavaScript with some extensions, such as E4X and optional types).
  • Views are isml templates. You should avoid including a lot of logic in them, either with tags such as isif, isloop, etc. Or using isscript.

Other questions - let me know.

Hope this helps,

Zlatin

+6
source

Hope you can avoid pipelines and dwscript. They are a little older. The latest version works with plain old JavaScript, with pipelines being replaced by controllers.

Keep in mind that the core JavaScript engine is Rhino, which is not modern.

+1
source

Demandware is very well designed around the MVC concept (in theory). Pipelines are basically your controllers, and each pipeline file name (xml file) is the first part of the URL, and the start nodes inside the pipeline are the second part of the URL, which basically represents the controller (e.g. Cart.xml has a start node is called Show, so Cart-Show URL). At the end of the pipeline flowchart, usually the node interacts with what is associated with the ISML file, this is mainly View and HTML with some minor Demandware markup.

Typically, in the MVC world, you try to interfere with business logic in your views, however, if you use SiteGenesis as a starting point, you will find that this does not apply to most pages. If you switch to using Javascript Controllers instead of Pipelines, it will be closer to the Magento MVC style (but using syntax like NodeJS).

0
source

I can offer online training on the Demandware project. I have been working as a developer / manager for Demandware for over a year. If anyone is interested, please contact me @lizdemandware @ gmail.com

-6
source

All Articles