Symfony 1.3 Web Application Development

Symfony 1.3 Web Application Development
eBook: $23.99
Formats: PDF, PacktLib, ePub and Mobi formats
save 50%!
Print + free eBook + free PacktLib access to the book: $63.98    Print cover: $39.99
save 53%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Table of Contents
Sample Chapters
  • Create powerful web applications by leveraging the power of this Model-View-Controller-based framework
  • Covers all the new features of version 1.3 – many exciting plug-ins for you
  • Learn by doing without getting into too much theoretical detail – create a "real-life" milkshake store application
  • Includes best practices to shorten your development time and improve performance

Book Details

Language : English
Paperback : 228 pages [ 235mm x 191mm ]
Release Date : September 2009
ISBN : 1847194567
ISBN 13 : 9781847194565
Author(s) : Tim Bowler, Wojciech Bancer
Topics and Technologies : All Books, Web Development, Open Source, PHP, Web Development


Table of Contents

Chapter 1: Getting Started with Symfony
Chapter 2: Developing Our Application
Chapter 3: Adding the Business Logic and Complex Application Logic
Chapter 4: User Interaction and Email Automation
Chapter 5: Generating the Admin Area
Chapter 6: Advanced Forms and JavaScript
Chapter 7: Internationalizing our Global Positions
Chapter 8: Extending Symfony
Chapter 9: Optimizing for Performance
Chapter 10: Final Tweaks and Deployment
  • Chapter 1: Getting Started with Symfony
    • Exploring Symfony
      • The framework
        • The Model-View-Controller pattern
      • Taking a look at the key features
        • Forms and validation
        • Plugins
        • Internationalization and localization
        • Generators
        • Cache
        • Testing
        • Configuration files
    • Coding guidelines
      • Symfony-specific guidelines
    • Installing Symfony
    • Summary
  • Chapter 2: Developing Our Application
    • The milkshake shop
      • Creating the skeleton folder structure
      • Creating our database schema
      • Configuring the ORM layer
        • Configuring the database connection
      • Generating the models, forms, and filters
      • Building the database
        • Creating the application modules
      • Handling the routing
      • The application logic
        • Rendering the template
        • Adding our routing rules
        • Configuring template parameters
        • Styling the pages
      • Common installation problems
        • Web server 404 error page
        • A symfony 'Oop! An error occurred'
        • Pages and debug bar do not render correctly
    • Summary
  • Retrieving the result set from the action
    • The template logic
      • Returned results
      • Using the DAOs
      • Displaying the results
    • Helpers
    • Paginating our menu
      • Adding the pager business logic
      • Setting a configuration option
    • Amending the action
      • Accessing the $_POST, $_GET, and $_REQUEST variables
      • Accessing the application and module configuration file
      • Building up the routing
      • Organizing a template with partials
    • Creating the milkshake page
      • Routing with an object
      • Adding the route to the template
      • Retrieving many-to-many results
      • Accessing related objects in the action
      • Accessing related objects in the templates
  • Plugins
    • DbFinderPlugin
      • Finishing off the location page
  • Summary
  • Chapter 4: User Interaction and Email Automation
    • The signup module
    • Binding a form to a database table
      • A look at the generated base class
      • Rendering the form
      • Customizing form widgets and validators
        • Removing unneeded fields
        • Modifying the form widgets
        • Adding form validators
        • Form naming convention and setting its style
    • Submitting the form
    • Changing the global rendering of forms
    • Customizing the rendering of the form
      • Form security for the user
    • Creating a simple form
    • Automated email responses
      • Adding the mailer settings to the application
      • Creating the application logic
      • The partial email template
    • Flashing temporary values
    • Creating a plugin
    • Packaging a plugin
    • Summary
  • Chapter 5: Generating the Admin Area
    • How Symfony can help us
    • Initializing generator
      • Creating application and module
      • Exploring list view
        • Looking into the generated list view code
    • Customizing the admin generator
      • Customizing the edit view
    • Handling foreign keys using admin generator
      • Accessing application settings from generator.yml
      • Using partials in the generated views
    • Customizing the layout
    • Securing the application
      • Setting up credentials (permissions)
      • Handling credentials in templates
      • Tidying up the backend
    • Summary
  • Chapter 6: Advanced Forms and JavaScript
    • Adding JavaScript code into the Symfony project
      • JavaScript frameworks
      • Using JavaScript helpers
      • Adding JavaScript files into the header section
    • Creating more advanced admin modules
      • Installing the required plugins and libraries
      • Creating an advanced admin module
        • Adding file upload and thumbnails
      • Handling many-to-many relations
      • Adding jQuery calendar and TinyMCE widget
    • Autocompleting the search
    • Other JavaScript helpers
    • Summary
  • Chapter 7: Internationalizing our Global Positions
    • Internationalization and localization
      • Refactoring the schema
      • Rebuilding with test data
    • Setting and getting the culture and language
      • Preferred culture and language
    • The action
    • Adding culture to the routing
    • Localizing the template
    • Translating interface text
      • Configuring i18n for the templates
    • Dictionary files
    • Translating the interface
      • Adding the culture links
      • Translating the static text
    • Summary
  • Chapter 8: Extending Symfony
    • Bridging to other frameworks
      • Bridging with eZ Components
        • Configuring the component with Symfony
        • Using the component
      • Bridging with the Zend Framework
        • Extending the core classes with your own
    • Multiple inheritance
    • Summary
  • Chapter 9: Optimizing for Performance
    • HTTP compression
    • Caching
      • Cache settings
      • Caching globally
      • Caching page-by-page
      • Caching without the layout
      • Caching with the layout
      • Caching parts of a template
      • Dynamic cache
      • Cache storage
      • Caching dynamic pages
    • Looking at the database
      • Setting limits and columns in the criteria
      • Creating your own SQL statements
      • Limit your queries
    • Caching your queries
      • ETags
      • Less requests
        • Stylesheets
        • JavaScripts
    • Other tools to aid you
      • Firefox developer tools
      • Database tools
        • Deciding on your table types
      • Accelerators
      • memcached
      • Caching database calls
    • Summary
  • Chapter 10: Final Tweaks and Deployment
    • Editing the default pages
    • Disabling the application
      • Symfony on the server or not?
      • Transferring your application to the server
        • rsync
      • Symfony and rsync
    • Summary

Tim Bowler

Tim Bowler has a Bachelor's Degree in Computer Science, a Masters Degree in Internet Technologies and E-Commerce, and is currently studying for his PhD part time. He has over 10 years of experience in web application development and project management. His experience and determination has gained him membership in the Institute of Engineering and Technology and he is a Chartered IT Professional. Tim started his career developing web applications in PHP4 for a digital media agency in London. Later he introduced agile and scrum into the development process along with Symfony. Tim is now the Managing Director of Agile Labs which is a web application development and agile coaching company.

Wojciech Bancer

Wojciech Bancer has a Master's Science Degree in Computer Science. He has over 8 years experience in web application development. In 2007, after passing the Zend exam, he gained a Zend Certified Engineer for PHP5 certificate. Wojciech started his career developing web applications in PHP4 and PHP5, as a freelancer. Later he started working for a digital media agency in London, where he was introduced to Symfony and scrum process. Currently he is a Lead Developer at Agile Labs, which is a web application development and agile coaching company in London.

Code Downloads

Download the code and support files for this book.

Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


- 2 submitted: last submission 02 Jul 2012

Errata type: Typo| Page number: 7 | Errata date: 01 Oct 09

It should be Symfony instead of Symphony.


Errata type: Typo| Page number: 9 | Errata date: 01 Oct 09

It should be Symfony's template instead of Symphony's template.


Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Frequently bought together

Symfony 1.3 Web Application Development +    Visual SourceSafe 2005 Software Configuration Management in Practice =
50% Off
the second eBook
Price for both: $27.00

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

What you will learn from this book

  • Set up the foundations for a database-driven web site using Symfony
  • Create a list of products by accessing data from a database, paginate the menu, and then customize its look
  • Create forms—from simple contact forms to complex ones—with user-defined fields using sfFormExtraPlugin
  • Send email notifications to the customers using PHP SwiftMailer library
  • Create quick development task plug-ins to save your development time and package them into your application
  • Configure and customize Symfony's admin generator to create a nice looking back-office
  • Secure your backend application with the Symfony authentication mechanism, leveraging the power of the sfGuardPlug-in security and authentication plug-in
  • Create an advanced admin panel with JavaScript that allows image files to be uploaded and thumbnails to be automatically generated
  • Enhance your search mechanism by using the JQueryAutoComplete Widget to add an auto-complete feature to it
  • Allow your users to choose their preferred language for display by introducing internationalization and localization to your application
  • Integrate a component from another framework into your application with minimum effort
  • Optimize the response time of your site by using compression and caching

In Detail

With its flexible architecture, the Symfony framework allows you to build modern web applications and web services easily and rapidly. The MVC components separate the logic from the user interface and therefore make developing, changing, and testing your applications much faster. Using Symfony you can minimize repetitive coding tasks, optimize performance, and easily integrate with other libraries and frameworks.

Although this framework contains with many powerful features, most developers do not exploit Symfony to its full potential.

This book makes it easy to get started and produce a powerful and professional-looking web site utilizing the many features of Symfony. Taking you through a real-life application, it covers all major Symfony framework features without pushing you into too much theoretical detail, as well as throwing some light on the best practices for rapid application development.

This book takes you through detailed examples as well as covering the foundations that you will need to get the most out of the Symfony framework. You will learn to shorten the development time of your complex applications and maintain them with ease. You will create several useful plug-ins and add them to your application and automate common tasks. The book also covers best practices and discussions on security and optimization. You will learn to utilize all major features of this framework by implementing them in your application.

By the end, you should have a good understanding of the development features of Symfony (for Propel as well as Doctrine editions), and be able to deploy a high-performance web site quite easily.

Create a real-life application from design to deployment and explore all the major aspects of the Symfony framework


This book is an example driven tutorial that takes you through the process of building Model-View-Controller-based web applications. You will create and develop an online store application. It also covers best practices for better and quicker application development.

Who this book is for

This book is for PHP web developers who want to get started with Symfony 1.3. If you are already using Symfony 1.0 or are new to Symfony, you will learn how to use it in the best way to produce better applications faster.

Basic knowledge of Object Oriented design and ORM will be quite helpful.

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software