SlideShare une entreprise Scribd logo
1  sur  71
Mobile & Multi-device with




by @mtopolov CTO of @adyax & @padcms
100 Drupal Experts, 45 big Drupal projects in 2011
You said mobile ?
Mobile Web what’s that ?

Multiple devices
Touch interfaces
Real life usage context
Poor quality internet / offline mode
Multi-device ?
Multiple devices


 + Numerous ratios (4:3, 16:9, 16:10, 3:4, 1:1...)
 + Many screen resolutions (240x240 -> 2048x1536)
 = Importance to adapt the content to the device
Touch-me !?
Touch Interfaces

 Fingers are larger and clumsier than a mouse
 But scrolling is easier
 So : Bigger content disposed vertically
 Need of a visual feedback (we do not have ‘clicks’)
Real-life usage
in theory
but in practice we
     have this
this
this
or even this
Real life context


 Speed and Relevance (remove the useless)
 The most important first (re-organise your content)
 Use location (if relevant)
Poor Internet
Low band internet / Offline

 You content should be available even if the connection
 is lost
 Your content must be as light-weight as possible
 And, of course, your server should respond as quickly
 as possible
Why the fuck mobile is so
important ?
6 000 000 000 000 000 000 bytes / month
Mobile traffic growth

 by 2016 mobile traffic will be multiplied by 30
 In Africa & Asia, mobile web is already 50% of the
 whole Internet
 200 millions tablets right now in the world
Why the hell it does 3% on
my web-site ?

 Chicken/Egg problem : maybe people do not come
 back because your site is NOT mobile-friendly.
 Mobile SEO is not just Google... (App stores, twitter,
 facebook, are much more important in mobile)
 Your content is not relevant in a mobile context
Solutions
Drupal Mobile Solutions

 Responsive Design
 Mobile theme (mobile context)
 Native Apps (PhoneGap, Titanium, or DYI)
 A word about local web.
What for whom ?
                  Responsive   Mobile Theme   Native Apps

   eCommerce                      YES
         Media       NO           YES           YES
Social Networks      NO                         YES
        Brands      YES            NO
     Databases      YES                          NO
     NGO / Gov      YES                          NO
Responsive Design
(or how to hook a nerd girl)
Supa-mega-trendy-stuff, yeah ?
Responsive design

Extremely cool during a client demo («wooaaa» effect)
A real pain the A** during HTML Slicing (2 times longer
to make it work)
Need a real functional and UX approach
Big + : there are no more dev. impacts once HTML is
done.
Responsive Drupal ?

Omega, a good grid / responsive starter theme (D7
only)
Globally responsive has no impact on Drupal itself
(Panels?)
Think to create different ImageCache presets for each
device class (usually 3 are ok)
Some stupid examples
<link href="/css/screen.css" type="text/css" rel="stylesheet"
media="all" />

<link rel="stylesheet" media="only screen and (max-width:
1020px)" href="/css/screen_800.css" type="text/css" />

<link rel="stylesheet" media="only screen and (max-width:
600px)" href="/css/screen_320.css" type="text/css" />
With some JS
 $(document).ready(function(){
  if(
    screen.width < 750 ||
    navigator.userAgent.match(/Android/i) ||
    navigator.userAgent.match(/webOS/i) ||
    navigator.userAgent.match(/iPhone/i) ||
    navigator.userAgent.match(/iPod/i)
  ){
    $('body').addClass('this-is-mobile');
  };
Well some examples
Well some examples
Well some examples
Well some examples
Well some examples
Well some examples
Mobile theme
(or more like a mobile context)
Mobile theme


When to switch to mobile context ?
We do not switch theme, but context : Views, Panels,
and our custom modules are impacted
To go faster, use JQuery mobile, if client agrees.
When to switch ?

As soon as possible (LB, Proxy).
Do NOT do it in Drupal (Browscap, Wurfl...)



         Load      Cache /
                             HTTP     Drupal
        Balancer    Proxy
Varnish (1/2)
Cookie ?              UA            Custom Error                 Redirect




if (!req.http.Cookie ~ "mdevice=desktop") {
	      set req.http.X-Device = "pc";

	   if (req.http.User-Agent ~ "iP(hone|od)" || req.http.User-Agent ~ "Android" ||
req.http.User-Agent ~ "Symbian" || req.http.User-Agent ~ "BlackBerry" || req.http.User-
Agent ~ "^SonyEricsson" || req.http.User-Agent ~ "^Nokia" || req.http.User-Agent ~
"^SAMSUNG" || req.http.User-Agent ~ "^LG" || req.http.User-Agent ~ "	webOS") {
	       set req.http.X-Device = "mobile";
	     }
Varnish (2/2)
Cookie ?            UA             Custom Error              Redirect


if(req.http.X-Device == "mobile") {
	      if(req.http.host !~ "m.erol.adyax.com:6081") {
	    	      error 751 "m.erol.adyax.com:6081"; } 	      }

sub vcl_error {
	   if (obj.status == 751) {
	   	     if (obj.response ~ "m.erol.adyax.com:6081") {
	   	     	     set obj.http.Location = "http://m.erol.adyax.com:6081" req.url;	
	   	     	     set obj.http.Vary = "Cookie";
	   	     	     set obj.http.Cache-Control = "private";
	   	     	     set obj.http.Expires = "Sat, 21 Aug 2022 06:00:00 GMT"; }
	   	     set obj.status = 302;
	   	     return(deliver); } }
Core ideas of mobile context
    Theme Custom / JQuery Mobile (Theme)


         ImageCache, Panels (Layout)


  Mobile Tools / Domains (mobile.yoursite.com)


       VARNISH (Redirection HTTP 302)
jQuery Mobile
  jQuery Mobile: «Touch-Optimized Web Framework for
  Smartphones & Tablets »
  You can easily customize (colors)
  Looks like iPhone sh**




http://jquerymobile.com/
JQM Pros & Cons
           Pros                      Cons

                           You client have to accept
 Fast to setup (2-3 jours)
                                  JQM design
   Items look like native   Hard to hack if you want
         elements                to go deeper
 Avoids you to think about Avoids you to think about
          mobile                    mobile
Some live examples
Some live examples
Some live examples
Some live examples
Some live examples
Native Apps
Basic principles


 Your app must get some content from Drupal
 Offline mode should work
 Content may be updated at any time on back-end side.
Services 3.X


 Give access to nodes, files, taxonomies, users, views
 Some basic security stuff (API Key)
 Server API offers your to code your own protocols (if
 you really like it...)
Usual problems

Leak of structure (thanks to CCK)
SOAP is not standard and totally crappy
No WSDL
Problems with NodeRefs, Medias, Composed fields
<?xml version='1.0' ?>
<methodCall>
 <methodName>node.create</methodName>
 <params>
  <param>
   <value>
    <struct>
     <member>
      <name>type</name>
      <value>
        <string>story</string>
      </value>
                                             node.create
     </member>
     <member>
      <name>body</name>
      <value>
        <string>Create body input</string>
      </value>
     </member>
     <member>
      <name>title</name>
      <value>
        <string>Test title</string>
      </value>
     </member>
    </struct>
   </value>
  </param>
 </params>
</methodCall>
SOAP                                          399 bytes


<?xml version='1.0' encoding='UTF-8'?>
<s:Envelope
  xmlns:s="http://www.w3.org/2001/06/soap-envelope"
  xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/1999/XMLSchema">
  <s:Body>
    <x:FlickrRequest xmlns:x="urn:flickr">
      <method>flickr.echo</method>
      <name>value</name>
    </x:FlickrRequest>
  </s:Body>
</s:Envelope>
XML-RPC                                  99 bytes



<?xml version="1.0"?>
<methodCall>
  <methodName>flickr.echo</methodName>
  <params/>
</methodCall>
JSON                            68 bytes



{
    "method" : "flickr.echo",
    "params" : null,
    "id"    : 1
}
B-PLIST                                                   52 bytes



  6270   6c69   7374   3030   d101   0256   6d65   7468
  6f64   5b66   6c69   636b   722e   6563   686f   080b
  1200   0000   0000   0001   0100   0000   0000   0000
  0300   0000   0000   0000   0000   0000   0000   0000
  1e
...but, you can do HTML

The whole application is just a big WebUI wrapper with
JS events handlers
Drupal side we generate static HTML with Boost
Sync using SVN (http://pecl.php.net/package/svn/
1.0.0)
Dangers of that method

Usually current devices WebUI support is slow => we
had to pre-generate all HTML in PNG with clickable
zones
URLs rewriting (local navigation)
Videos integrations (parsing of <object>)
SG : Drupal web site + Mobile theme + iPad App
SG : Drupal web site + Mobile theme + iPad App
SG : Drupal web site + Mobile theme + iPad App
SG : Drupal web site + Mobile theme + iPad App
Some usefull mobile modules

http://drupal.org/project/mobile_tools


http://drupal.org/project/domain


http://drupal.org/project/browscap


http://drupal.org/project/omega


http://drupal.org/project/views_jqm
A word about local
What is Local btw ?

Everything !
Geocoded content
Geocoded users / vistors
Geographical Search
And no, putting a Google Map does NOT mean Local
Content geocoding


Well, Location module is really nice, useful for 90%.
Manages POI only
Geo (buggy) but manages Polygons & Lines
GeoField to store your POI coordinates
Display Geo Data


GMap module : simpliest integration
Open Layers module : really nice maps effect.
KLM & Clusterer to display high amount of markers
Geographical search

     HTML5 to ask for visitor localisation
     MySQL is not suitable*
     Apache SOLR 3.4 or 4 have a Spatial Search (distance
     & boxing) reaaaaally cool.
     MongoDB is an alternative (with it’s GeoSpatial
     Indexing)
* SELECT id_geo FROM mybase.mytable AS p WHERE 6371 * 2 * ATAN2 ( SQRT ( ( SIN( ( RADIANS(p.lat - 43.27292469899955000) / 2 ) * SIN( RADIANS(p.lat -
43.27292469899955000) / 2 ) + COS ( RADIANS (43.27292469899955000 )) * COS ( RADIANS ( p.lat ) ) * SIN ( RADIANS(p.lon - 5.36235809326171900) / 2 ) * SIN
( RADIANS(p.lon - 5.36235809326171900) / 2 ) ) ) , SQRT ( 1 - (SIN( RADIANS(p.lat - 43.27292469899955000) / 2 ) * SIN( RADIANS(p.lat - 43.27292469899955000) / 2 ) +
COS ( RADIANS (43.27292469899955000) ) * COS ( RADIANS (p.lat) ) * SIN ( RADIANS(p.lon - 5.36235809326171900) / 2 ) * SIN ( RADIANS(p.lon -
5.36235809326171900) / 2 ) ) ) ) < 1
We just launched the first OPEN SOURCE
tool to create your interactive magazines on
          tablets (iPad & Android)

           DEV.PADCMS.NET

                         http://padcms.com
                              @PadCMS
Have a question ? Just
   ask ! Gracias !

@adyax, @mtopolov

Contenu connexe

En vedette

The web you were used to is gone. Architecture and strategy for your content.
The web you were used to is gone. Architecture and strategy for your content.The web you were used to is gone. Architecture and strategy for your content.
The web you were used to is gone. Architecture and strategy for your content.Alberta Soranzo
 
The web you were used to is gone. Architecture and strategy for your mobile c...
The web you were used to is gone. Architecture and strategy for your mobile c...The web you were used to is gone. Architecture and strategy for your mobile c...
The web you were used to is gone. Architecture and strategy for your mobile c...Alberta Soranzo
 
Mobile is not mobile - 7 phénomènes disruptifs* à prévoir dans l’entreprise
Mobile is not mobile - 7 phénomènes disruptifs* à prévoir dans l’entrepriseMobile is not mobile - 7 phénomènes disruptifs* à prévoir dans l’entreprise
Mobile is not mobile - 7 phénomènes disruptifs* à prévoir dans l’entrepriseservicesmobiles.fr
 
SEO for Mobile Apps
SEO for Mobile AppsSEO for Mobile Apps
SEO for Mobile AppsAbdul Malick
 
Awesome android apps
Awesome android appsAwesome android apps
Awesome android appsRichard Byrne
 
Classement de la fréquentation des applications mobile OJD - Avril 2013
Classement de la fréquentation des applications mobile OJD - Avril 2013Classement de la fréquentation des applications mobile OJD - Avril 2013
Classement de la fréquentation des applications mobile OJD - Avril 2013Romain Fonnier
 
Mobile Marketing: How Consumers Use Mobile to Connect with Your Business
Mobile Marketing: How Consumers Use Mobile to Connect with Your BusinessMobile Marketing: How Consumers Use Mobile to Connect with Your Business
Mobile Marketing: How Consumers Use Mobile to Connect with Your BusinessSIXTY
 
Smart contents in multi screen
Smart contents in multi screenSmart contents in multi screen
Smart contents in multi screenSeungyul Kim
 
Mobile Marketing Trend Report - AUG 2012
Mobile Marketing Trend Report - AUG 2012Mobile Marketing Trend Report - AUG 2012
Mobile Marketing Trend Report - AUG 2012Daniel Wood
 
3eme observatoire de l'internet mobile 2011
3eme observatoire de l'internet mobile 20113eme observatoire de l'internet mobile 2011
3eme observatoire de l'internet mobile 2011servicesmobiles.fr
 
Marketing des applications mobiles
Marketing des applications mobilesMarketing des applications mobiles
Marketing des applications mobilesSamir Bellik
 
Intro to social media on mobile at Mobile Monday Brussels
Intro to social media on mobile at Mobile Monday BrusselsIntro to social media on mobile at Mobile Monday Brussels
Intro to social media on mobile at Mobile Monday BrusselsMobilosoft
 
Mobile Marketing Attitude 2013 - SNCD
Mobile Marketing Attitude 2013 - SNCDMobile Marketing Attitude 2013 - SNCD
Mobile Marketing Attitude 2013 - SNCDRomain Fonnier
 
Placecast - E-commerce Paris 2012
Placecast - E-commerce Paris 2012Placecast - E-commerce Paris 2012
Placecast - E-commerce Paris 2012Petit Web
 

En vedette (16)

The web you were used to is gone. Architecture and strategy for your content.
The web you were used to is gone. Architecture and strategy for your content.The web you were used to is gone. Architecture and strategy for your content.
The web you were used to is gone. Architecture and strategy for your content.
 
The web you were used to is gone. Architecture and strategy for your mobile c...
The web you were used to is gone. Architecture and strategy for your mobile c...The web you were used to is gone. Architecture and strategy for your mobile c...
The web you were used to is gone. Architecture and strategy for your mobile c...
 
Mobile is not mobile - 7 phénomènes disruptifs* à prévoir dans l’entreprise
Mobile is not mobile - 7 phénomènes disruptifs* à prévoir dans l’entrepriseMobile is not mobile - 7 phénomènes disruptifs* à prévoir dans l’entreprise
Mobile is not mobile - 7 phénomènes disruptifs* à prévoir dans l’entreprise
 
You can't beat the experience November 2014
You can't beat the experience November 2014You can't beat the experience November 2014
You can't beat the experience November 2014
 
SEO for Mobile Apps
SEO for Mobile AppsSEO for Mobile Apps
SEO for Mobile Apps
 
Awesome android apps
Awesome android appsAwesome android apps
Awesome android apps
 
Chiffres du mobile en france
Chiffres du mobile en franceChiffres du mobile en france
Chiffres du mobile en france
 
Classement de la fréquentation des applications mobile OJD - Avril 2013
Classement de la fréquentation des applications mobile OJD - Avril 2013Classement de la fréquentation des applications mobile OJD - Avril 2013
Classement de la fréquentation des applications mobile OJD - Avril 2013
 
Mobile Marketing: How Consumers Use Mobile to Connect with Your Business
Mobile Marketing: How Consumers Use Mobile to Connect with Your BusinessMobile Marketing: How Consumers Use Mobile to Connect with Your Business
Mobile Marketing: How Consumers Use Mobile to Connect with Your Business
 
Smart contents in multi screen
Smart contents in multi screenSmart contents in multi screen
Smart contents in multi screen
 
Mobile Marketing Trend Report - AUG 2012
Mobile Marketing Trend Report - AUG 2012Mobile Marketing Trend Report - AUG 2012
Mobile Marketing Trend Report - AUG 2012
 
3eme observatoire de l'internet mobile 2011
3eme observatoire de l'internet mobile 20113eme observatoire de l'internet mobile 2011
3eme observatoire de l'internet mobile 2011
 
Marketing des applications mobiles
Marketing des applications mobilesMarketing des applications mobiles
Marketing des applications mobiles
 
Intro to social media on mobile at Mobile Monday Brussels
Intro to social media on mobile at Mobile Monday BrusselsIntro to social media on mobile at Mobile Monday Brussels
Intro to social media on mobile at Mobile Monday Brussels
 
Mobile Marketing Attitude 2013 - SNCD
Mobile Marketing Attitude 2013 - SNCDMobile Marketing Attitude 2013 - SNCD
Mobile Marketing Attitude 2013 - SNCD
 
Placecast - E-commerce Paris 2012
Placecast - E-commerce Paris 2012Placecast - E-commerce Paris 2012
Placecast - E-commerce Paris 2012
 

Plus de Adyax

Growing a Drupalshop from 1 to 12M€
Growing a Drupalshop from 1 to 12M€Growing a Drupalshop from 1 to 12M€
Growing a Drupalshop from 1 to 12M€Adyax
 
Applications métier avec Drupal
Applications métier avec DrupalApplications métier avec Drupal
Applications métier avec DrupalAdyax
 
Using Drupal to publish Web, Print and Mobile from same CMS
Using Drupal to publish Web, Print and Mobile from same CMSUsing Drupal to publish Web, Print and Mobile from same CMS
Using Drupal to publish Web, Print and Mobile from same CMSAdyax
 
Multiple countries & multilingual e-commerce platforms using Drupal
Multiple countries & multilingual e-commerce platforms using DrupalMultiple countries & multilingual e-commerce platforms using Drupal
Multiple countries & multilingual e-commerce platforms using DrupalAdyax
 
Estimation de projets Drupal
Estimation de projets DrupalEstimation de projets Drupal
Estimation de projets DrupalAdyax
 
Drupal n'est pas seulement un CMS
Drupal n'est pas seulement un CMSDrupal n'est pas seulement un CMS
Drupal n'est pas seulement un CMSAdyax
 
Drupal fixed budget projets : the art of estimates
Drupal fixed budget projets : the art of estimatesDrupal fixed budget projets : the art of estimates
Drupal fixed budget projets : the art of estimatesAdyax
 
Réaliser un site e-commerce multi-pays et multilingue connecté à SAP
Réaliser un site e-commerce multi-pays et multilingue connecté à SAPRéaliser un site e-commerce multi-pays et multilingue connecté à SAP
Réaliser un site e-commerce multi-pays et multilingue connecté à SAPAdyax
 
Présentation de Drupal
Présentation de DrupalPrésentation de Drupal
Présentation de DrupalAdyax
 
Cours 3/3 - Architecture Web
Cours 3/3 - Architecture WebCours 3/3 - Architecture Web
Cours 3/3 - Architecture WebAdyax
 
Cours 2/3 - Architecture Web
Cours 2/3 - Architecture WebCours 2/3 - Architecture Web
Cours 2/3 - Architecture WebAdyax
 
Cours 1/3 "Architecture Web"
Cours 1/3 "Architecture Web"Cours 1/3 "Architecture Web"
Cours 1/3 "Architecture Web"Adyax
 
Gestion multi-pays & multilingue avec Drupal
Gestion multi-pays & multilingue avec DrupalGestion multi-pays & multilingue avec Drupal
Gestion multi-pays & multilingue avec DrupalAdyax
 
Gestion des médias dans Drupal
Gestion des médias dans DrupalGestion des médias dans Drupal
Gestion des médias dans DrupalAdyax
 
Varnish
VarnishVarnish
VarnishAdyax
 
La mobilité dans Drupal
La mobilité dans DrupalLa mobilité dans Drupal
La mobilité dans DrupalAdyax
 
Drupal + Magento pour la plus puissante plateforme e-Commerce
Drupal + Magento pour la plus puissante plateforme e-CommerceDrupal + Magento pour la plus puissante plateforme e-Commerce
Drupal + Magento pour la plus puissante plateforme e-CommerceAdyax
 
eCommerce sur Ipad et autres tablettes tactiles
eCommerce sur Ipad et autres tablettes tactileseCommerce sur Ipad et autres tablettes tactiles
eCommerce sur Ipad et autres tablettes tactilesAdyax
 
For a Social Local and Mobile Drupal
For a Social Local and Mobile DrupalFor a Social Local and Mobile Drupal
For a Social Local and Mobile DrupalAdyax
 
Réussir son projet Drupal
Réussir son projet DrupalRéussir son projet Drupal
Réussir son projet DrupalAdyax
 

Plus de Adyax (20)

Growing a Drupalshop from 1 to 12M€
Growing a Drupalshop from 1 to 12M€Growing a Drupalshop from 1 to 12M€
Growing a Drupalshop from 1 to 12M€
 
Applications métier avec Drupal
Applications métier avec DrupalApplications métier avec Drupal
Applications métier avec Drupal
 
Using Drupal to publish Web, Print and Mobile from same CMS
Using Drupal to publish Web, Print and Mobile from same CMSUsing Drupal to publish Web, Print and Mobile from same CMS
Using Drupal to publish Web, Print and Mobile from same CMS
 
Multiple countries & multilingual e-commerce platforms using Drupal
Multiple countries & multilingual e-commerce platforms using DrupalMultiple countries & multilingual e-commerce platforms using Drupal
Multiple countries & multilingual e-commerce platforms using Drupal
 
Estimation de projets Drupal
Estimation de projets DrupalEstimation de projets Drupal
Estimation de projets Drupal
 
Drupal n'est pas seulement un CMS
Drupal n'est pas seulement un CMSDrupal n'est pas seulement un CMS
Drupal n'est pas seulement un CMS
 
Drupal fixed budget projets : the art of estimates
Drupal fixed budget projets : the art of estimatesDrupal fixed budget projets : the art of estimates
Drupal fixed budget projets : the art of estimates
 
Réaliser un site e-commerce multi-pays et multilingue connecté à SAP
Réaliser un site e-commerce multi-pays et multilingue connecté à SAPRéaliser un site e-commerce multi-pays et multilingue connecté à SAP
Réaliser un site e-commerce multi-pays et multilingue connecté à SAP
 
Présentation de Drupal
Présentation de DrupalPrésentation de Drupal
Présentation de Drupal
 
Cours 3/3 - Architecture Web
Cours 3/3 - Architecture WebCours 3/3 - Architecture Web
Cours 3/3 - Architecture Web
 
Cours 2/3 - Architecture Web
Cours 2/3 - Architecture WebCours 2/3 - Architecture Web
Cours 2/3 - Architecture Web
 
Cours 1/3 "Architecture Web"
Cours 1/3 "Architecture Web"Cours 1/3 "Architecture Web"
Cours 1/3 "Architecture Web"
 
Gestion multi-pays & multilingue avec Drupal
Gestion multi-pays & multilingue avec DrupalGestion multi-pays & multilingue avec Drupal
Gestion multi-pays & multilingue avec Drupal
 
Gestion des médias dans Drupal
Gestion des médias dans DrupalGestion des médias dans Drupal
Gestion des médias dans Drupal
 
Varnish
VarnishVarnish
Varnish
 
La mobilité dans Drupal
La mobilité dans DrupalLa mobilité dans Drupal
La mobilité dans Drupal
 
Drupal + Magento pour la plus puissante plateforme e-Commerce
Drupal + Magento pour la plus puissante plateforme e-CommerceDrupal + Magento pour la plus puissante plateforme e-Commerce
Drupal + Magento pour la plus puissante plateforme e-Commerce
 
eCommerce sur Ipad et autres tablettes tactiles
eCommerce sur Ipad et autres tablettes tactileseCommerce sur Ipad et autres tablettes tactiles
eCommerce sur Ipad et autres tablettes tactiles
 
For a Social Local and Mobile Drupal
For a Social Local and Mobile DrupalFor a Social Local and Mobile Drupal
For a Social Local and Mobile Drupal
 
Réussir son projet Drupal
Réussir son projet DrupalRéussir son projet Drupal
Réussir son projet Drupal
 

Dernier

Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 

Dernier (20)

Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 

Mobile, Responsive & Multi-Device with Drupal

  • 1. Mobile & Multi-device with by @mtopolov CTO of @adyax & @padcms
  • 2. 100 Drupal Experts, 45 big Drupal projects in 2011
  • 4. Mobile Web what’s that ? Multiple devices Touch interfaces Real life usage context Poor quality internet / offline mode
  • 6. Multiple devices + Numerous ratios (4:3, 16:9, 16:10, 3:4, 1:1...) + Many screen resolutions (240x240 -> 2048x1536) = Importance to adapt the content to the device
  • 8. Touch Interfaces Fingers are larger and clumsier than a mouse But scrolling is easier So : Bigger content disposed vertically Need of a visual feedback (we do not have ‘clicks’)
  • 11. but in practice we have this
  • 12. this
  • 13. this
  • 15. Real life context Speed and Relevance (remove the useless) The most important first (re-organise your content) Use location (if relevant)
  • 17. Low band internet / Offline You content should be available even if the connection is lost Your content must be as light-weight as possible And, of course, your server should respond as quickly as possible
  • 18. Why the fuck mobile is so important ? 6 000 000 000 000 000 000 bytes / month
  • 19. Mobile traffic growth by 2016 mobile traffic will be multiplied by 30 In Africa & Asia, mobile web is already 50% of the whole Internet 200 millions tablets right now in the world
  • 20. Why the hell it does 3% on my web-site ? Chicken/Egg problem : maybe people do not come back because your site is NOT mobile-friendly. Mobile SEO is not just Google... (App stores, twitter, facebook, are much more important in mobile) Your content is not relevant in a mobile context
  • 22. Drupal Mobile Solutions Responsive Design Mobile theme (mobile context) Native Apps (PhoneGap, Titanium, or DYI) A word about local web.
  • 23. What for whom ? Responsive Mobile Theme Native Apps eCommerce YES Media NO YES YES Social Networks NO YES Brands YES NO Databases YES NO NGO / Gov YES NO
  • 24. Responsive Design (or how to hook a nerd girl)
  • 26. Responsive design Extremely cool during a client demo («wooaaa» effect) A real pain the A** during HTML Slicing (2 times longer to make it work) Need a real functional and UX approach Big + : there are no more dev. impacts once HTML is done.
  • 27. Responsive Drupal ? Omega, a good grid / responsive starter theme (D7 only) Globally responsive has no impact on Drupal itself (Panels?) Think to create different ImageCache presets for each device class (usually 3 are ok)
  • 28. Some stupid examples <link href="/css/screen.css" type="text/css" rel="stylesheet" media="all" /> <link rel="stylesheet" media="only screen and (max-width: 1020px)" href="/css/screen_800.css" type="text/css" /> <link rel="stylesheet" media="only screen and (max-width: 600px)" href="/css/screen_320.css" type="text/css" />
  • 29. With some JS $(document).ready(function(){ if( screen.width < 750 || navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/webOS/i) || navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i) ){ $('body').addClass('this-is-mobile'); };
  • 36. Mobile theme (or more like a mobile context)
  • 37. Mobile theme When to switch to mobile context ? We do not switch theme, but context : Views, Panels, and our custom modules are impacted To go faster, use JQuery mobile, if client agrees.
  • 38. When to switch ? As soon as possible (LB, Proxy). Do NOT do it in Drupal (Browscap, Wurfl...) Load Cache / HTTP Drupal Balancer Proxy
  • 39. Varnish (1/2) Cookie ? UA Custom Error Redirect if (!req.http.Cookie ~ "mdevice=desktop") { set req.http.X-Device = "pc"; if (req.http.User-Agent ~ "iP(hone|od)" || req.http.User-Agent ~ "Android" || req.http.User-Agent ~ "Symbian" || req.http.User-Agent ~ "BlackBerry" || req.http.User- Agent ~ "^SonyEricsson" || req.http.User-Agent ~ "^Nokia" || req.http.User-Agent ~ "^SAMSUNG" || req.http.User-Agent ~ "^LG" || req.http.User-Agent ~ " webOS") { set req.http.X-Device = "mobile"; }
  • 40. Varnish (2/2) Cookie ? UA Custom Error Redirect if(req.http.X-Device == "mobile") { if(req.http.host !~ "m.erol.adyax.com:6081") { error 751 "m.erol.adyax.com:6081"; } } sub vcl_error { if (obj.status == 751) { if (obj.response ~ "m.erol.adyax.com:6081") { set obj.http.Location = "http://m.erol.adyax.com:6081" req.url; set obj.http.Vary = "Cookie"; set obj.http.Cache-Control = "private"; set obj.http.Expires = "Sat, 21 Aug 2022 06:00:00 GMT"; } set obj.status = 302; return(deliver); } }
  • 41. Core ideas of mobile context Theme Custom / JQuery Mobile (Theme) ImageCache, Panels (Layout) Mobile Tools / Domains (mobile.yoursite.com) VARNISH (Redirection HTTP 302)
  • 42. jQuery Mobile jQuery Mobile: «Touch-Optimized Web Framework for Smartphones & Tablets » You can easily customize (colors) Looks like iPhone sh** http://jquerymobile.com/
  • 43. JQM Pros & Cons Pros Cons You client have to accept Fast to setup (2-3 jours) JQM design Items look like native Hard to hack if you want elements to go deeper Avoids you to think about Avoids you to think about mobile mobile
  • 50. Basic principles Your app must get some content from Drupal Offline mode should work Content may be updated at any time on back-end side.
  • 51. Services 3.X Give access to nodes, files, taxonomies, users, views Some basic security stuff (API Key) Server API offers your to code your own protocols (if you really like it...)
  • 52. Usual problems Leak of structure (thanks to CCK) SOAP is not standard and totally crappy No WSDL Problems with NodeRefs, Medias, Composed fields
  • 53. <?xml version='1.0' ?> <methodCall> <methodName>node.create</methodName> <params> <param> <value> <struct> <member> <name>type</name> <value> <string>story</string> </value> node.create </member> <member> <name>body</name> <value> <string>Create body input</string> </value> </member> <member> <name>title</name> <value> <string>Test title</string> </value> </member> </struct> </value> </param> </params> </methodCall>
  • 54. SOAP 399 bytes <?xml version='1.0' encoding='UTF-8'?> <s:Envelope xmlns:s="http://www.w3.org/2001/06/soap-envelope" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema"> <s:Body> <x:FlickrRequest xmlns:x="urn:flickr"> <method>flickr.echo</method> <name>value</name> </x:FlickrRequest> </s:Body> </s:Envelope>
  • 55. XML-RPC 99 bytes <?xml version="1.0"?> <methodCall> <methodName>flickr.echo</methodName> <params/> </methodCall>
  • 56. JSON 68 bytes { "method" : "flickr.echo", "params" : null, "id" : 1 }
  • 57. B-PLIST 52 bytes 6270 6c69 7374 3030 d101 0256 6d65 7468 6f64 5b66 6c69 636b 722e 6563 686f 080b 1200 0000 0000 0001 0100 0000 0000 0000 0300 0000 0000 0000 0000 0000 0000 0000 1e
  • 58. ...but, you can do HTML The whole application is just a big WebUI wrapper with JS events handlers Drupal side we generate static HTML with Boost Sync using SVN (http://pecl.php.net/package/svn/ 1.0.0)
  • 59. Dangers of that method Usually current devices WebUI support is slow => we had to pre-generate all HTML in PNG with clickable zones URLs rewriting (local navigation) Videos integrations (parsing of <object>)
  • 60. SG : Drupal web site + Mobile theme + iPad App
  • 61. SG : Drupal web site + Mobile theme + iPad App
  • 62. SG : Drupal web site + Mobile theme + iPad App
  • 63. SG : Drupal web site + Mobile theme + iPad App
  • 64. Some usefull mobile modules http://drupal.org/project/mobile_tools http://drupal.org/project/domain http://drupal.org/project/browscap http://drupal.org/project/omega http://drupal.org/project/views_jqm
  • 65. A word about local
  • 66. What is Local btw ? Everything ! Geocoded content Geocoded users / vistors Geographical Search And no, putting a Google Map does NOT mean Local
  • 67. Content geocoding Well, Location module is really nice, useful for 90%. Manages POI only Geo (buggy) but manages Polygons & Lines GeoField to store your POI coordinates
  • 68. Display Geo Data GMap module : simpliest integration Open Layers module : really nice maps effect. KLM & Clusterer to display high amount of markers
  • 69. Geographical search HTML5 to ask for visitor localisation MySQL is not suitable* Apache SOLR 3.4 or 4 have a Spatial Search (distance & boxing) reaaaaally cool. MongoDB is an alternative (with it’s GeoSpatial Indexing) * SELECT id_geo FROM mybase.mytable AS p WHERE 6371 * 2 * ATAN2 ( SQRT ( ( SIN( ( RADIANS(p.lat - 43.27292469899955000) / 2 ) * SIN( RADIANS(p.lat - 43.27292469899955000) / 2 ) + COS ( RADIANS (43.27292469899955000 )) * COS ( RADIANS ( p.lat ) ) * SIN ( RADIANS(p.lon - 5.36235809326171900) / 2 ) * SIN ( RADIANS(p.lon - 5.36235809326171900) / 2 ) ) ) , SQRT ( 1 - (SIN( RADIANS(p.lat - 43.27292469899955000) / 2 ) * SIN( RADIANS(p.lat - 43.27292469899955000) / 2 ) + COS ( RADIANS (43.27292469899955000) ) * COS ( RADIANS (p.lat) ) * SIN ( RADIANS(p.lon - 5.36235809326171900) / 2 ) * SIN ( RADIANS(p.lon - 5.36235809326171900) / 2 ) ) ) ) < 1
  • 70. We just launched the first OPEN SOURCE tool to create your interactive magazines on tablets (iPad & Android) DEV.PADCMS.NET http://padcms.com @PadCMS
  • 71. Have a question ? Just ask ! Gracias ! @adyax, @mtopolov

Notes de l'éditeur

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n
  54. \n
  55. \n
  56. \n
  57. \n
  58. \n
  59. \n
  60. \n
  61. \n
  62. \n
  63. \n
  64. \n
  65. \n
  66. \n
  67. \n
  68. \n