Course Outline

About web2py


  • Participants must have a basic knowledge of Participants must have a basic knowledge of Python
  • Knowledge of Linux environment


  • 2-3 days (covering a subset of the topics - contact us for more information/customization)

Lab Setup

  • Hardware Configuration
    • Participants must have access to a system with the following hardware configuration:
    • 2GB of free RAM, 20GB of free disk space and full network connectivity
  • Software Configuration
    • Ubuntu 16.04 Desktop Edition (sudo/root access required)
    • Firefox and Chrome browsers

Course Outline for web2py

Introduction to Web Application Programming (Concept)
  • Static v/s Dynamic applications
  • Client/server computing
  • TCP/IP protocol
  • Application layer protocol — HTTP
  • HTTP Request and Response
  • Asynchronous requests with XMLHttp
  • 3 tier architectures
  • Client side applications and frameworks — HTML/JS/CSS
  • Server side languages and frameworks
  • Overview of Model/View/Controller (MVC )
  • Tooling
  • Using tooling to inspect page content (HTML/JS/CSS)
  • Using tooling to inspect request and response headers
  • Using tooling to inspect traffic flow
  • Analysis of a few popular client/server applications
  • Examples of MVC frameworks
Introduction to web2py
  • Why web2py?
  • Use of MVC in web2py
Installing web2py
  • Installing Python
  • Installing a database
  • Installing web2py
  • Verifying the setup
  • Overview of development v/s production setup
  • Creating a project
  • Understanding the web2py project structure
Working with Models and Databases (Concept)
  • Datastore design considerations
  • Relational v/s NoSQL stores
  • Understanding database abstraction layers (DAL)
  • Entities, Relationships
  • Tables, Fields, Keys, Indexes
  • Object Relational Mapping (ORM) and ORM issues
web2py database abstraction
  • Database abstraction layer (DAL) constructor
  • Model-less applications
  • Table constructor
  • Field constructor
  • Querying database
  • Handling relationships - OneToOne, OneToMany, ManyToOne
  • Object CRUD
  • Creating objects
  • Retrieving objects
  • Exporting and importing data
Admin site
  • Activating the admin site
  • Starting the development server
  • Entering the admin site
Working with Controllers, Views and Templates (Concept)
  • Data formats
  • XML and JSON
  • MVC v/s MVP v/s MTV
  • Thin clients v/s Thick clients
  • Serializing and Deserializing of objects
  • Conversion between Python objects and Javascript objects
  • Need for templates
  • Anti-patterns in MVC design
URLs and Views
  • Writing views
  • URLs – absolute & digitally signed
  • Helpers
Running tasks using web2py
  • Cron
  • web2py scheduler
  • Tasks and task lifecycle
Error pages
  • Raising 404
  • Writing a 404 (page not found) view
Forms and validators
  • Writing a simple form
  • Validators
  • Widget
Emails and SMS
  • Configuring email for Google App Engine
  • Text and HTML emails
  • Sending SMS
  • Using template system to generate messages

The classroom training will be provided in Bangalore (Bengaluru), Chennai, Hyderabad or Mumbai and will be conducted in the client's premises. All the necessary hardware/software infrastructure must be provided by the client.