so I've always developed in full-stack but decided to investigate the headless model. the Adobe tutorial (click here for link) is talking about various stuff and I have some questions.
Thanks!
Solved! Go to Solution.
Views
Replies
Total Likes
Q. It seems to me content fragments is only useful if the data to be displayed resembles a database table(s) (e.g. Oracle DB)
We have worked with multiple customers to deliver sites via Content Fragments.
For couple of them we had used Hybrid mode, where CF is used for content, website delivered by AEM Sites and GraphQL for delivery by other channels
Q. Content fragments is not useful for generic pages like "about us" or any presentation where the author wants to control the look-and-feel of the public page
For headless, presentation is taken care by front-end layer.
If you want to have a say in presentation from AEM, then Experience Fragments would be a better option.
Q. What happens if the data is coming from another API. As an example, a Dell Boomi API was created to return a list of products. (I guess what I'm saying is that the source of truth for products is hosted on a different application. I'm guessing you don't have to have the product list as content fragments in AEM as that's duplication and can cause issues if the source and AEM content fragment is not in sync)
We can use Reverse Proxy to direct the requests to the Third-party API. It can be done on dispatcher or CDN level.
Q. It seems to me content fragments is only useful if the data to be displayed resembles a database table(s) (e.g. Oracle DB)
We have worked with multiple customers to deliver sites via Content Fragments.
For couple of them we had used Hybrid mode, where CF is used for content, website delivered by AEM Sites and GraphQL for delivery by other channels
Q. Content fragments is not useful for generic pages like "about us" or any presentation where the author wants to control the look-and-feel of the public page
For headless, presentation is taken care by front-end layer.
If you want to have a say in presentation from AEM, then Experience Fragments would be a better option.
Q. What happens if the data is coming from another API. As an example, a Dell Boomi API was created to return a list of products. (I guess what I'm saying is that the source of truth for products is hosted on a different application. I'm guessing you don't have to have the product list as content fragments in AEM as that's duplication and can cause issues if the source and AEM content fragment is not in sync)
We can use Reverse Proxy to direct the requests to the Third-party API. It can be done on dispatcher or CDN level.
HI @jayv25585659 ,
Headless AEM allows you to deliver content via APIs, decoupling the content management from the presentation layer. This is particularly useful for multi-channel delivery where the same content needs to be available on websites, mobile apps, IoT devices, and more.
Let's address your specific questions:
Content Fragments Use Case:
External Data Sources (e.g., Dell Boomi API):
Integration with External APIs: If your data resides in an external system like Dell Boomi, you don't need to duplicate that data in AEM Content Fragments. Instead, you can use AEM's integration capabilities to fetch data from external APIs on-demand. This ensures that the source of truth remains the external system, and AEM simply consumes this data.
Approaches for Integration:
Example: Here's a simplified example of a Sling Model fetching data from an external API:
@Model(adaptables = Resource.class)
public class ProductModel {
@ValueMapValue
private String apiUrl;
public List<Product> getProducts() {
List<Product> products = new ArrayList<>();
try (CloseableHttpClient httpClient = HttpClients.createDefault()) {
HttpGet request = new HttpGet(apiUrl);
HttpResponse response = httpClient.execute(request);
String jsonResponse = EntityUtils.toString(response.getEntity());
products = parseProducts(jsonResponse);
} catch (IOException e) {
// Handle exception
}
return products;
}
private List<Product> parseProducts(String jsonResponse) {
// Parse the JSON response into a list of products
// Implementation omitted for brevity
}
}
Additional Considerations:
By leveraging these concepts, you can effectively utilize AEM in a headless manner, ensuring efficient content delivery across multiple channels while maintaining robust content management capabilities.
Views
Likes
Replies