Time for action choosing a delivery framework, also known as web server

In the first section of this chapter, we showed that a web application lives in two realms at the same time, namely, on the server and on the client. In order to deliver information to the client and receive a response in return, our web application needs two important items at the server: a delivery framework and an application to compose content and respond to the request.

The delivery framework might be a full-fledged general purpose web server such as Apache or Microsoft Information Server, but although these are very versatile and come with many options to tune the web server to your specific needs, they certainly take quite some time to get acquainted with and it takes extra attention to integrate the dynamic content of your application with these servers. If performance is crucial or the requirements for your project include that your application has to be deployed as part of these servers, you may not have a choice, but otherwise its worth looking at the alternatives that are simpler to use or offer integration advantages.

So what do we need?

  • A fairly lightweight web server that is easy to configure and maintain
  • That allows for smooth integration of static and dynamic content
  • That comes with reusable components that ease the development process
  • That is actively maintained and developed

Given these requirements, our choice for delivery framework is CherryPy.

What just happened?

CherryPy fits the bill nicely. Its main advantages are:

  • CherryPy is written in Python and components that deliver dynamic content are written as Python classes that are tightly integrated with CherryPy's core.
  • CherryPy comes with a whole host of tools; reusable components that can be used to implement anything from custom error pages to session management.
  • CherryPy has a proven track record as the core web server of the larger TurboGears network.
  • And finally, CherryPy is actively developed and enjoys a large user community.

The disadvantage of being written in Python is that performance might not be top notch, but we will look into that in the next section.

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

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