2. Who Am I ?
● Kifah Abbad:
○ Web Enthusiast since 1993
○ Web Developer since 1998
○ Participant in Berlin Symfony Live Conf.
○ Active in Symfony2 User Group.
3. Who Am I ?
● Kifah Abbad:
○ Travel Addict
○ Loving Father
11. Why REST-API?
● HTTP-Verbs -> CRUD representation
● Clean more readable representation
GET /guns/23
DELETE /guns/23
…………
12. Why REST-API?
● Easy to be called from Javascript
● Preferably reads and responds in JSON-Format
○ Javascript object
○ easy to read for humans
○ easy to parse for machines
15. Why Symfony2?
● Component based: Twig, HTTP-Kernel...etc
● Huge Community
● Coupled with other successful projects: Drupal,
phpBB, Laravel.
● First Major Frameworks to use PHP 5.3 + Features,
innovative ideas like bundles, annotations...etc
● Out of the box integration of Doctrine2
18. Project Setup
Symfony2 -> PHP Backend
Front-End (Javascript, HTML5...etc)
Web Server
Authentication, Session storage and
management into memcached
19.
20.
21. Symfony2 Backend Setup
Controller
Service/Repository
Entities (Doctrine)
● Slim-Controllers → extract
business logic into
services, factories, repos
● Interfaces as contracts
● Abstract Controller for
repetitive methods and
functionalities
● Goodies: DI-Container,
Annotations
22. Doctrine Entities
User
Order
ToyGun
● A user can have many
orders
● And order can consist of
many ToyGuns (types)
● a ToyGun type can be part
of many orders.
OneToMany
ManyToMany