Doctrine2 In 10 Minutes

8,222 views
8,019 views

Published on

Published in: Technology
0 Comments
8 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
8,222
On SlideShare
0
From Embeds
0
Number of Embeds
39
Actions
Shares
0
Downloads
113
Comments
0
Likes
8
Embeds 0
No embeds

No notes for slide

Doctrine2 In 10 Minutes

  1. 1. Iostudio Developer Lunch Doctrine2 in 10 Minutes Sep 8th, 2010 Ryan Weaver @weaverryan www.iostudio.com
  2. 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. 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. 4. Iostudio Developer Lunch Executing Queries
  5. 5. Iostudio Developer Lunch Schema Information
  6. 6. Iostudio Developer Lunch Altering schemas
  7. 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. 8. Iostudio Developer Lunch Start with a normal PHP Object
  9. 9. Iostudio Developer Lunch Tell Doctrine how to persist via annotations
  10. 10. Iostudio Developer Lunch Persist the object
  11. 11. Iostudio Developer Lunch Retrieve the object
  12. 12. Iostudio Developer Lunch Questions? Ryan Weaver @weaverryan www.iostudio.com

×