Web Scripts FAQ
From AlfrescoWiki
[edit] FAQ
[edit] Q: Are web scripts easy to use?
A: Web scripts are activated with simple URL calls, You need some knowledge of JavaScript and FreeMarker templates. You do not need to know Java or .NET programming. (FreeMarker is a rendering engine that allows you to define rendering templates, and format the script outputs.)
The Web Script framework for constructing REST-style interfaces will simplify mashups. For example, content that is authored and managed within Alf can be mashed up with applications such as Google map. So map data can be working in conjunction with Alfresco-managed content.
[edit] Q: Are there web scripts in Alfresco?
A: Web scripts is the enabling technology for many of the new capabilities in Alfresco 2.1.
If you look in the latest version of Alfresco, you will see new dashlets such as:
- MySpaces
- MyDocuments
- MyTasks
- MyWebForms
All these dashlets were built using the core web scripts capability. The dashlets use Ajax UI capabilities, such as dynamic preview.
In addition, Alfresco's v2.1 OpenSearch has been rehosted as a series of web scripts.
[edit] Q: Can I access Alfresco from other applications?
A: By using web scripts, you can access Alfresco from within Alfresco, from within your own applications, and from within third-party applications.
Currently, Alfresco can be accessed from:
- Microsoft Office
- Web sites
- Portals
- Other Web 2.0 applications
[edit] Q: Can I use web scripts on any platform?
A: Web scripts are called using simple URLs. This means that they are cross-platform, and cross-language. You are not locked in to any programming language or development environment.
[edit] Q: How do I make my scripts JSR-168 compliant?
A: You do not need to do anything special. Any web scripts that you create are automatically available as JSR-168-compliant portlets. Simply use them within a JSR-168-compliant portlet environment.
[edit] Q: Are web scripts scalable?
A: Web scripts provide massive scalability using web-oriented architecture.
[edit] Q: Are web scripts easy to install?
A: Simply upload your scripts to an Alfresco space (or create them inline), then use 1-click registration. As a bonus, you do not need to restart the Alfresco server.
[edit] Q: How can I test my scripts?
A: The Alfresco server includes a built-in server-side JavaScript debugger to enable single-stepping, variable inspection, and arbitrary script execution.
[edit] Q: Do you provide any script examples?
A: Alfresco provides examples at: Company Home > Data Dictionary > Web Scripts > Examples
and
Company Home > Data Dictionary > Web Scripts > org > alfresco > sample
[edit] Q: How do I run a script?
A: Enter the script's URL in your browser address bar in one of the following ways:
- Type the URL manually
- Click on a link to the URL

