• Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
7,152
On Slideshare
0
From Embeds
0
Number of Embeds
2

Actions

Shares
Downloads
102
Comments
0
Likes
7

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Iostudio Developer Lunch Doctrine2 in 10 Minutes Sep 8th, 2010 Ryan Weaver @weaverryan www.iostudio.com
  • 2. Iostudio Developer Lunch What is Doctrine2? Doctrine2 consists of two distinct libraries: 1) DBAL (Database Abstraction Layer) 2) ORM (Object Relational Mapper) You can use just the DBAL or both the DBAL & ORM
  • 3. Iostudio Developer Lunch Database Abstraction Layer (DBAL) “A lightweight runtime layer around a PDO-like API with a lot of additional, horizontal features like database schema introspection and manipulation through an OO API.” Like PDO, but driver independent and with more extra features
  • 4. Iostudio Developer Lunch Executing Queries
  • 5. Iostudio Developer Lunch Schema Information
  • 6. Iostudio Developer Lunch Altering schemas
  • 7. Iostudio Developer Lunch Object Relational Mapper (ORM) ● Takes a normal PHP object and persists its properties as a row in a table ● Takes a row in a table and maps the values to the properties of an object
  • 8. Iostudio Developer Lunch Start with a normal PHP Object
  • 9. Iostudio Developer Lunch Tell Doctrine how to persist via annotations
  • 10. Iostudio Developer Lunch Persist the object
  • 11. Iostudio Developer Lunch Retrieve the object
  • 12. Iostudio Developer Lunch Questions? Ryan Weaver @weaverryan www.iostudio.com