cancel
Showing results for 
Search instead for 
Did you mean: 

Difference between Webscripts and Javascript API

rockwolf125
Champ in-the-making
Champ in-the-making
I'm looking into developing Web clients for alfresco and I have read a lot on webscripts. I have recently learned that aside from webscripts you can also create Javascripts and put them into the Data dictionary's Script repository.

What are the main difference between Web scripts and Java scripts and why would people chose on rather the than the other (pros and cons)?
1 REPLY 1

pmonks
Star Contributor
Star Contributor
Technically, Web Scripts have two primary advantages over Scripts:
  1. Clean separation of logic and presentation via Web Scripts' use of Freemarker (the views) in addition to Javascript (the controller)

  2. Remotely invokable via developer-defined URLs
In terms of use cases, Scripts are best thought of as a way to add custom logic to the repository and/or the JSF Web Client UI, whereas Web Scripts are best thought of as a way to add new functionality to the repository and make it available externally (to end users and/or other systems), regardless of whether the Web Client UI is in use or not.

Cheers,
Peter