Python

TurboGears Tutorial: Social Bookmarking Application

Anyone interested in web development should have heard about the Model-View-Controller software pattern by now. This pattern emphasizes on separation of application's data model, UI (view), and control logic. The concept itself isn't new and has been around since 1979, but recently there have been many successful implementations of the pattern in the domain of web development.

Like any self-respecting web developer, I started to explore the available frameworks, and quickly settled on Python as a language and TurboGears as a framework. I viewed many webcasts and documents, then decided to practice my newly gained knowledge by writing a basic del.icio.us-like social bookmarking application in TurboGears. Now I'm documenting my work as a tutorial, hoping that other TurboGears newcomers would find something useful in it. The tutorial covers the following concepts:

  • Designing data models.
  • Developing controller Logic.
  • Creating view templates.
  • Working with forms and widgets.

There are also sections for the reasons behind my Python/TurboGears choice, and the installation process.

Please read on for the tutorial itself and an attachment of the project's source code at the end. I recommend viewing the code while working with the tutorial, as I didn't include imports or other tiny bits. In addition, the tutorial assumes good knowledge of Python.

Read more

Tags:
Submitted by Ayman on Fri, 2006/08/18 - 6:17pm

Syndicate content

About

Ayman Hourieh

I'm a Computer Science graduate, an Open Source enthusiast, and a Googler.

I'm 24 years old, and live in Dublin, Ireland.

This is my personal blog. The views expressed on these pages are mine alone and not those of my employer.

More

Books

Learning Website Development with Django

Learning Website Development with Django
A beginner's tutorial to building web applications, quickly and cleanly, with the Django application framework.

My first book. Published by Packt Publishing in April 2008.

Icons

Get Firefox!
Drupal.org
Linux
Gentoo
Creative Commons License