Expand my Community achievements bar.

AEM Component Builder

Avatar

Level 9

2/26/25

Request for Feature Enhancement (RFE) Summary: Better way to create custom AEM components
Use-case: One needs to build from scratch a new AEM component
Current/Experienced Behavior:

In the current AEM world, there are way too often the situations when developers end up building new AEM components (and not use the core components).

 

The experience of building a new component is not very pleasant, prone to human mistakes due to the heavy ponderous coding. Working manually with the XML to define the dialogs makes the developer very often lose focus on the big picture and easy get lost into details about not forgetting to add the well-known <items> element, or to keep track of tabs, or to properly arrange dialog fields, or to make the dropdowns work (specially when we have multiple dependent ones) and so on. All becomes even more complicated when he needs to (also manually) add extra clientlibs having to careful when writing it and not add a typo. On top of this, he often needs to go on the Granite UI Foundation specification page to lookup for the component in question and see what is the overall structure, what attributes it accepts and what they do, and then come back in the XML and manually add what he needs.

Currently the Components tool (/libs/wcm/core/content/sites/components.html) is very poor. It is only giving you info data, not giving you much power to edit the component.

Improved/Expected Behavior:

Have a built-in UI tool to design a component in a more visual way rather then manual XML work, that should do the following:


1. It can be integrated with the available Granite typical components for an easy drag and drop in the dialog design.
It can also provide easy access to each Granite component behavior, elements and so on. By having a visual drag-and-drop approach it can prevent developer for breaking the XML.
It can contain with hints and documentation tooltips, for ease of understanding and guidance for making best choices


2. It can provide a list of available clientlibs from project for selection
In this way it will prevent the developer to make typos and not properly link his component to the expected clientlib


3. It can better control granite data, renderconditions, granite classes, *-showhide-target etc
Having a holistic way across the entire dialog will avoid having inconsistencies or mismatches.


4. I can define component title, group, icon, initial field values and so on.


5. It might even allow developer to add a Readme.md file.

The readme would contain the component’s documentation (like usage instructions) which can later be used by the editors and developers alike.


6. It might even be able to run the component in isolation, before even include it in project.

Here there might be some potential constraints, considering component will run outside project context, so in the real project we might have slightly different results, but this a details left open to be clarified later on.


7. And it can also grow as a tool in the future, to add more component related features.

- For example the OOTB Component tool allows you to see where is the component used. But it can do much more, like for example to have an one click away button to update all component instances with the new updated version.


8. It might even had a integration feature with project’s github, so that the component  could be directly committed to basecode, once is verified and approved.

Currently developers do this in two cumbersome-ish ways:
- either create a package, download it, unpack it and put the stuff in the project codebase
- or, when the component is already in project basecode, use aemsync to make manual changes on the component in their IDE and verify them in AEM afterwards

 

9. For now we can keep the HTL out of this tool, even if this could potentially be handled here as well.

 

------------------------------------------------------------------------------------------------------------------

 

The solution is not refined in depth, so there is a lot of room to change the idea. But the whole point is that we need a better, safer, easier and faster way to create AEM components.

Environment Details (AEM version/service pack, any other specifics if applicable): All new AEM versions (AEM 6.5, AEMaaCS)
Customer-name/Organization name: tethich.com
Screenshot (if applicable):  
Code package (if applicable):  
7 Comments

Avatar

Level 2

2/27/25

You have a good point here, @Tethich. I think the key is wether you define it bussiness-oriented or technical-oriented depending on which person would be expected to make use of it.

 

5. It might even allow developer to add a Readme.md file. > This is already possible with current component development structure by placing README.md inside component's folder.

Avatar

Level 9

2/27/25

@ndresgarc 

Appreciate your thoughts !

 

I guess AEM has always been a CMS that never drew an exact line between technical vs business flavor when it comes to functionality. I don't think is even possible for that matter. But I am sure product engineers and architects can find a way to implement this tool. The whole point is to start from somewhere, develop something and make it available, even if it will grow and be release progressively over time.

 

As for no. 5, yes, I know. But I was also covering this point to be available in the proposed tool.

 

 

Avatar

Level 10

2/28/25

I don’t really see component creation as a repetitive task that requires automation or a UI tool. In fact, a very common problem on most older AEM projects is that components are not designed properly. Then the project ends up having way too many components, which causes maintainability issues. 

It might even be a good thing that components cannot be created from scratch so easily.

 

Daniel

Avatar

Employee Advisor

3/2/25

I agree with Daniel, I have seen a number of projects, where over the years a few hundreds components were created (and used), ending up with 15 different TextImage components. That's a maintenance nightmare and there are many reasons why projects ended up there (that's a topic for a different day).

 

Instead I recommend
* use the style system and editable templates

* and start questioning the need for new components.

Avatar

Level 9

3/3/25

@daniel-strmecki @Jörg_Hoh Very good points and true reasons you have. And agree moving away as much as possible from component creation is ideal, less risky and with better benefits long run.

Me personally though I have never seen a project that never had to create custom components (unless a headless solution maybe). So my thought was that as long we can't really get rid of this activity, we might as well do it in a more controlled manner, via a tool, which would validate components designs, provide suggestions for fixes and best practices, lower implementation time, align with Adobe's best practices, keep component in sync with latest releases and even take care of component migration to future Adobe's strategies when it comes to how the concept of the component will evolve and grow over time.

 

Really appreciate your feedback.

Avatar

Level 2

3/3/25

@Tethich 
@Jörg_Hoh 
@daniel-strmecki 

I don't see why having a component builder has to block the creation of components from scratch.
I could see a component builder as a way for editors to create simple components but not as a way to restrict component creation. That is something that adds value to the project.
But I don't want to lost the ability to build an entirely new component, since sometimes Core Components do not provide exactly what you need

The maintenance nightmare happens by many other reasons too, not just component creation.

Avatar

Level 9

3/3/25

@ndresgarc Far from me the thought to not permit their creation in a more technical way. Such restriction was never on the table for me. When I said "control" I didn't meant "restriction", but rather steer developer on the right path and ease his life.