Digital Poets Society: Symfony Framework - Doctrine Entities on Steroids

237 views
173 views

Published on

Published in: Internet, Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
237
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Digital Poets Society: Symfony Framework - Doctrine Entities on Steroids

  1. 1. Doctrine Entities on Steroids Using custom annotations
  2. 2. Modern Application Architecture 1. HTTP Land 2. Mapped by Lean Controller 3. To Application Land with Fat Services 4. Mapped by Lean Model 5. To Backend Land (Persistence, Integrations etc.)
  3. 3. Lean Models with Doctrine ● Doctrine 2.x is built on DataMapper pattern unlike 1.x which was ActiveRecord ● DataMapper pattern allows for domain objects to be isolated from persistence logic ● Enables easier unit testing ● Allows mapping Entities and properties with more than one source
  4. 4. Use-case? A project requires your Car and Engine entities to pull Milage and Photo fields from an API that’ s prone to frequent change..
  5. 5. ..code..
  6. 6. DoctrineCommonAnnotationsAnnotationReader ● Simple API to read doc-block annotations ● Uses PHP reflection MetadataPropertyMetadata ● Allows defining metadata for Entity properties ● Uses PHP reflection
  7. 7. Questions?

×