Web Service and Mobile Integrated Day II
Upcoming SlideShare
Loading in...5

Web Service and Mobile Integrated Day II



Web Service and Mobile Integrated Day II 6 jan 2013 @ Sripatum University

Web Service and Mobile Integrated Day II 6 jan 2013 @ Sripatum University



Total Views
Views on SlideShare
Embed Views



2 Embeds 789

http://blog.redlinesoft.net 786
http://translate.googleusercontent.com 3



Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

Web Service and Mobile Integrated Day II Web Service and Mobile Integrated Day II Presentation Transcript

  • Web Service for Mobile 6 jan 2013 @ Sripatum University Anuchit Chalothorn anoochit@gmail.com
  • About● Not a Teacher or Instructor● Not a Programmer or Developer● Senior Software Engineer at SIPA● Content writer not speaker● I use Linux :)
  • Rules● You can leave every time.● If you dont understand and you dont want to ask you can leave.● If you want to learn by yourself and Ill give you a resources, you can leave.● If you dont understand at all and everything as I said, you can leave and Ill give a resources, you can learning by yourself.
  • Quote“If you cannot do great things, do small thingsin a great way” - Napoleon Hill
  • What you have learn ?● Web Service● SOAP● RESTful ○ Mobile App ○ REST Server● How to interact between 2 devices
  • REST "No" official standardBut you should follow design guid line● RESTful API Design ○ http://www.freshblurbs. com/blog/2011/06/19/pragmatic-restful-api-design. html● Learn REST ○ http://www.restapitutorial.com
  • Small thingsMake your web service using RESTful for yourWattPad-liked project, by the way answer thisquestions :● What, Who, Where, When● How, How much and How many
  • REST with PHP Framework● CakePHP is NOT REST Framework● CakePHP is PHP Framework follow the MVC principle● You can use nature of CakePHP implement REST server, its too easy ○ CakePHP has own ORM (object-relational mapping) ○ Everything is Array ○ Extension and Plug in support ○ You can hook anyware
  • CakePHP FrameworkThe CakePHP framework provides a robustbase for your application. And since theframework follows the principles of MVC, itallows you to easily customize and extend mostaspects of your application.
  • Install CakePHP● Download and extract CakePHP● Change permission for tmp directory● Config security and encryption● Config database connection● Define your model and relation according to your database schema● Plan your URI and create new controller, model and view for each services● Test with simple method like index()
  • JSON View● Enable json and or xml extensions with Router::parseExtensions() in Router to handle multiple extensions eg. Router:: parseExtensions(json); for json extension.● Add the RequestHandlerComponent to your controller’s list of components
  • JSON View● Using Data View to set serialize key in special view variable. eg. $this->set (_serialize, array(data));● If you are lazy you can force to use default view to render eg. $this->render(null, ajax,/ajax/ajax);● In data view in view file just show in json data eg. json_encode(compact(posts));
  • Small thing for you● CakePHP Cook Book ○ http://book.cakephp.org/2.0/en/index.html
  • You should knowAfter this class you should continue to study● Cloud Service on any your platform ○ IaaS ○ PaaS● Try to make your Mobile Application call these services ○ OAuth2 ○ Social Network
  • Thank you