際際滷

際際滷Share a Scribd company logo
11 July 2012
Rapid API Development with




Sam Yong
Who am I?
 Recent Graduate, Diploma in IT, Class of 2012




                                                          11 July 2012
   School of ICT, Ngee Ann Polytechnic

 WorldSkills London 2011, Web Design

 Research and Design Engineer
   RHyMeS Centre, School of ICT, Ngee Ann Polytechnic

 Waiting in line to Tekong



                              http://mauris.sg/packfire
11 July 2012
What is Packfire Framework?




                 http://mauris.sg/packfire
Packfire is
 an Object-Oriented PHP Framework




                                                      11 July 2012
                          http://mauris.sg/packfire
Packfire is
 RESTful / API friendly.




                                                        11 July 2012
                            http://mauris.sg/packfire
Packfire is
 Extensive and Extensible.




                                                          11 July 2012
                              http://mauris.sg/packfire
Packfire is
 an Encapsulation to PHP.




                                                         11 July 2012
                             http://mauris.sg/packfire
11 July 2012
Why Packfire Framework?




                http://mauris.sg/packfire
Another framework?!




                                                11 July 2012
       Luracast Restler




                    http://mauris.sg/packfire
Put to Practice




                                                                  11 July 2012
    http://www.flickr.com/photos/55685248@N06/5856379635/


                                      http://mauris.sg/packfire
Fulfilling Hunger
                        Code
                      Generation




                                                              11 July 2012
       Unit Testing                       Mustache




 Git                                                    IoC




         YAML                                 LINQ
                      GoF Design
                       Patterns


                            http://mauris.sg/packfire
11 July 2012
Creating API Services
Alton Live GPS Tracker




                         http://mauris.sg/packfire
Alton Live GPS Tracker
 Receives GPS coordinates from phone




                                                          11 July 2012
 Displays it in real-time on the map




                              http://mauris.sg/packfire
Architecture




                                           11 July 2012
               http://mauris.sg/packfire
Receiving GPS Coordinates




                                         11 July 2012
             http://mauris.sg/packfire
RESTful Requests
 Routing Entry
 session.create:




                                                                    11 July 2012
   rewrite: "/session/create"
   actual:   "Session:create"
                                                       Controller




                           http://mauris.sg/packfire
RESTful Requests
                Postback to self




                                         11 July 2012
             http://mauris.sg/packfire
Database LINQ




                                                                         11 July 2012
SELECT FROM `CoordinateId`, `Latitude`, `Longitude` FROM `coordinates`
WHERE SessionId = :session AND Coordinateid > :lastPoint
ORDER BY `Updated`


                                http://mauris.sg/packfire
Long Polling




                                                     11 July 2012
     // Database LINQ.




                         http://mauris.sg/packfire
11 July 2012
Demo




       http://mauris.sg/packfire
Alton Live GPS Tracker




                                                               11 July 2012
Alton Live GPS Tracker on Github


http://github.com/thephpdeveloper/alton-gps




                                   http://mauris.sg/packfire
11 July 2012
Q&A




      http://mauris.sg/packfire
Fork Packfire!




                                                11 July 2012
           Packfire Framework on Github


           http://github.com/packfire




                    http://mauris.sg/packfire
Comm Channels
 http://mauris.sg/packfire




                                                          11 July 2012
 http://packfire.tumblr.com/

 @packfire

 Packfire Framework on Facebook




                              http://mauris.sg/packfire
11 July 2012
Thank you ?>




               http://mauris.sg/packfire
11 July 2012
ref
https://speakerdeck.com/u/andycroll/p/responsive-web-design
http://www.slideshare.net/uzyn/qropit-sharing-on-singapore-




                                                              11 July 2012
  php-user-group
http://www.scribd.com/doc/94389313/TDD-with-PHP-the-
  secret-of-coding-with-confidence
https://speakerdeck.com/u/uzyn/p/opauth-an-introduction




                           http://mauris.sg/packfire
11 July 2012
http://mauris.sg/packfire

More Related Content

Rapid API Development with Packfire Framework for PHP