Architecture
Now that we have a clearer definition of the backend features, we can start architecting the packages and components of the framework. We will need encapsulation for server and routing interfaces, as well as additional components that allow us to communicate with databases, fetch particular application configurations, and report metrics or logs through logging.
Figure 7.3: The request life cycle
Figure 7.3 represents a simplified view of the request life cycle that our framework will process. The requests can originate in a browser client or, potentially, be direct requests to an API endpoint of the server that our framework needs to handle. You can find a sample application built using our framework in the chapter directory under tests/sample
.
Figure 7.4: A sample application layout
We now have an overview of how a framework processes requests through its internals. Figure 7.4 shows an example of an application...