官术网_书友最值得收藏!

Reasons to use web scripts

It's now time to discover the answer to the next question—why web scripts? There are various alternate approaches available to interact with the Alfresco repository, such as CMIS, SOAP-based web services, and web scripts. Generally, web scripts are always chosen as a preferred option among developers and architects when it comes to interacting with the Alfresco repository from an external application. Let's take a look at the various reasons behind choosing a web script as an option instead of CMIS and SOAP-based web services.

In comparison with CMIS, web scripts are explained as follows:

  • In general, CMIS is a generic implementation, and it basically provides a common set of services to interact with any content repository. It does not attempt to incorporate the services that expose all features of each and every content repository. It basically tries to cover a basic common set of functionalities for interacting with any content repository and provide the services to access such functionalities.
  • Alfresco provides an implementation of CMIS for interacting with the Alfresco repository. Having a common set of repository functionalities exposed using CMIS implementation, it may be possible that sometimes CMIS will not do everything that you are aiming to do when working with the Alfresco repository. While with web scripts, it will be possible to do the things you are planning to implement and access the Alfresco repository as required. Hence, one of the best alternatives is to use Alfresco web scripts in this case and develop custom APIs as required, using the Alfresco web scripts.
  • Another important thing to note is, with the transaction support of web scripts, it is possible to perform a set of operations together in a web script, whereas in CMIS, there is a limitation for the transaction usage. It is possible to execute each operation individually, but it is not possible to execute a set of operations together in a single transaction as possible in web scripts.

SOAP-based web services are not preferable for the following reasons:

  • It takes a long time to develop them
  • They depend on SOAP
  • Heavier client-side requirements
  • They need to maintain the resource directory
  • Scalability is a challenge
  • They only support XML

In comparison, web scripts have the following properties:

  • There are no complex specifications
  • There is no dependency on SOAP
  • There is no need to maintain the resource directory
  • They are more scalable as there is no need to maintain session state
  • They are a lightweight implementation
  • They are simple and easy to develop
  • They support multiple formats

In a developer's opinion:

  • They can be easily developed using any text editor
  • No compilations required when using scripting language
  • No need for server restarts when using scripting language
  • No complex installations required

In essence:

  • Web scripts are a REST-based and powerful option to interact with the Alfresco repository in comparison to the traditional SOAP-based web services and CMIS alternatives
  • They provide RESTful access to the content residing in the Alfresco repository and provide uniform access to a wide range of client applications
  • They are easy to develop and provide some of the most useful features such as no server restart, no compilations, no complex installations, and no need of a specific tool to develop them
  • All these points make web scripts the most preferred choice among developers and architects when it comes to interacting with the Alfresco repository
主站蜘蛛池模板: 原平市| 三门县| 栖霞市| 五大连池市| 开封县| 扎兰屯市| 玉林市| 雷州市| 大英县| 江都市| 岫岩| 德令哈市| 玉龙| 昌平区| 呼和浩特市| 彭泽县| 微山县| 永吉县| 泽普县| 金阳县| 无为县| 绥德县| 南昌市| 宜良县| 盐津县| 长泰县| 纳雍县| 密山市| 视频| 宜州市| 云霄县| 山丹县| 新绛县| 兴山县| 台东市| 广饶县| 长沙市| 普兰县| 黄浦区| 卢龙县| 嘉鱼县|