You are here

Aikau Pages

The Share web application is built up of a main menu from which you can navigate to a number of pages. These pages are implemented mostly in the Surf development framework. However, a number of pages, such as search, have been converted and implemented with the new Aikau development framework, see architecture section.
Extension Point Aikau Pages
Support Status Full Support
Architecture Information Share Architecture.
Description

Aikau pages are the new type of pages that the Share UI will use in the future. Currently only the following pages are implemented in Aikau:

  • Live Search
  • Filtered Search Page
  • Search Management Page
  • Site Management Page
  • Analytics and Reporting Widgets
  • Document List prototype
Implementing an Aikau page is greatly simplified compared to creating a Surf page. The only thing you need to do is implement a Surf Web Script and zero or more Aikau Widgets.

The web scripts controller is where all the fun happens. It is where you define your page layout in JSON, including all the Aikau Widgets that make up the page. It will look something like this for a Hello World page:

model.jsonModel = {
    widgets: [
        {
            id: "SET_PAGE_TITLE",
            name: "alfresco/header/SetTitle",
            config: {
                title: "Hello World"
            }
        }
    ]
};   

The template will be very simple and the only thing it does is this:

<@processJsonModel />   

It basically just processes the JSON model that we set-up in the controller. Here we have used an out of the box Aikau widget called SkyVault/header/SetTitle, and the only thing left to do is to create the web scripts descriptor:

<webscript>
    <shortname>Hello World</shortname>
    <description>Hello World page definition</description>
    <family>Share</family>
    <url>/helloworld</url>
</webscript>   
Now this is all there is to it. The page can be accessed via the http://localhost:8080/share/page/hdp/ws/helloworld URL. You should see the following page in Share:

An Aikau page is processed and generated via the Spring Surf and Spring MVC framework. The following picture gives an overview of how it works:

As we can see in the picture, all dynamic content that should go onto the page is fetched indirectly via Aikau Widgets, which can get the content from either the repository or from some other remote Web Service. Worth noting here is that we are actually using a Surf Page when we are invoking an Aikau page, in the Hello World example we are used the hybrid dynamic page (hdp) to get the Share header and footer included.

Deployment - App Server
  • tomcat/shared/classes/alfresco/web-extension/site-webscripts/ (Untouched by re-depolyments and upgrades)
  • tomcat/shared/classes/alfresco/web-extension/site-data/extensions (Untouched by re-depolyments and upgrades)
  • tomcat/webapps/share/js/ (when web resources are included, such as Aikau Widgets, you need to put them directly into the exploded webapp, this is NOT recommended.)
Deployment - SDK Project
  • share-amp/src/main/amp/config/alfresco/web-extension/site-webscripts/ - Aikau page web scripts
  • share-amp/src/main/amp/config/alfresco/web-extension/site-data/extensions/ - Extension modules with Dojo package definitions
  • share-amp/src/main/amp/web/js/<dojo package> - web resources, such as Aikau Widgets
More Information
Tutorials
Developer Blogs