Introduction to DXA 2.0
By Manish Mehmood
The DD4T community has worked closely with SDL to combine the flexibility of Dynamic Delivery for Tridion (DD4T) with the ease-of-use of Digital Experience Accelerator (DXA) to launch DXA 2.0. By combining the best aspects of DD4T and DXA, DXA 2.0 provides high scalability and substantial performance improvements over previous versions of both frameworks.
DXA 2.0 introduces the model service as a part of the SDL Web Content Delivery microservice. This model service acts as a bridge between the DD4T data model, the DXA 1.x data model, and the new DXA 2.0 data model. This means that DXA 2.0 can consume both the old style DD4T published content and the new DXA 2.0 published content. In addition, it also significantly improves the performance by reducing the number of round trips needed by the web application to the SDL Web Content Delivery Data Store. The model service resolves component links to URLs, loads dynamic component presentations, etc., all of which makes is markedly faster than the previous versions of DXA.
DXA 2.0 is also more lightweight and streamlined, as it returns the Component Presentations and Pages in JSON format.
DXA 2.0 Architecture
The community made a major change in the DXA architecture to make it clean, simple and more performance oriented. The community replaced the DD4T Data model and DXA domain model with R2 Data Model which is more abstract and much closer to the strongly typed View Models.
This strongly typed view model is simple and straight-forward as compared to the semantic model mapping in DD4T which is much closer to the TCM domain model.
DXA 2.0 Advantages & Features
Below is an overview of the many new features included in DXA 2.0.
New Data Model – DXA 2.0 introduces a new R2 Data Model which combines the features of DXA and DD4T. Content Model is closer to domain Model and DD4T is closer to Tridion Content Model than it should be. DXA uses DD4T as an intermediate model which is transformed to a View Model. DXA 2.0 Data Model is more abstract and closer to DXA view model.
Improved Publishing Pipeline – Introducing new DXA TBBs for building the DXA 2.0 data model which returns the output as JSON. This noticeably improves the publishing performance.
The linked components are now expanded in the model service, which speeds up the publishing time.
DXA 2.0 DXA Resolver – The recursion depth can be set through UI extension and defaults to infinite.
The new DXA resolver publishes the linked components with a new template introduced by DXA 2.0
DXA 2.0 CIL Extension Points introduced– CIL.NET can be extended through Unity.
Implementation for logging, service configuration, OAuth provider and ADF claim provider can be changed.
CIL and DXA are now closed to each other which allows DXA 2.0 to share the same implementations. CIL logging can use DD4T and DXA logging implementations.
Provide Cache Improvements –DXA 2.0 now uses same cache mechanism as CIL. Cache region support is provided so that items can be placed in cache with named regions that identify which cache it can use.
DXA 2.0 also takes advantage of distributed caching provided by CIL. Which either makes it fully distributed or places selected cache regions in distributed cache.
Improved View Model Caching – In previous versions, view model caching was not fully supported. Model serialization was not possible earlier, so distributed caching was not possible.
Now you can cache full models and views. A view model is fully serialized so can be cached in the distributed system.
Now there are multiple layers of caching like output, pages, and entities, which are separately managed.
It also provides support for disabling the caching on a per View Model basis.
New Model Service Introduced – This is a non-public RESTful service introduced by DXA 2.0 which lies between Universal Delivery Platform (UDP) and DXA which fetches the content for pages and entities.
The extension property in the content service web capability makes it discoverable, so it communicates with UDP via CIL java.
The model service is responsible for expansion of linked component, include pages, etc.
It also provides the backward compatibility along with reduced redundancy of the code across java and .NET DXA frameworks.
It also contains converters that perform the conversion between DD4T and DXA data models.
Introduced New DD4T providers – In order to use the model service, new DD4T providers are introduced in DXA 2.0 which helps move away from the old DD4T, while maintaining backward compatibility. It returns the same DD4T content even if published with new Data Model.
Content Bloom has been working extensively with the new DXA 2.0 framework, both in proof of concept projects and actual implementations. Our experiences with the new framework are positive, both for upgrades and for ease of use of building websites with it.
A Recap of Tridion Expert Summit 2020 – Day 2
Here’s a full recap on Day 2 of Tridion Expert Summit 2020.
Hacking the Tridion UDP Library
Follow along as our Tridion Practice Lead, Damian Jewett, walks through how to hack the Tridion UDP library.
A Recap of Tridion Expert Summit 2020 – Day 1
A detailed overview of SDL’s expert summit, TXS2020.