The delivery layer

With the foundation, that is, the data layer in place, we build on it when we develop the delivery layer. Between the delivery layer and the database layer, there is an additional layer that encapsulates the domain-specific knowledge (that is, it knows how to verify that the title of a new Topic entity conforms to the requirements we set for it before it stores it in the database):

The delivery layer

Each different layer in our application is implemented in its own file or files. It is easy to get confused, so before we delve further into these files, have a look at the following table. It lists the different files that together make up the wiki application and refers to the names of the layers introduced in Chapter 1, Choosing Your Tools (shown again in the previous image).

File

Layer

 

wikiweb.py

Content Delivery Framework

Our main CherryPy application

wiki.py

Object Relational Mapper

The domain specific part; Imported by wikiweb.py

wikidb.py

Object Relational Mapper

The domain independent part; Imported by wikiweb.py

basepage.html

Structural Representation

Used by wikiweb.py to serve pages to the client

wikiweb.js

Graphical User Interface

Referred to in basepage.html; Implements user interaction like mouse clicks.

wiki.css

Graphical User Interface

Referred to in basepage.html; Implements the layout of graphical components.

We'll focus on the main CherryPy application first to get a feel for the behavior of the application.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.12.123.189