Skip navigation
All Places > Alfresco Content Services (ECM) > Blog > 2016 > July

One of the comments I had on my last blog post point out that one of the main problems with using Aikau is that it doesn’t support the XML-based Forms Runtime that Share uses to render forms using the old YUI2 controls.


I decided to take a look into this issue and see what could be done about it. The major issue with the existing implementation is that it the REST APIs return HTML fragments containing references to the YUI2 controls - it’s just not possible to extract the pure data from the API as it is not.


Fortunately one of the many great things about the WebScripts implementation is their ability to be extended and have multiple output formats defined for them. This meant that I was able to extend the FormUIGet Java controller for the WebScript to generate a pure JSON output for the forms data and then define a new WebScript descriptor to access that data.


Because the Forms Runtime only applies to Share and not to to standalone clients, it was necessary to package the Java class and Spring bean configuration into a separate JAR file. This means that to leverage this new capability of Aikau you now need to include an additional dependency in your AMP files (or simply download the JAR from our Maven repository and copy it into the “share/WEB-INF/lib” folder as I do in my demo video).


Now that we can access the forms runtime data we need to be able to convert the form definition into an Aikau forms model. This is capability is provided by the “alfresco/services/FormsRuntimeService” module. At the moment this module is not fully complete - but I wanted to get something working out to the Community as soon as possible in order to get feedback and hopefully some collaborative development.


At the moment only a couple of YUI2 controls are mapped to Aikau controls, but both edit and view modes are supported and the ability to configure in custom mappings is something that will be added in later. Constraints are also only partially handled, but the remaining constraints will be added soon.


The main objective for this first release was to get something out to the Community that demonstrated the end-to-end capability. A test page has been bundled with the Aikau that you can try out. Everything has been done to support multiple versions of both the Aikau and Forms-Runtime-Support JARs.


Take a look at the demo video and let me know what you think… please feel free to add comments to the JIRA epic or raise issues on GitHub to discuss where to take this next.


EDIT: Update for 1.0.77

We've made some more improvements that are shown in this video.

Improving Aikau Education

Posted by ddraper Jul 4, 2016


In my last blog post I talked about the perspective I’d gained by working in another team at Alfresco that has been using Aikau. For the last 18 months the Aikau team has been so head down in development trying to provide features and fixes for internal teams, customers and the community that we’ve not had much opportunity to focus on reviewing and improving the educational material that is available for Aikau.


Interestingly with the advent of the new Angular based UI framework and the conclusion of a number of major Alfresco projects that use Aikau the heat is now off us and I’ve had some time to start looking at what resources are available and how we can improve the situation.


At this point I think it’s important to state that as far as I’m aware Aikau development is going to continue and that if you want to develop a user interface for Alfresco - particularly if you want to customize or add new pages to Share - then Aikau is still the recommended framework.


Alfresco is still actively using Aikau (most notably for Records Management in Share) which is hugely important for its business. The use of Aikau is never going to be the headline feature in an Alfresco release, but it’s usually there in the background getting the job done.



Eating Our Own Dog Food

I decided to have a go at reproducing some existing YUI2 based features of Share using Aikau to try and showcase how rapid development can be - but more importantly to try to understand where the gaps might be in available education.


I’ve started with the “People” page and you can watch me creating this page from scratch in a brand new client in this video. It’s a bit rough around the edges, for which I make no apologies - but hopefully it will be informative.


Feedback Wanted !

The full disclosure is that the first time I went through the process I found that some of the JSDoc could be better, we could provide some additional widgets and that the UserService needed updating - and I took care of these issues before recording the demo.


However, I would urge that anyone attempting to do any development that has similar problems to report them as a GitHub issue so that they can be addressed.


I’d also love your feedback on whether or not this medium is effective or not, whether I should record more demos and what they should be focused on. I’ve already got an idea for a follow up in developing some custom widgets to go on the page - but it might be better to work through an entirely different use case - Data Lists perhaps?


I'd also welcome any suggestions on other approaches we could take to help people get up to speed with Alfresco development using Aikau.


Accessing the Code

I've created a GitHub repository containing the application that I built in the video. I've tagged the commit with the code (and will continue to tag each commit if I do more examples) so that it's easy to try out the code and experiment with it yourself.

Filter Blog

By date: By tag: