And finally, we've reached part 2 of this topic. Not exactly “arriving shortly,” as mentioned in part 1, but better late than never :).
DXA 2.1 & 2.2
I’ve already covered DXA 2.1 in more detail in the following blog, but just a reminder that the focus of that particular release was to leverage and showcase the features of Sites 9 and its Dynamic Experience Delivery (DXD) 11. This includes:
- The GraphQL Content Service
- Content Mashups
- Native (Schema-based) Regions
Another big change in 2.1 is that the architectures for DXA for Sites and DXA for Docs have converged. The initial Documentation Portal (DXA implementation for Docs) was based on DXA (for Sites) 1.8, but it was quickly diverging from the original architecture. This meant that it was getting unmanageable, so in DXA 2.1, it was again brought under one roof. The Documentation Portal is now just a module for DXA, the DXA Dynamic Documentation Module (+ the webapp front).
In between writing the two parts of this blog, DXA 2.2 has also made its appearance. I’ve already covered it somewhat in the following blog, but just a reminder that the focus of that particular release was to have feature parity for Java; a reminder that 2.1 only supported .NET.
Besides that, 2.2 reintroduced support for Web 8, incorporated numerous bugfixes and community contributions.
DXA Architecture 2.0 -> 2.1/2.2
Similarly to part 1 of this blog (heading DXA 1.x -> 2.), let’s take a look at the DXA 2.0 architecture compared to 2.1/2.2. Both architectures are illustrated below, where:
- The green rectangles represent parts of the system where custom implementation is expected
- The blue rectangles are part of the DXA framework
- The gray rectangles are part of the Content Delivery (CD) (DXD before SDL Tridion Sites 9)
- The dark blue rectangle is used by the framework but is not an integral part of it; it is developed and provided separately
The biggest change between version 2.0 and versions 2.1 and 2.2 is that the DXA Model Service is now a DXA Model Extension, an extension of the GraphQL Model Service introduced in DXD 11.
Another significant change is that the DXD GraphQL client now replaces the Model Service client. Said client is available in Controllers as well, giving us more flexibility, ie. when we need to enrich entities with dynamic data.
The role of CIL is once again reduced and although it’s getting smaller and smaller (DXA 1.x -> 2.0, 2.0 -> 2.1), it is still needed. Interactions with the Discovery Service, Token Service (OAuth), and Context Service are still relying on CIL.
We can also see the Docs Portal that is part of the “unified” framework via the Dynamic Documentation Module. The Docs Portal showcases a frontend-oriented architecture where the Controllers provide JSON data and the rendering is done client-side. It is implemented in React.
Because DXA 2.2 supports Web 8 as well, it can also work with the architecture on the left, but in that case, features introduced in Sites 9/DXD 11 are not available (i.e., Native Regions, Content mashup, etc.).
DXD GraphQL client
As mentioned previously, and as indicated by the different colors in the architecture diagram, the DXD GraphQL client is not an integral part of the DXA framework. It’s developed and provided independently, and we can even use it without the rest of the framework (independent of CIL also). It is available on GitHub, NuGet, and Maven.
The DXD GraphQL client:
- Can retrieve Tridion Sites and Docs content
- If published to the same DXD Environment
- Facilitates “Content Mashups”
- Interacts with DXD Content Service through GraphQL queries
- Content Service acts as “GraphQL Model Service” through DXA Model Extension
DXA for Dynamic Documentation
As mentioned earlier, the architecture of DXA for Docs is converged to that of DXA 2.1 as shown in the image below.
Besides the main module for Docs, the DD Module, the Docs Portal also leverages additional modules to provide added functionality. These modules are Search Module for searching and UGC Module for threaded commenting on Docs Topics, but also ratings.
Both of these modules are available for Sites as well, the UGC Module being added in 2.1.
DXA 2.2 -> 3.0
Lastly, we will take a look at the envisioned architecture post DXA 2.x. The architecture is shown on the image below (the color coding is the same as before).
The most significant change is that the role of the DXA Model Extension will be completely taken over by the GraphQL Content Service (CS). In other words, instead of having an extension, the functionality will be a core feature of the CS.
Besides that, Semantic Mapping, which is part of the DXA framework, will also be moved into the CS. That means that the CS will be capable of returning strongly typed view models. This is very powerful, and it can be leveraged by classic MVC-style applications, but also directly from front-end oriented (client-side frameworks) and headless applications. To stress once more, we are talking about strongly typed objects here right out of the “content layer.”
And finally, we've made it to the last topic in this series about the
upcoming now released features of Sites 9.1. As always, if you have any questions or would like to share your thoughts, don’t hesitate to get in contact.
Disclaimer: All images are copied from SDL with their permission.