Case study– Building a web application using the REST API
In this chapter, we learned how to build a simple web application using Flask and how to add a REST API to a business logic layer using a Flask extension. In the real world, web applications are typically three tiers: web layer, business logic layer, and data access layer. With the popularity of mobile apps, the architecture has evolved to have a REST API as a building block for the business layer. This affords the freedom of building web apps and mobile apps using the same business logic layer. Moreover, the same API can be available for B2B interactions with other vendors. This type of architecture is captured in Figure 10.2:
In our case study, we will develop a web application on top of the REST API application that was developed for the Student
model object in the previous code example. At a high level, we will have the components in...