What makes a real headless CMS? A headless cms is having a content first approach WITH full APIs to access the content in any way you want. Content first must be the approach behind Content Architecture. You start with looking at your content and structuring it and how it can be used now and in the future before you think of building anything UI wise. Its simple, Content First approach.
Below given a narrow list of headless CMSs in addition to AEM.
Now a days distributed deployment is becoming common and Agile DevOps highly depends on containerized deployments. It was started with Microservice s and now stretching its wings.
The advantage of using AEM with docker AEM With Docker fastens the deployment process. Any latest PRODUCTION environment could be imported to local file path as images. Say the TEST environment is crashed by some means, we can replace/repair this with docker images. These imported images can be exported to any Docker systems and will be useful to expand instances on-demand basis.
Docker allows you to run applications in an isolated environment with its own CPU, memory and network stack.
Docker needs a docker file to create an image from AEM and its dependencies. This image is then deployed to a new environment where code deployments are configured. This setup ensures the new environment is up and ready in few minutes.
AEM WITH DOCKER- Click on Image to see it big
Is AEM Docker combination a good pair?
There are arguments that AEM is state-ful where in repositories holds the content, still a brand new environment of AEM can be made available quickly. There are also reports that Adobe is working to make AEM Compatible with Docker and AEM builds are coming as docker images.
How does it impact the AEM Admins/ developers who work with AEM?
Since docker is the new deployment trend, it is highly recommended that AEM admins/ developers need to get a good understanding on docker and containerization techniques.
AMP integration with AEM - CaaS Model(Content as a service) demo
I was receiving requests for writing sample code to showcase Third party AMP page which retrieve data from AEM (Content as a service).
What is AMP?
The AMP Project is an open-source Google-run website publishing technology initiative aiming to make the web better for all. The project enables the creation of websites and ads that are consistently fast, beautiful and high-performing across devices and distribution platforms. More details on https://www.ampproject.org/
How can I develop AMP websites?
You need to refer the above url for implementing AMP Projects, which has detailed information about syntax of AMP.
AMP integration with AEM
Step 1: To work with AMP and AEM, create an AMP file as shown below and deploy
it on any server.
(You can refer PWA implementation & deployment
article for the same:Set-up PWA running environment).
It takes a JSON input file(src="test.json") and publish data on page.
Step 2: Author a content fragment in AEM which has JSON format as below.
Follow this link for Creating & Authoring Content Fragments: Create & Author Content Fragments in AEM
Step 5: Now invoke the AMP file, from server, you can see that data is appearing as shown below.
AMP with AEM - click on it to see big
*(I haven't done styling just Functionality is tested).
Notes:
AMP - uses specific tags and syntax which needs to be validated after each change in code. You can use online AMP validator(https://validator.ampproject.org/) for this purpose.
We know that AEM Content Fragments helps to describe and manage structured content, where in Content Fragment Model helps to Define the structure of Content Fragment
Steps to work with AEM Content Fragment Models
Enable use of content fragment models in configuration manager.
Apply the configuration to Assets folder.
Creating a Content Fragment Model.
Update the definition of Content Fragment Model.
Publish it.
Delete it.
In this video we will see how to work with Content Fragment Model in detail.
Hope the Content Fragment and related changes are published already.
Now let us enable CORS, Anonymous access in publish environment.
Step 1: Add CORS details:
Since we are going to access the Content Fragment from external application, we may get CORS error(Cross-origin resource sharing). To enable the CORS access, we need to make some changes in AEM publish instance.
Go to AEM system > Console > ConfigManager > Apache Sling Main Servlet
Click on (+) icon and add new property for 'Additional response headers' as 'Access-Control-Allow-Origin=http://localhost:5000'
[AEM CORS ISSUE RESOLVED] - click on image to see it big
The new Content Fragment Model is now anonymously accessible on AEM Publish.
Now go back to PWA home page and click on the button, you can see that data is retrieved from AEM as shown below.
[Content Fragment Output to third party PWA application]
We now created a sample PWA and pulled content from AEM.
If you face any issue and need help in running this demo, please let me know through the comments.
Login to AEM, go to Assets > Files.
Let us create a folder now called 'My Samples' by clicking the create button.
Create CF Folder - click on it to see it big
Now go inside the folder and click on create > Content Fragment.
Then Select the Simple Fragment template. Enter title and description and then click on create.
Create Content Fragment AEM
In next dialog click on open and edit content fragment as shown below.
[Author CF]
To access the content fragment, we need to author it on a page. Let us author it on a sample we-retail page.
Now go to sites> we-retail > us >en > Men, open it for editing.
From component browser, drag and drop 'Content Fragment' component on the page.
[Author Content Fragment AEM 6.2 onwards
Click on Configure and add the newly created Content Fragment and save it.
[Authoring and landing]
We have the authored Content Fragment now. We can access it over the JSON Exporter API by invoking the '.model.json' in author instance, For me it was below URL.