what is doctrine?

128
What is Doctrine? www.doctrine-project.org www.sensiolabs.com Nashville LAMP What is Doctrine?

Upload: jonathan-wage

Post on 13-May-2015

7.392 views

Category:

Technology


2 download

DESCRIPTION

Beginner presentation introducing the Doctrine ORM and the basic operations. Also talks a bit about some upcoming versions 1.2 and 2.0.

TRANSCRIPT

Page 1: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

What is Doctrine?

Page 2: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Doctrine is a ORMwritten in PHP

Page 3: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

What is an ORM?

Page 4: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

ORM stands forObject Relational Mapper

Page 5: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Manipulate RDBMSas a set of PHP objects

Page 6: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Easy to get started

Page 7: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Doctrine Sandbox

Page 8: What Is Doctrine?

$ svn co http://svn.doctrine-project.org/branches/1.1 lamp_doctrine$ cd lamp_doctrine/tools/sandbox$ php doctrine.php

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Doctrine Sandbox

Command Line

Page 9: What Is Doctrine?

Phonenumber: columns: phonenumber: type: string(55) notnull: true user_id: type: integer notnull: true relations: User: foreignAlias: Phonenumbers onDelete: CASCADE

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Test SchemaUser: columns: first_name: type: string(255) notnull: true last_name: type: string(255) notnull: true username: type: string(255) unique: true notnull: true password: type: string(255) notnull: true email_address: type: string(255) notnull: true email: true unique: true

lamp_doctrine/tools/sandbox/schema/schema.yml

Page 10: What Is Doctrine?

User: jwage: first_name: Jonathan last_name: Wage username: jwage password: changeme email_address: [email protected] Phonenumbers: cell: phonenumber: 6155139185 office: phonenumber: 4159925468

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Test Datalamp_doctrine/tools/sandbox/data/fixtures/data.yml

Page 11: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Build All Reload

$ php doctrine.php build-all-reload

Page 12: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Running Tests• First DQL Query• Working with objects• Writing DQL Queries

– SELECT queries– UPDATE queries– DELETE queries

• Custom Accessors/Mutators• Using Migrations

Page 13: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

First DQL Query$ php doctrine.php dql "FROM User u, u.Phonenumbers p"

Page 14: What Is Doctrine?

$user = new User();$user->first_name = 'Fabien';$user->last_name = 'Potencier';$user->username = 'fabpot';$user->password = 'changeme';$user->email_address = '[email protected]';$user->save();

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Working with Objects

Insert new User

$ php index.php

lamp_doctrine/tools/sandbox/index.php

Page 15: What Is Doctrine?

$userTable = Doctrine::getTable('User');

$user = $userTable->findOneByUsername('jwage');$user->password = 'newpassword';$user->save();

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Working with Objects

Edit existing User

lamp_doctrine/tools/sandbox/index.php

$ php index.php

Page 16: What Is Doctrine?

$userTable = Doctrine::getTable('User');

$user = $userTable->findOneByUsername('fabpot');

$user->Phonenumbers[]->phonenumber = '1233451234';$user->Phonenumbers[]->phonenumber = '9875674543';

$user->save();

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Working with Objects

Adding Phonenumbers

lamp_doctrine/tools/sandbox/index.php

$ php index.php

Page 17: What Is Doctrine?

$userTable = Doctrine::getTable('User');

$user = $userTable->findOneByUsername('fabpot');$user->Phonenumbers[0]->delete();

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Working with Objects

Deleting Objects

lamp_doctrine/tools/sandbox/index.php

$ php index.php

Page 18: What Is Doctrine?

$userTable = Doctrine::getTable('User');

$user = $userTable->findOneByUsername('fabpot');$user->Phonenumbers->delete();

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Working with Objects

Deleting Collections

lamp_doctrine/tools/sandbox/index.php

$ php index.php

Page 19: What Is Doctrine?

$q = Doctrine::getTable('User') ->createQuery('u');

$users = $q->execute();

print_r($users->toArray());

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Writing DQL Queries

SELECT Queries

lamp_doctrine/tools/sandbox/index.php

$ php index.php

Page 20: What Is Doctrine?

Array( [0] => Array ( [id] => 1 [first_name] => Jonathan [last_name] => Wage [username] => jwage [password] => changeme [email_address] => [email protected] )

[1] => Array ( [id] => 2 [first_name] => Fabien [last_name] => Potencier [username] => fabpot [password] => changeme [email_address] => [email protected] )

) What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Writing DQL Queries

Page 21: What Is Doctrine?

$q = Doctrine::getTable('User') ->createQuery('u') ->leftJoin('u.Phonenumbers p') ->andWhere('u.username = ?', 'jwage');

$users = $q->execute();

print_r($users->toArray(true));

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Writing DQL Queries

SELECT Queries

lamp_doctrine/tools/sandbox/index.php

$ php index.php

Page 22: What Is Doctrine?

Array( [0] => Array ( [id] => 1 [first_name] => Jonathan [last_name] => Wage [username] => jwage [password] => changeme [email_address] => [email protected] [Phonenumbers] => Array ( [0] => Array ( [id] => 1 [phonenumber] => 6155139185 [user_id] => 1 [User] => )

[1] => Array ( [id] => 2 [phonenumber] => 4159925468 [user_id] => 1 [User] => )

)

)

)

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Writing DQL Queries

Page 23: What Is Doctrine?

$q = Doctrine::getTable('User') ->createQuery('u') ->update() ->set('email_address', '?', '[email protected]') ->andWhere('username = ?', 'jwage');

$affectedRows = $q->execute();

echo $affectedRows; // 1

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Writing DQL Queries

UPDATE Queries

lamp_doctrine/tools/sandbox/index.php

$ php index.php

Page 24: What Is Doctrine?

$q = Doctrine::getTable('User') ->createQuery('u') ->delete() ->andWhere('username = ?', 'jwage');

$affectedRows = $q->execute();

echo $affectedRows; // 1

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Writing DQL Queries

DELETE Queries

lamp_doctrine/tools/sandbox/index.php

$ php index.php

Page 25: What Is Doctrine?

// ...$manager = Doctrine_Manager::getInstance();$manager->setAttribute('auto_accessor_override', true);

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Custom AccessorsEnable Auto Accessor Override

lamp_doctrine/tools/sandbox/config.php

Page 26: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Custom Accessors

Custom `name` accessor

Page 27: What Is Doctrine?

class User extends BaseUser{ public function getName() { return trim($this->first_name.' '.$this->last_name); }}

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Custom Accessorslamp_doctrine/tools/sandbox/models/User.php

Page 28: What Is Doctrine?

$q = Doctrine::getTable('User') ->createQuery('u') ->andWhere('username = ?', 'jwage');

$user = $q->fetchOne();

echo $user->name; // Jonathan Wage

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Custom Accessorslamp_doctrine/tools/sandbox/index.php

$ php index.php

Page 29: What Is Doctrine?

class User extends BaseUser{ // ...

public function setPassword($password) { $this->_set('password', md5($password)); }}

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Custom Mutator

MD5 encrypt passwords

Page 30: What Is Doctrine?

$q = Doctrine::getTable('User') ->createQuery('u') ->andWhere('username = ?', 'jwage');

$user = $q->fetchOne();

$user->password = 'changeme';$user->save();

echo $user->password; // 4cb9c8a8048fd02294477fcb1a41191a

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Custom Mutator

MD5 encrypt passwords

Page 31: What Is Doctrine?

echo $user->name;echo $user->get('name');echo $user['name'];

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Accessor/Mutator SyntaxObject property, function, array access

Page 32: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Database Migrations

Page 33: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Deploy schema changes

Page 34: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Maintain production data

Page 35: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Programmatic interfacefor issuing DDL statements

Page 36: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Versions your database

Page 37: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Upgrade your database to new versionsDowngrade to previous versions

Page 38: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Database Migrations

Add new status column to users

Page 39: What Is Doctrine?

User: columns:# ... status: type: enum values: [Pending, Active, Inactive]

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Database Migrations

Page 40: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Database Migrations

Generate migration class

$ php doctrine generate-migrations-diff

Page 41: What Is Doctrine?

class Version1 extends Doctrine_Migration_Base{ public function up() { $this->addColumn('user', 'status', 'enum', '', array('values' => array(0 => 'Pending', 1 => 'Active', 2 => 'Inactive'))); }

public function down() { $this->removeColumn('user', 'status'); }}

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Database MigrationsGenerate migration class

Page 42: What Is Doctrine?

class Version1 extends Doctrine_Migration_Base{ public function postUp() { Doctrine::loadModels(realpath(dirname(__FILE__).'/../models'));

Doctrine::getTable('User') ->createQuery('u') ->update() ->set('status', '?', 'Active') ->execute(); }

// ...}

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Database MigrationsCustomize migration class

Page 43: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Database MigrationsExecuting migration

$ php doctrine migratemigrate - migrated successfully to version #1

Page 44: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Database MigrationsUpdate models from YAML

$ php doctrine generate-models-yaml

Page 45: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Database MigrationsInspect migration was

successful or not

New status column existsDefault `Active` value

Page 46: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Future of Doctrine?

Page 47: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

New Versions

Page 48: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Doctrine 1.2

Page 49: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Continued evolutionof the 1.x codebase

Page 50: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Doctrine 2.0

Page 51: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Almost complete re-rewrite

Page 52: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Major version

Page 53: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Requires PHP 5.3

Page 54: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Performance increases from 5.3

Page 55: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Test suite runs20% faster

Page 56: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

And uses 30%less memory

Page 57: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Hydration performanceimprovements

Page 58: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Doctrine 1.14.3435637950897 for 5000 records

Doctrine 2.01.4314442552312 for 5000 records

Doctrine 2.03.4690098762512 for 10000 records

Hydration Performance

Page 59: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Removed Major Limitation

class User extends Doctrine_Record{ public function setTableDefinition() { $this->hasColumn('id', 'integer', null, array( 'primary' => true, 'auto_increment' => true ));

$this->hasColumn('username', 'string', 255); }}

No need to extend a base class

/** * @DoctrineEntity * @DoctrineTable(name="user") */class User{ /** * @DoctrineId * @DoctrineColumn(type="integer") * @DoctrineGeneratedValue(strategy="auto") */ public $id;

/** * @DoctrineColumn(type="varchar", length=255) */ public $username;}

Page 60: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

No more crazy cyclic references

Page 61: What Is Doctrine?

User Object( [id] => [username] => jwage)

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

print_r() your objects

$user = new User();$user->username = 'jwage';print_r($user);

Page 62: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Positive effects of removing the base

class all around

Page 63: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

GeneralImprovements

Page 64: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Code de-coupled

Page 65: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

3 Main Packages

Page 66: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Common

Page 67: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

DBAL

Page 68: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

ORM

Page 69: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Use Doctrine DBALseparate from the ORM

Page 70: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Easier to extend and override things

Page 71: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Better support formultiple databases

Page 72: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Sequences, schemasand catalogs

Page 73: What Is Doctrine?

$config = new \Doctrine\ORM\Configuration();$eventManager = new \Doctrine\Common\EventManager();$connectionOptions = array( 'driver' => 'pdo_sqlite', 'path' => 'database.sqlite');$em = \Doctrine\ORM\EntityManager::create($connectionOptions, $config, $eventManager);

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Simplified connectioninformation

Page 74: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

No more DSN nightmares

Page 75: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Connection informationspecified as arrays

Page 76: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Removed oldattribute system

Page 77: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Replaced with simplerstring based system

Page 78: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Real Native SQL support

Page 79: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Driver BasedMeta Data

Page 80: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

/** * @DoctrineEntity * @DoctrineTable(name="user") */class User{ /** * @DoctrineId * @DoctrineColumn(type="integer") * @DoctrineGeneratedValue(strategy="auto") */ public $id;

/** * @DoctrineColumn(type="varchar", length=255) */ public $username;}

PHP Annotations

Page 81: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

PHP Codeclass User{ public $id, $username;}

$metadata = new ClassMetadata('User');

$metadata->mapField(array( 'fieldName' => 'id', 'type' => 'integer', 'id' => true));

$metadata->setIdGeneratorType('auto');

$metadata->mapField(array( 'fieldName' => 'username', 'type' => 'varchar', 'length' => 255));

Page 82: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

YAML

User: properties: id: id: true type: integer idGenerator: auto username: type: varchar length: 255

class User{ public $id, $username;}

Page 83: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Write your own driver

Page 84: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Cache

Page 85: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Query CacheCache final SQL that is parsed from DQL

Page 86: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Metadata CacheCache the parsing of meta data

Page 87: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Result CacheCache the results of your queries

Page 88: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

InheritanceMapping

Page 89: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Single TableOne table per hierarchy

Page 90: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Class TableOne table per class

Page 91: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Concrete TableOne table per concrete class

Page 92: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Testing

Page 93: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Switched to phpUnit

Page 94: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Better mock testing

Page 95: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Easy to run tests against multiple DBMS

Page 96: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Code de-coupled soit is easier to test

Page 97: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

New Features

Page 98: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

New DQL Parser

Page 99: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Hand written

Page 100: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Recursive-descentparser

Page 101: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Constructs AST

Page 102: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

PHP Class namesdirectly represent

DQL language

Page 103: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Every DQL featurehas a class to handle

parsing

Page 104: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Easy to maintainEasy to add new features

Easy to use

Page 105: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Performance?

Page 106: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Final SQL can beeasily and effectively cached

Page 107: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Not practical to parseevery time

Page 108: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

CustomColumn Types

Page 109: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Add your own data types

Page 110: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Types are OOP classes

Page 111: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Easy to extendor add new types

Page 112: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Extend DQL

Page 113: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

DQL parser canbe extended

Page 114: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Add your ownDQL functions

Page 115: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

When?

Page 116: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

First releasein September 09`

Page 117: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

ALPHA

Page 118: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

BETA

Page 119: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

RC

Page 120: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Stable - 2010’ ?

Page 121: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

What is next?

Page 122: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Publishing of firstDoctrine book

Page 123: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Write more documentation

Page 124: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Publish more books

Page 125: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Doctrine communityextension repository

Symfony has Plugins

and

Doctrine has Extensions

Page 126: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Default DBALand ORM in PEAR2?

De-facto standard?

Page 127: What Is Doctrine?

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

It is up to you! :)

Page 128: What Is Doctrine?

You can contact Jonathan about Doctrine and Open-Source or for training, consulting, application development, or business related

questions at [email protected]

What is Doctrine? www.doctrine-project.org www.sensiolabs.com

Nashville LAMP

Jonathan H. [email protected]+1 415 992 5468

sensiolabs.com | doctrine-project.org | sympalphp.org | jwage.com

Questions?