Phonegap/Cordova proposal – BBY / FS Mobile Sites and Apps – Current State of Mobile Sites (Homepage)



Phonegap/Cordova proposal – BBY / FS Mobile Sites and Apps – Current State of Mobile Sites (Homepage)

0 0


jmvc-mobile-presentation


On Github AlekzZz / jmvc-mobile-presentation

Phonegap/Cordova proposal

BBY / FS Mobile Sites and Apps

by Aleksandr Strutynskyy

Current State of Mobile Sites (Homepage)

 

  • Files and file size
  • "/modules" folder: 16 minified files (271 kb)
  • "/js" folder: 3 minified files (62 kb)
  • "/plugins" folder: 2 minified files (132 kb)
  • "/projects/survey" folder: 1 minified file (9 kb)
  • "/jmvc" folder: 6 files (264 kb)

 

Total : 28 files (738 kb)

Current mobile issues

 

  • Mobile and tablet share exact same logic (too many hacks)
  • JS and HTML are different bitween brands (different codebase, some differences in logic)
  • Too many files and too many HTTP requests
  • PDP is loaded through AJAX call on .aspx page
  • Legacy framework is loaded along the new framework which leads to a lot of hacks

Improving Mobile Sites

 

  • Single code base
  • Improve file structure
  • Decouple Mobile and Tablet through inheritance without duplicating code
  • Improve flexebility
  • Improve speed
  • Reduce HTTP requests

 

Main road block: Site have to be rebuilt from scratch

Mobile Channel Layout

 

Common Controller Example

 

$.Controller('Common.Products.List',
{
  defaults : {
    container : '.products-list',
    cid : null,
    pageModel : Common.Models.Page,
    pageEvent : 'change',
    productModel : Common.Models.Product,
    productEvent : 'render',
    view : '//common/products/list/views/list.ejs'
  }
},
{
  render : function(data) {
    ...
  }
});

Mobile Inheritance Example

 

Common.Products.List('Mobile.Products.List',
{
  defaults : {
    container : '#mobile-products-list',
    categoryModel : Common.Models.Category
  }
},
{
  '{pageModel} {pageEvent}' : function(modelClass, ev, page) {
    ...
  }
});

IOS Mobile Inheritance Example

 

Mobile.Products.List('IOSMobile.Products.List',
/** @Static */
{
  defaults : {}
},
/** @Prototype */
{});

PhoneGap / Cordova

 

Easily create apps using the web technologies you know and love: HTML, CSS, and JavaScript

PhoneGap is a free and open source framework that allows you to create mobile apps using standardized web APIs for the platforms you care about.

Support multiple platforms.

 

Maximize your productivity while minimizing production time. Target iOS, Android™ and Windows® Phone 8 all with a single codebase.