Understanding how web scripts work

Web scripts in Alfresco mostly use the model-view-controller pattern. However, it isn't mandatory to follow this pattern all the time. The way MVC pattern works in web scripts is as follows:

  • The controller is responsible for performing the required business logic as per the business requirement. After processing the business logic, controller populates the model object with the required data. Once this is done, controller will then forward the request to the view.

MVC in web scripts

The model-view-controller pattern in web scripts is explained as follows:

  • The controller is a server-side JavaScript or Java class or it could be both as well
  • The model is a data structure object passed between the controller and view ...

Get Learning Alfresco Web Scripts now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.