Chapter 3. The Architecture of a TurboGears Application

In This Chapter

  • 3.1 What Is MVC? 26

  • 3.2 Design Patterns and Object-Oriented MVC 27

  • 3.3 Understanding SQLObject and TurboGears Models 30

  • 3.4 Understanding CherryPy and TurboGears Controllers 33

  • 3.5 Understanding Kid and TurboGears Views 36

  • 3.6 MVC Meets Ajax 37

  • 3.7 Summary 39

TurboGears is built around the model-viewer-controller (MVC) paradigm. MVC is a system for breaking up applications into three different main sets of components: models, views, and controllers (see Figure 3.1). This is good because the model helps you to write applications faster and makes them easier to understand and maintain.

Figure 3.1. Keep your code separated with MVC

Get Rapid Web Applications with TurboGears: Using Python to Create Ajax-Powered Sites now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.