In this section, we will try to evolve our sample as a microservice application. We will be using the example of an online e-commerce website that sells clothing, accessories, shoes, and so on. This website has started gaining popularity, and they have to show offers on a weekly basis, or sometimes a daily basis, on the website. New features are added daily to the website.
The assumption here is that we are dealing with a single-page application. If we have to evolve this application as a microservice pattern, first we will think of it in terms of its service. There are two major categories of service-view service and backend service. Our first step would be to differentiate the view and backend (model and controller) sections.
The view service is the part that the user sees on the pages. It can be divided again into two parts--static content and dynamic content. Static content will be CSS files, some common JS files, and so on. Dynamic content is the template...