SlideShare uma empresa Scribd logo
1 de 23
Baixar para ler offline
Mobile hybrid development with WordPress

     Saturday November 24th, 2012
             Bologna, Italy
WordPress.com Reader
•   WordPress.com has introduced a blog reader feature
    that’s a cross between Google Reader and reader
    apps like Flipboard. Through it you can keep track of
    blogs from WordPress.com, but also other places.
WordPress.com Reader
• The reader displays all the posts across
  all the blogs you follow in the order they
  were published, with the most recent
  content appearing at the top. You’ll see
  an excerpt of the introduction to each
  post, the first image in the post, and
  thumbnails of any other images that the
  post contains.
WordPress.com Reader
WordPress.com Reader



• A user can add any blog to the Reader
  by tapping the “Follow” button in the
  top admin bar while viewing the blog.
Introducing the mobile Reader
•   Read posts from blogs you’re following on
    WordPress.com right in the mobile apps,
    with the addition of social actions, such as
    ‘like’, ‘reblog’, ‘in-line commenting’, and
    more.

•   We wanted to add this new feature on all of
    our mobile apps (Android, iOS, BlackBerry,
    Windows Phone), trying to reuse the same
    codebase as much as possible.
Requirements
•   The content should be available as soon as
    the user clicks on the button. No lags, no
    long loading time. (If your app takes too long
    loading data, the user will probably switch to
    another task).

•   Access device native features such as
    sounds, native pull-to-refresh, blog
    preferences stored in the app.

•   Native or Hybrid ? -> We tried the Hybrid way
Hybrid Mobile Apps
•   A hybrid app is a native, downloadable app, that runs
    all or some of its UI in an embedded browser
    component.

•   HTML / CSS / JavaScript.

•   Hybrid apps can access device features such as file-
    system, cameras and geolocation services.

•   Frameworks, such as the open source project
    ‘Apache Cordova’, make the development of hybrid
    apps portable across devices, and allow developer to
    access native device features from one common JS
    API.
Loading the Reader
•   Clients authenticate on startup and keep track of the WP
    auth cookie. ( An alternative way is to use the
    WordPress.com login form and the redirect_to parameter,
    but it’s slower ).

•   The target of the redirect ( The URL of the Reader ) is
    something like https://wordpress.com/reader/mobile/v2/

•   We’ve added a filter on ‘page_template’, and the server
    outputs a simple HTML5 page.

•   The home page is a template that loads the required CSS
    and JS files.

•   Ajax calls to load the content of the reader. Those calls
    will start when the home page is fully loaded on the client.
[
              Example of server response
{
	   "fp_bg_image" : "http://s2.wp.com/imgpress?w=310&url=http%3A%2F%2Faphs.worldnomads.com
%2FOffTheBeatenPath%2F22448%2FiStock_000003676011Small.jpg&unsharpmask=80,0.5,3",
	   "avatar" : "http://en.wordpress.com/wp-content/themes/h4/i/mobile/subs-rss-mobile.png?
cached",
	   "author_name" : "Tim",
	   "author_avatar" : "http://1.gravatar.com/avatar/a4797cc25c5fe8922fc81c7d16e17bd8?s=64&d=http
%3A%2F%2F0.gravatar.com%2Fblavatar%2F0ef9c8d9ca53dd718d",
	   "title" : "I Donu2019t Enjoy the Ride",
	   "content" : "<p><img class="alignright" title="Road Trip" alt="" src="http://s0.wp.com/
imgpress?url=http%3A%2F%2Faphs.worldnomads.com%2FOffTheB>....",
	   "excerpt" : "<div class="full">..../div>...",
	   "post_id" : 185,
	   "guid" : "http://narrativeodyssey.com/?p=185",
	   "permalink" : "http://narrativeodyssey.com/2012/11/17/i-dont-enjoy-the-ride/",
	   "blog_id" : "35445524",
	   "blog" : "my narrative odyssey",
	   "blogurl" : "http://narrativeodyssey.wordpress.com",
	   "ts" : 1353217713,
	   "comment_count" : 0,
	   "pluralized_comment" : "Comments",
	   "ago" : "1d",
    ...
	   "follow_url" : "http://wordpress.com/following?b=00&amp;_wpnonce=not_in_the_house_XXdd5a200",
	   "unfollow_url" : "http://wordpress.com/following?b=00&amp;unsub=1&amp;_wpnonce=not_in_the_hous",
	   "following" : 0
},
How it looks on different devices

 The same experience on
Android and iOS. A little bit
     different on BB.
How it looks on different devices




BlackBerry with Keyboard   iPhone4
How it looks on different devices : Topics
                   Selector




BlackBerry with Keyboard          iPhone4
How it looks on different devices : Comment
                      Form




BlackBerry with Keyboard         iPhone4
JS Libraries used
• FitVids.js - A lightweight, easy-to-use
  jQuery plugin for fluid width video
  embeds.

• {{ mustache }} - Templating
• Two internal libraries for UA detection
  and capabilities detection.
Communication between JS and Native code

   • We’ve written a “bridge” that simplies the
     communication between the JS layer and
     the native code (and vice versa).

   • The bridge also adds some security
     checks to prevent malicious pages from
     executing native methods.
Issues found
•   Excessive stuttering when scrolling the posts list with
    images on it (Old versions of Android).

•   On the iPhone4 there were issues scrolling the lists
    due to missing optimizations for the UIWebView, and
    the absence of the Nitro JS Engine.

•   We did a lot of optimizations, but the scrolling is fast
    on iPhone 4S, not on the iPhone4.

•   BlackBerry 7 browser is very slow at rendering
    complex pages.

•   Windows Phone 7 doesn’t support HTML5 so we
    skipped that platform for now.
Performance Improvements (1)
CACHE:
# JS
/wp-includes/js/jquery/jquery.js
..

# CSS
/wp-content/themes/nomoreplasticthree/mobile/v2/reader.css
..

# images from the CSS
/wp-content/themes/nomoreplasticthree/i/mobile/v2/read.png
/wp-content/themes/nomoreplasticthree/i/mobile/v2/read@2x.png
...

# All other content accessed over the Network
NETWORK:
/wp-admin/admin-ajax.php*
*
http://*
https://*
Performance Improvements (2)
•   Use of localStorage to store the JSON response(s),
    and make them available without accessing the net.

•   JS time-diff to update the content without reloading it
    from the network.

•   Images are replaced with a smaller version server-
    side. Full version will be downloaded later, on
    demand, with a simple JS code. (This is possible
    thanks to the .COM ImagePress API).

    http://s0.wp.com/imgpress?url=http%3A%2F
    %2Fdigilander.libero.it%2Frondine_spensierata
    %2FUomoVetriRottiMare.jpg&h=150
The Future: REST API + Native
  • REST API opens access to posts,
    comments, follow, like and more.

  • http://developer.wordpress.com
  • Available on WordPress.com, and on
    Jetpack powered sites.

  • Should be available in WordPress Core
    in the future.
WordPress mobile apps
WordPress Mobile
http://make.wordpress.org/mobile


App specific development blogs with links to code testing info:

•   WordPress for Android
    http://dev.android.wordpress.org/

•   WordPress for BlackBerry
    http://dev.blackberry.wordpress.org/

•   WordPress for iOS
    http://iphonedev.wordpress.org/

•   WordPress for Windows Phone
    http://wpwindowsphonedev.wordpress.org/
Thanks ! Questions ?
Danilo Ercoli
Mobile Wrangler
http://daniloercoli.wordpress.com
http://twitter.com/daniloercoli
Mobile Hybrid Development with WordPress

Mais conteúdo relacionado

Mais procurados

Anthony Somerset - Site Speed = Success!
Anthony Somerset - Site Speed = Success!Anthony Somerset - Site Speed = Success!
Anthony Somerset - Site Speed = Success!WordCamp Cape Town
 
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
AD113  Speed Up Your Applications w/ Nginx and PageSpeedAD113  Speed Up Your Applications w/ Nginx and PageSpeed
AD113 Speed Up Your Applications w/ Nginx and PageSpeededm00se
 
Node.js to the rescue
Node.js to the rescueNode.js to the rescue
Node.js to the rescueMarko Heijnen
 
EasyEngine - Command-Line tool to manage WordPress Sites on Nginx
EasyEngine - Command-Line tool to manage WordPress Sites on NginxEasyEngine - Command-Line tool to manage WordPress Sites on Nginx
EasyEngine - Command-Line tool to manage WordPress Sites on NginxrtCamp
 
WordPress Server Security
WordPress Server SecurityWordPress Server Security
WordPress Server SecurityPeter Baylies
 
HTML5 and Google Chrome - DevFest09
HTML5 and Google Chrome - DevFest09HTML5 and Google Chrome - DevFest09
HTML5 and Google Chrome - DevFest09mihaiionescu
 
Webservices: connecting Joomla! with other programs.
Webservices: connecting Joomla! with other programs.Webservices: connecting Joomla! with other programs.
Webservices: connecting Joomla! with other programs.Herman Peeren
 
Intro to advanced web development
Intro to advanced web developmentIntro to advanced web development
Intro to advanced web developmentStevie T
 
CUST-10 Customizing the Upload File(s) dialog in Alfresco Share
CUST-10 Customizing the Upload File(s) dialog in Alfresco ShareCUST-10 Customizing the Upload File(s) dialog in Alfresco Share
CUST-10 Customizing the Upload File(s) dialog in Alfresco ShareAlfresco Software
 
BeEF_EUSecWest-2012_Michele-Orru
BeEF_EUSecWest-2012_Michele-OrruBeEF_EUSecWest-2012_Michele-Orru
BeEF_EUSecWest-2012_Michele-OrruMichele Orru
 
BP101: A Modernized Workflow w/ Domino/XPages
BP101: A Modernized Workflow w/ Domino/XPagesBP101: A Modernized Workflow w/ Domino/XPages
BP101: A Modernized Workflow w/ Domino/XPagesedm00se
 
CUST-2 New Client Configuration & Extension Points in Share
CUST-2 New Client Configuration & Extension Points in ShareCUST-2 New Client Configuration & Extension Points in Share
CUST-2 New Client Configuration & Extension Points in ShareAlfresco Software
 
Exploring WordPress Multisite
Exploring WordPress MultisiteExploring WordPress Multisite
Exploring WordPress MultisiteLisa Sabin-Wilson
 
Debugging WordPress Performance using EasyEngine
Debugging WordPress Performance using EasyEngineDebugging WordPress Performance using EasyEngine
Debugging WordPress Performance using EasyEnginertCamp
 
Best practices-wordpress-enterprise
Best practices-wordpress-enterpriseBest practices-wordpress-enterprise
Best practices-wordpress-enterpriseTaylor Lovett
 
I Can Haz More Performanz?
I Can Haz More Performanz?I Can Haz More Performanz?
I Can Haz More Performanz?Andy Melichar
 
Gestione avanzata di WordPress con WP-CLI - WordCamp Torino 2017 - Andrea Car...
Gestione avanzata di WordPress con WP-CLI - WordCamp Torino 2017 - Andrea Car...Gestione avanzata di WordPress con WP-CLI - WordCamp Torino 2017 - Andrea Car...
Gestione avanzata di WordPress con WP-CLI - WordCamp Torino 2017 - Andrea Car...Andrea Cardinali
 
Should you use HTML5 to build your product? The pros & cons of using current ...
Should you use HTML5 to build your product? The pros & cons of using current ...Should you use HTML5 to build your product? The pros & cons of using current ...
Should you use HTML5 to build your product? The pros & cons of using current ...boxuno
 
Use Xdebug to profile PHP
Use Xdebug to profile PHPUse Xdebug to profile PHP
Use Xdebug to profile PHPSeravo
 

Mais procurados (20)

Anthony Somerset - Site Speed = Success!
Anthony Somerset - Site Speed = Success!Anthony Somerset - Site Speed = Success!
Anthony Somerset - Site Speed = Success!
 
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
AD113  Speed Up Your Applications w/ Nginx and PageSpeedAD113  Speed Up Your Applications w/ Nginx and PageSpeed
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
 
Node.js to the rescue
Node.js to the rescueNode.js to the rescue
Node.js to the rescue
 
EasyEngine - Command-Line tool to manage WordPress Sites on Nginx
EasyEngine - Command-Line tool to manage WordPress Sites on NginxEasyEngine - Command-Line tool to manage WordPress Sites on Nginx
EasyEngine - Command-Line tool to manage WordPress Sites on Nginx
 
WordPress Server Security
WordPress Server SecurityWordPress Server Security
WordPress Server Security
 
HTML5 and Google Chrome - DevFest09
HTML5 and Google Chrome - DevFest09HTML5 and Google Chrome - DevFest09
HTML5 and Google Chrome - DevFest09
 
Webservices: connecting Joomla! with other programs.
Webservices: connecting Joomla! with other programs.Webservices: connecting Joomla! with other programs.
Webservices: connecting Joomla! with other programs.
 
Intro to advanced web development
Intro to advanced web developmentIntro to advanced web development
Intro to advanced web development
 
CUST-10 Customizing the Upload File(s) dialog in Alfresco Share
CUST-10 Customizing the Upload File(s) dialog in Alfresco ShareCUST-10 Customizing the Upload File(s) dialog in Alfresco Share
CUST-10 Customizing the Upload File(s) dialog in Alfresco Share
 
BeEF_EUSecWest-2012_Michele-Orru
BeEF_EUSecWest-2012_Michele-OrruBeEF_EUSecWest-2012_Michele-Orru
BeEF_EUSecWest-2012_Michele-Orru
 
A Day of REST
A Day of RESTA Day of REST
A Day of REST
 
BP101: A Modernized Workflow w/ Domino/XPages
BP101: A Modernized Workflow w/ Domino/XPagesBP101: A Modernized Workflow w/ Domino/XPages
BP101: A Modernized Workflow w/ Domino/XPages
 
CUST-2 New Client Configuration & Extension Points in Share
CUST-2 New Client Configuration & Extension Points in ShareCUST-2 New Client Configuration & Extension Points in Share
CUST-2 New Client Configuration & Extension Points in Share
 
Exploring WordPress Multisite
Exploring WordPress MultisiteExploring WordPress Multisite
Exploring WordPress Multisite
 
Debugging WordPress Performance using EasyEngine
Debugging WordPress Performance using EasyEngineDebugging WordPress Performance using EasyEngine
Debugging WordPress Performance using EasyEngine
 
Best practices-wordpress-enterprise
Best practices-wordpress-enterpriseBest practices-wordpress-enterprise
Best practices-wordpress-enterprise
 
I Can Haz More Performanz?
I Can Haz More Performanz?I Can Haz More Performanz?
I Can Haz More Performanz?
 
Gestione avanzata di WordPress con WP-CLI - WordCamp Torino 2017 - Andrea Car...
Gestione avanzata di WordPress con WP-CLI - WordCamp Torino 2017 - Andrea Car...Gestione avanzata di WordPress con WP-CLI - WordCamp Torino 2017 - Andrea Car...
Gestione avanzata di WordPress con WP-CLI - WordCamp Torino 2017 - Andrea Car...
 
Should you use HTML5 to build your product? The pros & cons of using current ...
Should you use HTML5 to build your product? The pros & cons of using current ...Should you use HTML5 to build your product? The pros & cons of using current ...
Should you use HTML5 to build your product? The pros & cons of using current ...
 
Use Xdebug to profile PHP
Use Xdebug to profile PHPUse Xdebug to profile PHP
Use Xdebug to profile PHP
 

Semelhante a Mobile Hybrid Development with WordPress

From WordPress With Love
From WordPress With LoveFrom WordPress With Love
From WordPress With LoveUp2 Technology
 
Mobile and IBM Worklight Best Practices
Mobile and IBM Worklight Best PracticesMobile and IBM Worklight Best Practices
Mobile and IBM Worklight Best PracticesAndrew Ferrier
 
Make Mobile Apps Quickly
Make Mobile Apps QuicklyMake Mobile Apps Quickly
Make Mobile Apps QuicklyGil Irizarry
 
Anatomy of an HTML 5 mobile web app
Anatomy of an HTML 5 mobile web app Anatomy of an HTML 5 mobile web app
Anatomy of an HTML 5 mobile web app Ivano Malavolta
 
[2015/2016] Apache Cordova
[2015/2016] Apache Cordova[2015/2016] Apache Cordova
[2015/2016] Apache CordovaIvano Malavolta
 
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014Gil Irizarry
 
Webdev battacherjee
Webdev battacherjeeWebdev battacherjee
Webdev battacherjeeRavingTiger
 
Intro to Ionic for Building Hybrid Mobile Applications
Intro to Ionic for Building Hybrid Mobile ApplicationsIntro to Ionic for Building Hybrid Mobile Applications
Intro to Ionic for Building Hybrid Mobile ApplicationsSasha dos Santos
 
Introduction to hybrid application development
Introduction to hybrid application developmentIntroduction to hybrid application development
Introduction to hybrid application developmentKunjan Thakkar
 
Desktop apps with node webkit
Desktop apps with node webkitDesktop apps with node webkit
Desktop apps with node webkitPaul Jensen
 
How to start developing apps for Firefox OS
How to start developing apps for Firefox OSHow to start developing apps for Firefox OS
How to start developing apps for Firefox OSbenko
 
The Mobile Development Landscape
The Mobile Development LandscapeThe Mobile Development Landscape
The Mobile Development LandscapeAmbert Ho
 
DIGIT Noe 2016 - Overview of front end development today
DIGIT Noe 2016 - Overview of front end development todayDIGIT Noe 2016 - Overview of front end development today
DIGIT Noe 2016 - Overview of front end development todayBojan Veljanovski
 
Training presentation.pptx
Training presentation.pptxTraining presentation.pptx
Training presentation.pptxNishchaiyaBayla1
 
Cross-Platform Development using Angulr JS in Visual Studio
Cross-Platform Development using Angulr JS in Visual StudioCross-Platform Development using Angulr JS in Visual Studio
Cross-Platform Development using Angulr JS in Visual StudioMizanur Sarker
 
Decoupled Architecture and WordPress
Decoupled Architecture and WordPressDecoupled Architecture and WordPress
Decoupled Architecture and WordPressPantheon
 
Seven Versions of One Web Application
Seven Versions of One Web ApplicationSeven Versions of One Web Application
Seven Versions of One Web ApplicationYakov Fain
 

Semelhante a Mobile Hybrid Development with WordPress (20)

From WordPress With Love
From WordPress With LoveFrom WordPress With Love
From WordPress With Love
 
Mobile and IBM Worklight Best Practices
Mobile and IBM Worklight Best PracticesMobile and IBM Worklight Best Practices
Mobile and IBM Worklight Best Practices
 
Make Mobile Apps Quickly
Make Mobile Apps QuicklyMake Mobile Apps Quickly
Make Mobile Apps Quickly
 
Anatomy of an HTML 5 mobile web app
Anatomy of an HTML 5 mobile web app Anatomy of an HTML 5 mobile web app
Anatomy of an HTML 5 mobile web app
 
Top java script frameworks ppt
Top java script frameworks pptTop java script frameworks ppt
Top java script frameworks ppt
 
[2015/2016] Apache Cordova
[2015/2016] Apache Cordova[2015/2016] Apache Cordova
[2015/2016] Apache Cordova
 
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
 
Webdev battacherjee
Webdev battacherjeeWebdev battacherjee
Webdev battacherjee
 
Intro to Ionic for Building Hybrid Mobile Applications
Intro to Ionic for Building Hybrid Mobile ApplicationsIntro to Ionic for Building Hybrid Mobile Applications
Intro to Ionic for Building Hybrid Mobile Applications
 
Introduction to hybrid application development
Introduction to hybrid application developmentIntroduction to hybrid application development
Introduction to hybrid application development
 
Desktop apps with node webkit
Desktop apps with node webkitDesktop apps with node webkit
Desktop apps with node webkit
 
How to start developing apps for Firefox OS
How to start developing apps for Firefox OSHow to start developing apps for Firefox OS
How to start developing apps for Firefox OS
 
The Mobile Development Landscape
The Mobile Development LandscapeThe Mobile Development Landscape
The Mobile Development Landscape
 
DIGIT Noe 2016 - Overview of front end development today
DIGIT Noe 2016 - Overview of front end development todayDIGIT Noe 2016 - Overview of front end development today
DIGIT Noe 2016 - Overview of front end development today
 
Training presentation.pptx
Training presentation.pptxTraining presentation.pptx
Training presentation.pptx
 
BlackBerry WebWorks
BlackBerry WebWorksBlackBerry WebWorks
BlackBerry WebWorks
 
Cross-Platform Development using Angulr JS in Visual Studio
Cross-Platform Development using Angulr JS in Visual StudioCross-Platform Development using Angulr JS in Visual Studio
Cross-Platform Development using Angulr JS in Visual Studio
 
Decoupled Architecture and WordPress
Decoupled Architecture and WordPressDecoupled Architecture and WordPress
Decoupled Architecture and WordPress
 
Seven Versions of One Web Application
Seven Versions of One Web ApplicationSeven Versions of One Web Application
Seven Versions of One Web Application
 
Chapter3 mo
Chapter3 moChapter3 mo
Chapter3 mo
 

Último

Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 

Último (20)

Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

Mobile Hybrid Development with WordPress

  • 1. Mobile hybrid development with WordPress Saturday November 24th, 2012 Bologna, Italy
  • 2. WordPress.com Reader • WordPress.com has introduced a blog reader feature that’s a cross between Google Reader and reader apps like Flipboard. Through it you can keep track of blogs from WordPress.com, but also other places.
  • 3. WordPress.com Reader • The reader displays all the posts across all the blogs you follow in the order they were published, with the most recent content appearing at the top. You’ll see an excerpt of the introduction to each post, the first image in the post, and thumbnails of any other images that the post contains.
  • 5. WordPress.com Reader • A user can add any blog to the Reader by tapping the “Follow” button in the top admin bar while viewing the blog.
  • 6. Introducing the mobile Reader • Read posts from blogs you’re following on WordPress.com right in the mobile apps, with the addition of social actions, such as ‘like’, ‘reblog’, ‘in-line commenting’, and more. • We wanted to add this new feature on all of our mobile apps (Android, iOS, BlackBerry, Windows Phone), trying to reuse the same codebase as much as possible.
  • 7. Requirements • The content should be available as soon as the user clicks on the button. No lags, no long loading time. (If your app takes too long loading data, the user will probably switch to another task). • Access device native features such as sounds, native pull-to-refresh, blog preferences stored in the app. • Native or Hybrid ? -> We tried the Hybrid way
  • 8. Hybrid Mobile Apps • A hybrid app is a native, downloadable app, that runs all or some of its UI in an embedded browser component. • HTML / CSS / JavaScript. • Hybrid apps can access device features such as file- system, cameras and geolocation services. • Frameworks, such as the open source project ‘Apache Cordova’, make the development of hybrid apps portable across devices, and allow developer to access native device features from one common JS API.
  • 9. Loading the Reader • Clients authenticate on startup and keep track of the WP auth cookie. ( An alternative way is to use the WordPress.com login form and the redirect_to parameter, but it’s slower ). • The target of the redirect ( The URL of the Reader ) is something like https://wordpress.com/reader/mobile/v2/ • We’ve added a filter on ‘page_template’, and the server outputs a simple HTML5 page. • The home page is a template that loads the required CSS and JS files. • Ajax calls to load the content of the reader. Those calls will start when the home page is fully loaded on the client.
  • 10. [ Example of server response { "fp_bg_image" : "http://s2.wp.com/imgpress?w=310&#038;url=http%3A%2F%2Faphs.worldnomads.com %2FOffTheBeatenPath%2F22448%2FiStock_000003676011Small.jpg&#038;unsharpmask=80,0.5,3", "avatar" : "http://en.wordpress.com/wp-content/themes/h4/i/mobile/subs-rss-mobile.png? cached", "author_name" : "Tim", "author_avatar" : "http://1.gravatar.com/avatar/a4797cc25c5fe8922fc81c7d16e17bd8?s=64&amp;d=http %3A%2F%2F0.gravatar.com%2Fblavatar%2F0ef9c8d9ca53dd718d", "title" : "I Donu2019t Enjoy the Ride", "content" : "<p><img class="alignright" title="Road Trip" alt="" src="http://s0.wp.com/ imgpress?url=http%3A%2F%2Faphs.worldnomads.com%2FOffTheB>....", "excerpt" : "<div class="full">..../div>...", "post_id" : 185, "guid" : "http://narrativeodyssey.com/?p=185", "permalink" : "http://narrativeodyssey.com/2012/11/17/i-dont-enjoy-the-ride/", "blog_id" : "35445524", "blog" : "my narrative odyssey", "blogurl" : "http://narrativeodyssey.wordpress.com", "ts" : 1353217713, "comment_count" : 0, "pluralized_comment" : "Comments", "ago" : "1d", ... "follow_url" : "http://wordpress.com/following?b=00&amp;_wpnonce=not_in_the_house_XXdd5a200", "unfollow_url" : "http://wordpress.com/following?b=00&amp;unsub=1&amp;_wpnonce=not_in_the_hous", "following" : 0 },
  • 11. How it looks on different devices The same experience on Android and iOS. A little bit different on BB.
  • 12. How it looks on different devices BlackBerry with Keyboard iPhone4
  • 13. How it looks on different devices : Topics Selector BlackBerry with Keyboard iPhone4
  • 14. How it looks on different devices : Comment Form BlackBerry with Keyboard iPhone4
  • 15. JS Libraries used • FitVids.js - A lightweight, easy-to-use jQuery plugin for fluid width video embeds. • {{ mustache }} - Templating • Two internal libraries for UA detection and capabilities detection.
  • 16. Communication between JS and Native code • We’ve written a “bridge” that simplies the communication between the JS layer and the native code (and vice versa). • The bridge also adds some security checks to prevent malicious pages from executing native methods.
  • 17. Issues found • Excessive stuttering when scrolling the posts list with images on it (Old versions of Android). • On the iPhone4 there were issues scrolling the lists due to missing optimizations for the UIWebView, and the absence of the Nitro JS Engine. • We did a lot of optimizations, but the scrolling is fast on iPhone 4S, not on the iPhone4. • BlackBerry 7 browser is very slow at rendering complex pages. • Windows Phone 7 doesn’t support HTML5 so we skipped that platform for now.
  • 18. Performance Improvements (1) CACHE: # JS /wp-includes/js/jquery/jquery.js .. # CSS /wp-content/themes/nomoreplasticthree/mobile/v2/reader.css .. # images from the CSS /wp-content/themes/nomoreplasticthree/i/mobile/v2/read.png /wp-content/themes/nomoreplasticthree/i/mobile/v2/read@2x.png ... # All other content accessed over the Network NETWORK: /wp-admin/admin-ajax.php* * http://* https://*
  • 19. Performance Improvements (2) • Use of localStorage to store the JSON response(s), and make them available without accessing the net. • JS time-diff to update the content without reloading it from the network. • Images are replaced with a smaller version server- side. Full version will be downloaded later, on demand, with a simple JS code. (This is possible thanks to the .COM ImagePress API). http://s0.wp.com/imgpress?url=http%3A%2F %2Fdigilander.libero.it%2Frondine_spensierata %2FUomoVetriRottiMare.jpg&h=150
  • 20. The Future: REST API + Native • REST API opens access to posts, comments, follow, like and more. • http://developer.wordpress.com • Available on WordPress.com, and on Jetpack powered sites. • Should be available in WordPress Core in the future.
  • 21. WordPress mobile apps WordPress Mobile http://make.wordpress.org/mobile App specific development blogs with links to code testing info: • WordPress for Android http://dev.android.wordpress.org/ • WordPress for BlackBerry http://dev.blackberry.wordpress.org/ • WordPress for iOS http://iphonedev.wordpress.org/ • WordPress for Windows Phone http://wpwindowsphonedev.wordpress.org/
  • 22. Thanks ! Questions ? Danilo Ercoli Mobile Wrangler http://daniloercoli.wordpress.com http://twitter.com/daniloercoli