Alfresco web script framework

Alfresco's web script framework follows the Model-View-Controller (MVC) pattern, which makes a developer's life easy. The Model-View-Controller design pattern decouples data access, business logic, and data presentation. By applying the MVC pattern, you can separate core business model functionality from the presentation and control logic that uses this functionality. Such separation allows multiple views to share the same enterprise data model, which makes supporting multiple clients easier to implement, test, and maintain.

Alfresco web script framework

As shown in the previous figure, the Controller here is the server-side JavaScript. It can also be JavaBeans or a combination of both. The request first comes to the REST Dispatcher, and Web script Run Time forwards this to the Controller, which is responsible for processing the request. It performs the required business logic with the help of Alfresco core services and populates the model with data, and then forwards the request to the View. A View is one or more FreeMarker templates and is responsible for generating the response in the proper format (XML, HTML, JSON, and so on) as a presentation layer. Finally, the Web script Run time will send the response back to the client.

  • Controller: JavaScript/JavaBeans
  • View: One or more FreeMarker templates
  • Model: Data structure, used to pass data between View and Controller
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset