- Article: #Alfresco Web script architecture
- Alfresco web scripts overview
- Web Script architecture
- Alfresco web script :
Alfresco web scripts is a service provide a unique way to programmatically interact with the Alfresco content application server.
Web script is a REST-based and powerful option to interact with the content residing in Alfresco repository, it provide RESTful (Representational State Transfer : is logics steps for managing data through http till will be displayed)access to the content . It’s based on HTTP requests and responses (using methods such as GET, POST, PUT, and DELETE), URIs (Uniform Resource Identifiers), and document types.
- Web Script architecture:
- Lets have a look on how the Web Script works .Web Script follows MVC architecture only.
- Web script architecture -
There are three phases in MVC design pattern. Request , Controller and Response. Same is the case with Web Script. Using Uri request will come to webscript, which will be followed to controller, controller will deal with services and finally it will give the response in desired format.
- The Request:
is defined in descriptor file of alfresco, where you can define arguments which are going to be passed in Uri.
- The Model:
The model is a data structure object passed between the controller and view.
- The View (the Response):
The view is a FreeMarker template that is responsible for generating the response in HTML, JSON, XML or any thing else.
- The controller: