Chapter 1. Getting Familiar with Web Scripts
In this chapter, we will cover the following topics:
- Understanding web scripts
- Reasons to use web scripts
- Understanding when to use a web script
- Understanding where web scripts can be used
- Understanding how web scripts work
- Types of web scripts
Consider a scenario where you have to work on a project to develop a customized business solution with a backend repository such as an Alfresco content management system. It is going to be an integration project with the Alfresco content repository. The end goal is to build up a business implementation that has a custom frontend application interacting with the Alfresco repository in a secure way in order to allow the end users to access the content on demand and to provide access to features of the Alfresco repository. Basically, you want to create, update, and delete content in the Alfresco repository and are interested in retrieving the required content on demand from the Alfresco repository from the custom frontend application in a secure way.
Now, you might have a lot of questions on your mind. You must be curious to find out how it is possible to access the Alfresco repository from the custom frontend application. What are the possible alternatives to access the content residing in the Alfresco repository from the custom frontend application? Is it going to be a complex implementation to build up an API accessing the Alfresco repository? Is it going to be a secure communication from the frontend application to the backend repository? How is it going to maintain the client state during the communication with the Alfresco repository in order to access, update, or delete content from the repository based on the user's access? And the list of questions still goes on…
Whenever there is a question, there is an answer. Also, the answer to all of your previous questions is Alfresco web scripts. Using web scripts, you can build up a customized integration solution using Alfresco as the backend content repository.
It is always a good idea when we start learning about any new topic to always start with the "5Ws and 1H". It's basically the who, what, when, why, where, and how questions. This helps us to understand the topic in a better way. In this chapter, we are going to find out the useful information about web scripts by discovering the answers to some of the basic questions such as what, why, when, where, and how. Let's start and find out the answers to them and understand web scripts in a better way.