Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Alfresco Web Scripts

You're reading from   Learning Alfresco Web Scripts Learn a powerful way to successfully implement unique integration solutions with Alfresco

Arrow left icon
Product type Paperback
Published in Nov 2014
Publisher
ISBN-13 9781784390600
Length 182 pages
Edition 1st Edition
Concepts
Arrow right icon
Author (1):
Arrow left icon
Ramesh Chauhan Ramesh Chauhan
Author Profile Icon Ramesh Chauhan
Ramesh Chauhan
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Getting Familiar with Web Scripts FREE CHAPTER 2. It's Time for the First Web Script 3. Understanding the Web Script Framework 4. Building Blocks of Web Scripts 5. Invoking Web Scripts 6. Creating Java-backed Web Scripts 7. Understanding JavaScript-based Web Scripts in Detail 8. Deployment, Debugging, and Troubleshooting Web Scripts 9. Mavenizing Web Scripts 10. Extending the Web Script Framework Index

Understanding web scripts

In order to understand web scripts in Alfresco, let's begin with finding out the answer to the question "What is a web script?" from multiple perspectives.

In simple words, web scripts can be explained as follows:

  • Web scripts are powerful and extremely useful services supported by Alfresco
  • They are a way to interact with the Alfresco repository securely
  • They are reusable across different platforms
  • Web scripts provide uniform access of the content to a wide range of client applications

In technical terms, web scripts can be defined as follows:

  • They are RESTful web services

    Note

    What is RESTful?

    REST stands for REpresentational State Transfer, which is basically an architectural style. Well-defined and uniform access to the resources through HTTP request methods, uniquely identified resources through the URI, and representation of these resources are the key principles of REST. Any implementation following this architectural style is known as RESTful.

  • They are bound to a specific Uniform Resource Identifier (URI)
  • They respond to HTTP methods such as GET, POST, PUT, and DELETE
  • They are a lightweight implementation

From a developer's point of view, web scripts have the following properties:

  • They are easy to understand and learn
  • They are easy to develop
  • They are easy to debug
  • They are easy to maintain
  • They are easy to deploy
  • They are faster to implement
  • They would be the first choice when it comes to accessing the Alfresco repository securely from external applications

From a business user's point of view, web scripts are useful as follows:

  • They bridge the gap between the business requirement and technical implementation for building up business solutions with Alfresco
  • They empower Alfresco in its integration capabilities to develop useful Alfresco integration solutions with external systems
  • They are a unique way to implement the integration solutions on top of the Alfresco repository
  • They are the backbone of the integration solution implementation with the Alfresco repository

In essence, web scripts can be talked about as follows:

  • Web scripts are built on the idea of URL addressability
  • Web scripts are simply a service, mapped to a human-readable form, and developed using a piece of code as their backend implementation
  • For example, in a contract management system built using Alfresco as the backend repository, you can have a web script to retrieve all the draft agreements from the repository and then display them on the custom frontend application. This repository web script to get all the draft agreements will simply be accessed through its URL. This web script will also have a piece of code in the backend to retrieve the data from the Alfresco repository to produce the results in the formats as required. The URL for this web script might look like the following:
    /alfresco/service/contract/get_draft_agreements
You have been reading a chapter from
Learning Alfresco Web Scripts
Published in: Nov 2014
Publisher:
ISBN-13: 9781784390600
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime