Glossary¶
- action
- The class method in a Pylons applications’ controller that handles a request.
- API
- Application Programming Interface. The means of communication between a programmer and a software program or operating system.
- app_globals
The
app_globals
object is created on application instantiation by theGlobals
class in a projectslib/app_globals.py
module.This object is created once when the application is loaded by the projects
config/environment.py
module (See Environment). It remains persistent during the lifecycle of the web application, and is not thread-safe which means that it is best used for global options that should be read-only, or as an object to attach db connections or other objects which ensure their own access is thread-safe.- c
- Commonly used alias for tmpl_context to save on the typing when using lots of controller populated variables in templates.
- caching
- The storage of the results of expensive or length computations for later re-use at a point more quickly accessed by the end user.
- CDN
- Content Delivery Networks (CDN’s) are generally globally distributed content delivery networks optimized for low latency for static file distribution. They can significantly increase page-load times by ensuring that the static resources on a page are delivered by servers geographically close to the client in addition to lightening the load placed on the application server.
- ColdFusion Components
- CFCs represent an attempt by Macromedia to bring ColdFusion closer to an Object Oriented Programming (OOP) language. ColdFusion is in no way an OOP language, but thanks in part to CFCs, it does boast some of the attributes that make OOP languages so popular.
- config
- The
PylonsConfig
instance for a given application. This can be accessed aspylons.config
after an Pylons application has been loaded. - controller
- The ‘C’ in MVC. The controller is given a request, does the necessary logic to prepare data for display, then renders a template with the data and returns it to the user. See Controllers.
- easy_install
A tool that lets you download, build, install and manage Python packages and their dependencies. easy_install is the end-user facing component of setuptools.
Pylons can be installed with
easy_install
, and applications built with Pylons can easily be deployed this way as well.See also
- dotted name string
- A reference to a Python module by name using a string to identify it,
e.g.
pylons.controllers.util
. These strings are evaluated to import the module being referenced without having to import it in the code used. This is generally used to avoid import-time side-effects. - egg
Python egg’s are bundled Python packages, generally installed by a package called setuptools. Unlike normal Python package installs, egg’s allow a few additional features, such as package dependencies, and dynamic discovery.
See also
- EJBs
- Enterprise JavaBeans (EJB) technology is the server-side component architecture for Java Platform, Enterprise Edition (Java EE). EJB technology enables rapid and simplified development of distributed, transactional, secure and portable applications based on Java technology.
- environ
- environ is a dictionary passed into all WSGI application. It generally contains unparsed header information, CGI style variables and other objects inserted by WSGI Middleware.
- ETag
- An ETag (entity tag) is an HTTP response header returned by an HTTP/1.1 compliant web server used to determine change in content at a given URL. See http://wikipedia.org/wiki/HTTP_ETag
- g
- Alias used in prior versions of Pylons for app_globals.
- Google App Engine
A cloud computing platform for hosting web applications implemented in Python. Building Pylons applications for App Engine is facilitated by Ian Bicking’s appengine-monkey project.
- h
- The helpers reference,
h
, is made available for use inside templates to assist with common rendering tasks.h
is just a reference to thelib/helpers.py
module and can be used in the same manner as any other module import. - Model-View-Controller
An architectural pattern used in software engineering. In Pylons, the MVC paradigm is extended slightly with a pipeline that may transform and extend the data available to a controller, as well as the Pylons WSGI app itself that determines the appropriate Controller to call.
See also
- MVC
- See Model-View-Controller
- ORM
- (Object-Relational Mapper) Maps relational databases such as MySQL, Postgres, Oracle to objects providing a cleaner API. Most ORM’s also make it easier to prevent SQL Injection attacks by binding variables, and can handle generating sometimes extensive SQL.
- Pylons
- A Python-based WSGI oriented web framework.
- Rails
- Abbreviated as RoR, Ruby on Rails (also referred to as just Rails) is an open source Web application framework, written in Ruby
- request
- Refers to the current request being processed. Available to import
from
pylons
and is available for use in templates by the same name. SeeRequest
. - response
- Refers to the response to the current request. Available to import
from
pylons
and is available for use in template by the same name. SeeResponse
. - route
- Routes determine how the URL’s are mapped to the controllers and which URL is generated. See URL Configuration
- setuptools
An extension to the basic distutils, setuptools allows packages to specify package dependencies and have dynamic discovery of other installed Python packages.
- SQLAlchemy
- One of the most popular Python database object-relational mappers (ORM). SQLAlchemy is the default ORM recommended in Pylons. SQLAlchemy at the ORM level can look similar to Rails ActiveRecord, but uses the DataMapper pattern for additional flexibility with the ability to map simple to extremely complex databases.
- tmpl_context
- The
tmpl_context
is available in thepylons
module, and refers to the template context. Objects attached to it are available in the template namespace as eithertmpl_context
orc
for convenience. - UI
- User interface. The means of communication between a person and a software program or operating system.
- virtualenv
A tool to create isolated Python environments, designed to supersede the
workingenv
package and virtual python configurations. In addition to isolating packages from possible system conflicts, virtualenv makes it easy to install Python libraries using easy_install without dumping lots of packages into the system-wide Python.The other great benefit is that no root access is required since all modules are kept under the desired directory. This makes it easy to setup a working Pylons install on shared hosting providers and other systems where system-wide access is unavailable.
virtualenv
is employed automatically by thego-pylons.py
script described in Getting Started. The Pylons wiki has more information on working with virtualenv.- web server gateway interface
- A specification for web servers and application servers to communicate with web applications. Also referred to by its initials, as WSGI.
- WSGI
- The WSGI Specification, also commonly referred to as PEP 333 and described by PEP 333.
- WSGI Middleware
WSGI Middleware refers to the ability of WSGI applications to modify the environ, and/or the content of other WSGI applications by being placed in between the request and the other WSGI application.