Professional Python® Frameworks

Web 2.0 Programming with Django® and Turbogears™

Dana Moore, Raymond Budd, William Wright

Publisher: Wrox, 2007, 420 pages

ISBN: 978-0-470-13809-0

Keywords: Python, Web Programming, Content Management

Last modified: Nov. 9, 2008, 11:23 a.m.

As two of the leading MVC web frameworks for Python, Django and TurboGears allow you to develop and launch sites in a fraction of the time compared to traditional techniques and they provide greater stability, scalability, and management than alternatives. Packed with examples, this book will help you discover a new methodology for designing, coding, testing, and deploying rich web applications.

A team of expert authors shows you the power of MVC frameworks and the capabilities of the TurboGears and Django packages. The Django chapters show you how to automate production of common web development tasks, portal creation, and content management, so you can focus on higher-level application issues and design. The TurboGears chapters illustrate how to rapidly create modern, highly interactive Web 2.0 applications. For both frameworks, you'll create useful applications that exemplify common Web 2.0 design paradigms and their solutions. Ultimately, you'll leverage your Python skills using Django and TurboGears and go from novice to RIA expert.

What you will learn from this book

  • How you can use frameworks to save you time and frustration in the development cycle
  • The elements, differences, and similarities of the TurboGears and Django frameworks
  • Advanced capabilities of both frameworks and how they easily solve issues common to web applications
  • Approaches to simplifying your client side JavaScript(r) with MochiKit, a Pythonic JavaScript® library
  • How to pair TurboGears with Flash for even more possibilities

Who this book is for

This book is for Python developers who want to learn rapid Web 2.0 development techniques using frameworks and incorporating a model-view-controller architecture.

  • Part I: Introduction to Python Frameworks.
    • Chapter 1: Web 2.0, Python, and Frameworks.
      • The Starting Line
        • What's Web 2.0?
        • The History of Application Design for Content Creation (In One Easy Dose)
      • The Role of AJAX in Web 2.0
      • Leveraging the Power of DSLs
      • Leveraging the Power of TurboGears
      • Leveraging the Power of Django
      • Leveraging the Power of Python
      • Comparing the Frameworks
        • The Historical Perspective
        • Controller Invocation
      • Summary
    • Chapter 2: Web 2.0 with Traditional Python.
      • Old-School Web Technologies
        • XML
        • HTML
        • HTTP
        • SQL
        • JavaScript
        • CGI and Python
      • A Simple Example
        • Architecture
        • The HTML Page
        • The JavaScript Code
        • The Database
        • The Python CGI Program
      • Summary
    • Chapter 3: Introducing the Frameworks.
      • Web Application Frameworks
        • MVC in Web Application Frameworks
        • Common Web Application Framework Capabilities
      • Introduction to TurboGears
        • TurboGears History
        • Main TurboGears Components
        • Alternate Components
        • MVC Architecture in TurboGears
        • Creating an Example Application
        • The Controller and View
      • Introduction to Django
        • Django History
        • Main Django Components
        • Alternate Components
        • MVC Architecture in Django
        • Creating an Example Application
      • Summary
  • Part II: TurboGears.
    • Chapter 4: Introduction to TurboGears.
      • TurboGears Components
        • TurboGears Models (SQLObjects)
        • TurboGears Controllers
        • TurboGears Views (Kid Templates and MochiKit)
        • TurboGears Widgets
      • An Example: A Simple Blog Site
        • Creating the Project
        • Defining the Model
        • Using TGCrud
        • Creating the Blog Author Views with TGCrud
        • Replacing the Blog Welcome Page
        • Changing Your Site's Look and Feel
      • Summary
    • Chapter 5: User Identity and Visitor Tracking.
      • Tracking Visits through Cookies
      • Managing User Identity
        • User Identity Model Objects
        • Identity Configuration Options
        • Other Identity Framework Components
        • Using the Identity Model Objects
        • Using the Identity Module
      • Visitor Tracking
        • Visitor Tracking Model Objects
        • Visitor Tracking Configuration Options
        • Visitor Tracking Plug-Ins
        • Adding Visitor Tracking
      • Summary
    • Chapter 6: Widgets.
      • TurboGears Widgets
      • Using the Widget Browser
      • Using Existing Widgets
        • Defining the Model Object
        • Accepting User Comments
      • Creating New Widgets
        • Creating a Simple Hello Widget
        • Creating a Comment Widget
      • Summary
    • Chapter 7: Advanced TurboGears Topics.
      • Your Assignment
      • The Operational Concept
      • Designing the Model
        • TurboGears Toolbox
        • The Model
        • The Controller
      • The View
      • Adding RSS Feed Capability
      • Summary
  • Part III: Django.
    • Chapter 8: Dblog: A Blog Implemented in Django.
      • Django Design Philosophies
      • An Example: A Simple Blog Simple
        • Initializing the Project
        • Initializing the Application
        • Creating the Model
        • Exploring the Model with Django's Admin Interface
        • Creating the Views
      • Summary
    • Chapter 9: Django Views and Users.
      • Template Inheritance
        • The DRY Problem
        • Defining a Base Template
        • Using the {% extends %} Directive
      • Generic Views
        • List-Detail Generic Views
        • Other Generic Views
      • User Authentication and Authorization
        • Installing User Management
        • The User Model
        • Authenticating a User
        • Enhancing the Base Template
        • User Permissions
        • Creating a User
      • Summary
    • Chapter 10: Advanced Django Topics: AJAX, RSS, and More.
      • AJAX and Django
        • MochiKit
        • Django Serialization for AJAX
        • AJAX-ified Blog Example
      • Django Add-Ons
        • django.contrib Add-Ons
        • Other Add-Ons
        • RSS in Detail
      • Deploying Django with Apache HTTPD
        • Installing and Configuring Apache
        • Configuring Other Items
      • Summary
  • Part IV: Advanced Client-Side Topics.
    • Chapter 11: MochiKit — Pythonic JavaScripting.
      • Why MochiKit?
      • What Is MochiKit?
        • What's Inside MochiKit?
        • MochiKit.Async
        • MochiKit.Base
        • MochiKit.DOM
        • MochiKit.Logging
        • MochiKit.Signal
        • MochiKit.Visual
        • MochiKit.Miscellany
      • Summary
    • Chapter 12: Flash-Based Interfaces and TurboGears.
      • The Flex Difference
        • What's Flex and Why Should I Use It?
      • A Flex2-based Blog
        • The Supporting Model
        • The Application Controller
        • The Flex Front-End
        • FBlog's MXML Implementation
        • Deconstructing FBlog
      • Summary
    • Appendix A: Tools Used.

Reviews

Professional Python® Frameworks

Reviewed by Roland Buresund

Mediocre **** (4 out of 10)

Last modified: June 12, 2008, 10:59 p.m.

A bit confusing

It seems to be a comparison between Django and TurboGears, with some raw Python thrown in for good measure. As an old Pythonista I appreciate the try, but I miss out on Zope and Pylons, and find the comparisons a bit uneven. I believe the best part is the MochiKit chapter.

In short, not bad, but not good either.

Comments

There are currently no comments

New Comment

required

required (not published)

optional

required

captcha

required