Doctrine: object-relational mapping for PHP*
Doctrine is a powerful object-relational mapper for PHP. David Brewer introduces the library and demonstrates how it can save you time and effort as you develop database-driven websites.
Doctrine is an object-relational mapper for PHP 5. Over the past three years it has grown from a promising one-developer project to a 1.0 release as an officially supported ORM for the popular symfony framework.
I’ve been using Doctrine on symfony-based web projects for two years now. In this session, I’ll give a high level tour of the library, focusing on the features that will save you time in your day-to-day development. The session will assume some familiarity with object-oriented programming in PHP5, but will be light on code.
Some of the features you can expect to learn about include:
- Use the Doctrine Query Language (DQL) to write queries using the language of your model rather than your relational database. Get back hydrated objects.
- Start from a yaml-based schema file and automatically create your database. Or, start from an existing database and automatically create your schema file. Either way, your model classes are generated for you.
- Hydrate objects with all their related objects pre-loaded… or, lazy-load the relationships only when they are requested.
- Use a sophisticated selection of hooks and event listeners to inject custom functionality into your model at various levels: system-wide, for one connection, or per model class.
- ‘Behaviors’ add common types of functionality to a record class. Choose from a variety of useful included behaviors such as ‘Timestampable’ or ‘Searchable’, or implement your own functionality shared by several classes in your model.
David Brewer is the Web Technology Lead at Second Story, a part of SapientNitro. He has over ten years of experience with Web programming using a variety of platforms and languages. He specializes in the creation of collection databases, web-based administrative consoles for managing them, and the front-end systems used to present them.
- Title: Using virtualization and automation to improve your web development workflow
- Track: Cooking
- Room: Morrison
- Time: 11:20am – 12:05pm
Large-scale web projects use sophisticated staged deployment systems, but the prospect of setting these up can be daunting. Using virtualization and automated configuration puts the benefits within easy reach even for small projects. David Brewer explains how Second Story uses Linux, VMware Server, and AutomateIt to grease the wheels of development on their museum-sector projects.
- Speakers: David Brewer