![]() First, it's an introduction to microservices and containers. The eShopOnContainers sample application uses the monolithic UI approach for multiple reasons. For instance, you won't use the same techniques for building a traditional web application that you use for building an SPA or for native mobile app (as when developing Xamarin apps, which can be more challenging for this approach). But in this case, each one is responsible for a small UI area.Ī composite UI approach that's driven by microservices can be more challenging or less so, depending on what UI technologies you're using. Example of a composite UI application shaped by back-end microservicesĮach of those UI composition microservices would be similar to a small API Gateway. It depends on whether you're building a traditional web approach (ASP.NET MVC) or an SPA (Single Page Application).įigure 4-21. This approach is simplified because you might have other microservices that are aggregating granular parts that are based on different techniques. If the microservice changes the shape, the UI changes also.įigure 4-21 shows a version of this composite UI approach. The key difference is that you have client UI components (TypeScript classes, for example) based on templates, and the data-shaping-UI ViewModel for those templates comes from each microservice.Īt client application start-up time, each of the client UI components (TypeScript classes, for example) registers itself with an infrastructure microservice capable of providing ViewModels for a given scenario. Some of the microservices drive the visual shape of specific areas of the UI. In contrast, a composite UI is precisely generated and composed by the microservices themselves. A monolithic UI application consuming back-end microservices The figure is a simplification that highlights that you have a single (monolithic) client UI consuming the microservices, which just focus on logic and data and not on the UI shape (HTML and JavaScript).įigure 4-20. ![]() Of course, you could have an ASP.NET MVC service in between producing the HTML and JavaScript. With this approach, the microservices you build can be complete with both logic and visual representation.įigure 4-20 shows the simpler approach of just consuming microservices from a monolithic client application. That means having a composite UI produced by the microservices, instead of having microservices on the server and just a monolithic client app consuming the microservices. However, a more advanced approach, called micro frontends, is to design your application UI based on microservices as well. Microservices architecture often starts with the server-side handling data and logic, but, in many cases, the UI is still handled as a monolith.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |