Creating your first JavaScript application
In this section, we'll cover how to create a very basic screen using the new JavaScript API. The marketing chief wants us to develop a simple HTML page that displays all webable documents available in the Alfresco repository. For each of them, we need to display the name of the document, and the link to the Document Details page.
The Alfresco JavaScript API allows you to connect to the Alfresco API, and the Activiti REST API. In this chapter, we'll use only the Alfresco API. It's the only required to display webable documents. Let's quickly discover the available methods in this Alfresco JavaScript API:
Authentication:
Login:
Can be done against Alfresco (referenced as ECM in the documentation) and/or Activiti (referenced as BPM in the documentation).
Can use a username and a password, or an already existing ticket.
This method is monitored by three different events corresponding to success authentication, failed authentication, and logout:
Logout
isLoggedIn...