Basics of client-side composition
The beauty of client-side composition lies in its simplicity and directness. There is a lot of modern web philosophy employed here without requiring any complicated backend infrastructure. The main ingredient is usually a framework-agnostic transportation mechanism using web components even though other mechanisms might be used, too.
Framework-agnostic approaches have the advantage that they only use browser APIs, but no custom APIs or principles brought in by some framework. As such, they do not require any maintenance and work well under pretty much all circumstances. They are also among the most secure approaches as browsers actively test and update to have their APIs used the intended way.
We will start by looking at the architecture of client-side composition before we follow the essential steps to come up with a sample implementation. Finally, we will look at potential enhancements for the sample.
The architecture
In the previous...