Building native mobile apps with word press

5,208 views

Published on

Published in: Technology
1 Comment
4 Likes
Statistics
Notes
  • I would suggest using NSXMLParser and parse the RSS feed instead of using JSON. Reason being, if something goes wrong to the JSON plugin, or the developer just stops updating the plugin that you are using or the plugin crashes etc. the json data will be crashed and so does the data in the native app that you have made using the json plugin. On the other hand, RSS and xml data remains there even you blog crashes. This will not disturb the app users.

    Other than that, instead of going through all the hassle, you can use some service like softtastic.com/convert-wordpress-site-to-ios-app.html that converts your blog to iOS app by taking one time fee or they also have a free package where you have to share revenue with this. This service is unlike WiziApp because they are using native iOS SDK to build your app for your blog.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total views
5,208
On SlideShare
0
From Embeds
0
Number of Embeds
301
Actions
Shares
0
Downloads
58
Comments
1
Likes
4
Embeds 0
No embeds

No notes for slide

Building native mobile apps with word press

  1. 1. Building NativeMobile Apps WithWordPress NIKHIL VISHNU @nikhilvishnu WordCamp Pune 2013
  2. 2. About Me  2008 Started web development with WordPress  2011 Started with iOS/Mac Development  2012 Started with windows 8 Development  2013 Released Wordpress backed windows 8 & android applications
  3. 3. The Story Behind The Topic
  4. 4. We Are Going Mobile
  5. 5. How To make your website mobileready?
  6. 6. Native Apps VS Mobile Web
  7. 7. Native Apps VS Mobile  Go native when  Need to produce the best user experience — fast and fluid  People are going to use it quite often ( daily basis ) A lot of users request for it  Customers really want an app
  8. 8. Go Native
  9. 9. What does it Means  You need to communicate with another developer  Need to build an API that the developer can use  So you need to understand what a mobile developer wants  Need to build additional fields in WordPress for information that the mobile app can use
  10. 10. The API
  11. 11. How to build an API out ofWordPress?
  12. 12. Options  XML-RPC  API-Plugins
  13. 13. Using XML-RPC as an API
  14. 14. Why XML-RPC Won’t work  It is not designed as a data fetching API  XML-RPC uses about 4 times the number of bytes compared to plain XML  Need a lot of code on the app side  In the end the size of requests/responses do matter
  15. 15. Using Plugins for creating API
  16. 16. Available Plugins  JSON API  WP RESTful  WP API
  17. 17. JSON API (Plugin)  Simple, consistent external interface  Stable, understandable internal implementation  Enable new types of extensions for WordPress
  18. 18. What is JSON?  JavaScript Object Notation  Alternative to XML  text-based open standard designed for human- readable data interchange  Represents simple data structures and associative arrays, called objects
  19. 19. JSON Example myObject = { "first": "John", "last": "Doe", "age": 39, "sex": "M", "salary": 70000, "registered": true, "interests": [ "Reading", "Mountain Biking", "Hacking" ] }
  20. 20. JSON API Interface
  21. 21. Built in Controllers  Core Controller  Post Controller  Respond Controller
  22. 22. Core controller methods Info get_recent_posts get_post get_page get_date_posts get_category_posts get_tag_posts get_author_posts get_search_results get_date_index get_category_index get_tag_index get_author_index get_page_index get_nonce
  23. 23. Post & Respond controller methods create_post submit_comment
  24. 24. http://nikhilvishnu.com/api/get_recent_posts/
  25. 25. Developing JSON API controllers Create a controller file (hello.php) inside wp- content/plugins/json-api/controllers <?php class JSON_API_Hello_Controller { public function hello_world() { return array( "message" => "Hello, world" ); } } ?>
  26. 26. Developing JSON API controllers public function hello_person() { global $json_api; $name = $json_api->query->name; return array( "message" => "Hello, $name." ); }
  27. 27. External controllers function add_hello_controller($controllers) { $controllers[] = hello; return $controllers; } add_filter(json_api_controllers, add_hello_controller); function set_hello_controller_path() { return "/path/to/theme/hello.php"; } add_filter(json_api_hello_controller_path,set_hello_controller_path);
  28. 28. Important Points  Only return data that is needed  Don’t change the feed without notifying the app developer  A call shouldn’t take to long, speed is everything  Cache the data if possible  Transients: http://codex.wordpress.org/Transients_API
  29. 29. Ways To Improve  Add consumer key/secret  Admin page for customizing response (remove categories)
  30. 30. More Plugins  WP API  WP-RESTful  JSON only
  31. 31. Is there a way to create a nativeapp from WordPress withoutcoding?
  32. 32. Plugins  Joemobi  Turn your WordPress blog into native iPhone, Android and BlackBerry applications  WiziApp  Turns your WordPress blog into a native iPhone app  Native Apps Builder  Converting WordPress site to native apps for apple store and android market  Appifier  Website for creating native mobile apps from WordPress
  33. 33. RECAP
  34. 34. One More Thing…
  35. 35. ONE CLICK NATIVE APPS FOR YOUR WORDPRESS WEBSITE www.mobapper.com
  36. 36. DEMOwww.mobapper.comtwitter: @mobapper
  37. 37. Reference  www.wikipedia.org  http://www.slideshare.net/markoheijnen/creatin g-native-apps-with-wordpress
  38. 38. Thanks!www.nikhilvishnu.comnikhil@mobapper.com@nikhilvishnu

×