Select Page

alfresco-slideSimplifying Extension Development in the Yeoman Generator

In this blog post, Bindu Wavell discusses how to create a project structure in the Yeoman generator that is appropriate for customized Alfresco implementations. This drastically reduces the need to search for and copy/paste data in multiple locations. This new alf-dev-helper project focus on reducing clicks in the UI when working on development tasks—eventually, we expect other types of helpers to be added.

Simplifying Alfresco Extension Development

Bindu Wavell, Chief Architect at Zia Consulting

As you may know, Zia Consulting has been working on an open-source Alfresco Yeoman generator that allows for Alfresco extension project scaffolding based on the Alfresco all-in-one archetype

This project also includes some wizards for adding common extensions such as actions, behaviors, models, and web scripts to your project. Additionally, it has helpers for adding AMP files to your project. One of these helpers is alfresco:amp-add-common. Based on which version of the SDK you are using, and if you are targeting Community or Enterprise, this will offer you a list of third-party AMPs that can be added to your project (multi-selection is possible).

In order to do this, the generator relies on these modules being published to a public Maven repository such as Maven Central or Alfresco Artifacts. Initially, the only two AMPs available from one of these repositories were Support Tools for Enterprise installs and Uploader Plus.

We have been advocating in the community for folks to start publishing their AMPs to a public Maven repository. At BeeCon 2016 we had a good discussion with Florian Maul, the author of the awesome JavaScript Console add-on. He went through the process of getting his AMPs pushed to Maven Central and published a how-to article.

There are now a growing number of high-value AMPs available via one of the public Maven repositories. These include common modules such as:

  • Alfresco Office Services (AOS)
  • JavaScript Console
  • Records Management (RM)
  • Support Tools
  • Uploader Plus

In addition, we have recently seen some more specialized projects pushing their AMPs to a public repository, these include:

  • JavaMelody
  • JScript Extensions
  • Share Inbound Calendar Invites
  • Share Site Announcements
  • Share Site Creators
  • Share Site Space Templates

The alfresco:amp-add-common sub-generator supports adding any/all of these to your Yeoman generated projects with a single command.

For years I have felt it should be possible for developers to jump from any node in a document library view directly to the node browser. This is a very simple customization and I finally got around to coding this up in a reusable project. The project is called alfresco-dev-helper and is now also published to Maven Central and has been added to the alfresco:amp-add-common subgenerator.

Besides the new open in node browser document library action, this add-on enables the execute script action that is provided out-of-the-box, but disabled by default. It also exposes the change type action on the browse screens.

Simplifying Extension Development – Exposed Document Library Actions

Exposed Document Library Actions

My plan for this project is to include simple extensions to the platform and share those that will be most useful for developers. I would not expect this module to be deployed to production.

In summary, we are continuing to make progress on the Yeoman generator for Alfresco. Recently, we have been making it easier to quickly add some useful AMPs and have started work on a sister project to the Yeoman generator where some helpful developer tools that run inside the platform and share will be made available to you.

Bindu Wavel, Chief Architect at Zia Consulting

Bindu Wavell is the Chief Architect at Zia Consulting. He has been involved in enterprise system integration consulting for the past 24 years. At Zia, Bindu provides guidance and mentoring around enterprise content management architecture and design in addition to working hands-on with customers to deliver high-value solutions. Bindu has been working on enterprise content management engagements for the past 10 years. Previously he worked at eConvergent and Aspect Communications focusing on customer relationship management systems. Bindu is passionate about tea and quite interested in hobby robotics and automation.

Pin It on Pinterest

Sharing is caring

Share this post with your friends!