Summary
In this chapter, we looked at some common architectural patterns of building software. We started with the Model View Controller architecture, and looked at examples in Django and Flask. You learned about the components of an MVC architecture, and learned that Django implements a variant of MVC using templates.
We looked at Flask as an example of a micro framework that implements the minimal footprint of a web application by using a plugin architecture with additional services that can be added on.
We went on to discuss the Event-driven programming architecture, which is a kind of asynchronous programming using co-routines and events. We started with a multiuser chat example using the select
module in Python. From there, we went on to discuss larger frameworks and libraries.
We discussed the architecture of Twisted and its components. We also discussed Eventlet and its close cousin gevent. For each of these frameworks, we saw an implementation of the multiuser chat server.
Next, we...