Demandware MVC concept
Asked Answered
M

4

7

I am new guy to Demandware and I am switching from Magento to Demandware. Demandware is not opensource I am not getting proper tutorials, stuff to understand the concepts of it.

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

I want to know the MVC pattern of Demandware. How it works and what are the basic concept I need to concentrate?

Mayoralty answered 9/5, 2016 at 8:55 Comment(0)
M
7

I would suggest to request a Demandware XChange account as soon as possible for you, so that you get access to the Demandware community portal and also to the API documentation.

In short:

  1. Models are Demandware Forms and Demandware API objects
  2. Controllers are Demandware Pipelines (there are JavaScript Controllers that are recently released, you may find these easier to understand if you have Node.js experience). These can call DW Scripts (DemandwareScript is based on ECMAScript standard 5.0 for JavaScript with some extensions like E4X and optional types)
  3. Views are the isml templates. You should avoid including a lot of logic in them, either with isml tags like isif, isloop, etc. or with isscript.

Any further questions - let me know.

Hope this helps,

Zlatin

Mechanical answered 9/5, 2016 at 14:10 Comment(2)
Yes, I am waiting for my XChange account. you explained MVC of demandware very well. I have only one question for you. Is it required special knowledge for these ECMA, DW, ISML scripts? I worked with JS, Jquery, AJAX. Not with Node.js.Mayoralty
No special knowledge is required. However it will take you a while till you learn what capabilities the different classes from the Demandware Script API have.Mechanical
C
1

I hope you'll be able to avoid pipelines and dwscript. Those are a bit older. The most recent version works with plain old JavaScript, with pipelines being replaced by controllers.

Be aware that the underlying JavaScript engine is Rhino, which isn't really modern.

Chesnut answered 16/8, 2017 at 14:41 Comment(0)
J
1

The Demandware documentation is open source now anyone can access to without having an exchange account it has the latest SFRA(javascript) based concepts as well here is the link for the docs Demadware Documentation

Junior answered 2/12, 2019 at 9:11 Comment(1)
Trailhead platform has basic courses about this including explanation of architecture and basic concepts. Anyone can signup. trailhead.salesforce.com/en/content/learn/modules/…Vogele
P
0

Demandware is very much designed around the MVC concept (in theory). The pipelines are basically your controllers and each pipeline filename (the xml file) is the first part of the URL and the start nodes inside the pipeline are the second part of the URL that basically represent the controller (eg Cart.xml has a start node called Show, so the url is Cart-Show). At the end of the pipeline flow chart is, usually, an interaction node to that links to an ISML file, those are basically the View and are HTML with some minor Demandware-specific markup.

Typically in the MVC world you try to prevent putting business logic in the views, however if you use SiteGenesis as your starting point you'll find that not to be the case on most of the pages. If you switch to using Javascript Controllers instead of Pipelines, then it'll be closer to the Magento style of MVC (but using NodeJS-like syntax).

Psychosomatics answered 5/10, 2016 at 0:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.