পৃষ্ঠাসমূহ

Search Your Article

CS

Pageviews

Showing posts with label CherryPy Tutorial. Show all posts
Showing posts with label CherryPy Tutorial. Show all posts

Tuesday, February 14, 2017

CherryPy - Introduction

CherryPy is a web framework of Python which provides a friendly interface to the HTTP protocol for Python developers. It is also called a web application library.
CherryPy uses Python’s strengths as a dynamic language to model and bind HTTP protocol into an API.

CherryPy - Environment Setup

CherryPy comes in packages like most open-source projects, which can be downloaded and installed in various ways which are mentioned as follows −
  • Using a Tarball
  • Using easy_install
  • Using Subversion

CherryPy - Vocabulary

There are a few important keywords which need to be defined in order to understand the working of CherryPy. The keywords and the definitions are as follows −

Built-in Http Server & Internal Engine

CherryPy comes with its own web (HTTP) server. That is why CherryPy is self-contained and allows users to run a CherryPy application within minutes of getting the library.
The web server acts as the gateway to the application with the help of which all the requests and responses are kept in track.

CherryPy - ToolBox

Within CherryPy, built-in tools offer a single interface to call the CherryPy library. The tools defined in CherryPy can be implemented in the following ways −
  • From the configuration settings
  • As a Python decorator or via the special _cp_config attribute of a page handler
  • As a Python callable that can be applied from within any function

CherryPy - A Working Application

Full stack applications provide a facility to create a new application via some command or execution of the file.
Consider the Python applications like web2py framework; the entire project/application is created in terms of MVC framework. Likewise, CherryPy allows the user to set up and configure the layout of the code as per their requirements.

CherryPy - Web Services

A web service is a set of web-based components that helps in the exchange of data between the application or systems which also includes open protocols and standards. It can be published, used and found on the web.

CherryPy - Presentation Layer

The Presentation Layer ensures that the communication passing through it targets the intended recipients. CherryPy maintains the working of presentation layer by various template engines.
A template engine takes the input of the page with the help of business logic and then processes it to the final page which targets only the intended audience.

CherryPy - Use Of Ajax

Till the year 2005, the pattern followed in all web applications was to manage one HTTP request per page. The navigation of one page to another page required loading the complete page. This would reduce the performance at a greater level.

CherryPy - Demo Application

In this chapter, we will focus on how an application is created in CherryPy framework.
Consider Photoblog application for the demo application of CherryPy. A Photoblog application is a normal blog but the principal text will be photos in place of text. The main catch of Photoblog application is that the developer can focus more on design and implementation.

CherryPy - Testing

Testing is a process during which the application is conducted from different perspectives in order to −
  • Find the list of issues
  • Find differences between the expected and actual result, output, states, etc.
  • Understand the implementation phase.
  • Find the application useful for realistic purposes.

CherryPy - Deployment Of Application

This chapter will focus more on CherryPy-based application SSL enabled through the built-in CherryPy HTTP server.

Configuration

There are different levels of configuration settings required in a web application −

CherryPy - Quick Guide

CherryPy - Introduction

CherryPy is a web framework of Python which provides a friendly interface to the HTTP protocol for Python developers. It is also called a web application library.

CherryPy - Useful Resources

The following resources contain additional information on CherryPy. Please use them to get more in-depth knowledge on this.

Discuss CherryPy

CherryPy allows developers to build web applications in much the same way they would build any other object-oriented Python program. This results in smaller source code developed in less time. It is being used in many production websites.