Book Image

Learning Alfresco Web Scripts

By : Ramesh Chauhan
Book Image

Learning Alfresco Web Scripts

By: Ramesh Chauhan

Overview of this book

Table of Contents (18 chapters)
Learning Alfresco Web Scripts
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Execution flow of web scripts


Let's first understand the execution flow of web scripts in order to understand the Alfresco web script framework.

Overall flow for a web script

As soon as a request for the web script URI is hit, the execution flow of the web script gets started and continues till the request gets served with the requested response format. Let's understand the overall execution flow for a web script with a JavaScript-backed controller. The whole execution flow is as follows:

  1. A request for the web script URI arrives at the web script request dispatcher in Alfresco.

  2. The request dispatcher sends the request to the Web Script Runtime.

  3. The Web Script Runtime delegates the request to The Web Script Container, which will first find the suitable web script for the requested URI and the requested HTTP method.

  4. The next thing would be to authenticate the user first, if required, before executing the web script.

  5. The Web Script Container then executes the controller implementation if available...