SlideShare a Scribd company logo
Scalable
Cross-platform
Web Apps
!
A long history of one solution
@pukhalski
!
Solution Architect @ EPAM Systems
Lecturer @ BHASD
Smashing Magazine Author
The beginning.
2011,
Joined
Worked mostly with (web) apps.
!
• Architecture
• Performance issues
• UX
• Mobile
What’s web app?
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
Multidevice
World
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
Übermegamultidevice
World!
How about RWD?
Yeah, suuuuure…
Simplest
cross-platform
web app flow
Page #1
Module #1
Module #5
Module #2 Module #3 Module #4
Desktop
Tablet
Page #1
Module #1 Module #2
Module #3*
Page #
Module
Mobile
Page #1
Module #1*
Module #2
Page #2
Module #1*
Module #3
Page #3
Module #1*
Module #4
Wait, wait. Sure?
Research.
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
Like
jQuery Mobile: Flip Toggle
<select data-role="slider">
<option value="off">Off</option>
<option value="on">On</option>
</select>
jQuery Mobile: Flip Toggle Example
<select name="flip-2" id="flip-2" data-role="slider"
tabindex="-1"
class="ui-slider-switch">
<option value="off">Off</option>
<option value="on">On</option>
</select>
!
<div role="application"
class="ui-slider ui-slider-switch
ui-slider-track ui-shadow-inset ui-bar-inherit ui-corner-all">
<span class="ui-slider-label ui-slider-label-a ui-btn-active"
role="img" style="width: 0%;">On</span>
<span class="ui-slider-label ui-slider-label-b"
role="img" style="width: 100%;">Off</span>
<div class="ui-slider-inneroffset">
<a href="#"
class="ui-slider-handle ui-slider-handle-snapping ui-btn ui-shadow"
role="slider" aria-valuemin="0" aria-valuemax="1" aria-valuenow="off"
aria-valuetext="Off" title="Off" aria-labelledby="flip-2-label"
style="left: 0%;"></a>
</div>
</div>
jQuery Mobile: Flip Toggle Output
jQuery Mobile: Good Support
Dislike
Just a library.
No architecture behind.
Performance.
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
Like
Ext.application({
name: 'MyApp',
profiles: ['Phone', 'Tablet']
});
!
Ext.define('MyApp.profile.Phone', {
extend: 'Ext.app.Profile',
!
views: ['Main'],
!
isActive: function() {
return Ext.os.is('Phone');
}
});
Sencha Touch: Device Profiles
Dislike
Mobile only
iOS, Android, BB, WP
Size matters
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
User don’t need
the whole app
from the start.
User don’t need
the whole app
at all.
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
Like
• Flexible
• Small & Simple
• Possibility to define 

any architecture style
Dislike
• No architecture defined
• No UI representation
Concept.
1. Independent customizable modules
2. Lazy loading
3. Device profiles
4. Device dependent templates
5. Easy UI elements
Device Profiles
XF.define(‘My App', function () {
!
return new XF.App({
initialize: function() { },
!
device: {
types : [
{
name : 'tablet',
range : {
max : 1024,
min : 569
},
templatePath : 'tablet/',
defaultAnimation: 'fade'
},
!
XF.define(‘MyApp’, function () {
!
return new XF.App({
!
device: {
types : [
{
name : 'ios',
range : {
max : 1024,
min : 320
},
supports : ['isIOS'],
templatePath : 'ios/',
defaultAnimation: 'slideleft'
},
!
Modules
Module
ViewCollection
Model Model Model
Module
ViewModel
XF.define('componentClassName', function () {
!
return XF.Component.extend({
Collection: XF.Collection.extend({
url: '/rest/cities'
}),
// View Class === XF.View by default
initialize: function() {
// do some stuff here
}
});
!
});
XF.define('componentClassName',
['collections/collectionClass',
'collections/viewClass'],
function (Collection, View) {
return XF.Component.extend({
Collection: Collection,
View: View,
initialize: function() {
// do some stuff here
}
});
});
Module loading
<div data-component="componentClass"
data-id=“componentID">
!
This text is visible while component is loading
!
</div>
<div data-component="componentClass"
data-id="componentID"
data-device-type="desktop">
!
This text is visible while component is loading
!
</div>
Customization
<div data-component="componentClass" data-
id=“componentID">
!
<script>
XF.setOptionsByID('componentID', {foo: 'bar'});
</script>
!
</div>
Device-dependent
templates
<div data-component="componentClass" data-id="componentID">
<script>
XF.setOptionsByID('componentID', {foo: 'bar'});
</script>
</div>
components/componentClass.js
new ComponentClass(options);
tmpl/deviceProfile/componentClass.tmpl
tmpl/mobile/componentClass.tmpl
// is visible
rest/c
<div data-component="componentClass" data-id=“componentID" />
components/componentClass.js
// is visible
new ComponentClass(options);
tmpl/
deviceProfile/
componentClass.tmpl
rest/componentClass/
// loading JS if it’s needed
// rendering
<div data-component="componentClass" data-id="componentID">
<ul class="xf-list" data-role="listview">
!
Progressive
Enhancement?
!
Progressive
Enhancement?
Look ma, we still need backend
UI Elements
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
<ul data-role="listview">
<li data-role="divider">A</li>
<li>
<h2>Header</h2>
<p>No link</p>
</li>
<li><a href="#">Simple link</a></li>
<li data-role="divider">Divider</li>
<li>
<h2>Header</h2>
<p>Header and description</p>
</li>
</ul>
Write Less
<ul data-role="listview" data-skip-enhance="true" id="xf-8293" class="xf-listview">
<li class=" xf-li xf-li-divider">A</li>
<li class="xf-li-static xf-li">
<div class="xf-li-wrap">
<h2 class="xf-li-header">Header</h2>
<p class="xf-li-desc">No link</p>
</div>
</li>
<li class=" xf-li">
<a href="#" class="xf-li-btn">
Simple link
<div class="xf-btn-text"></div>
</a>
</li>
<li class=" xf-li xf-li-divider">Divider</li>
<li class=" xf-li">
<a href="#" class="xf-li-btn">
<div class="xf-btn-text">
<h2 class="xf-li-header">Header</h2>
<p class="xf-li-desc">Header and description</p>
</div>
</a>
</li>
</ul>
…do nothing
Wrapping up.
Pages.
What if
page switching
could work together with router?
<div class="xf-page" data-id="home">…</div>
XF.define(function () {
return new XF.App({
router: {
routes: {
'/': 'home'
},
!
home: function() {
// ...
}
},
Catching
User Interactions
Touch Events
Pointer Events
Mouse Events
D-Pad Events*
Touch Events
Pointer Events
Mouse Events
D-Pad Events*
tap
swipe
Communication
mechanics.
// if component is not loaded or constructed
// events will wait until it will be
!
XF.trigger('component:componentID:eventName');
!
XF.trigger('component:componentClass:eventName');
Q of deferred
Proofing
the concept.
tablet.govoyages.com
Release.
12000 employees,
20 years of experience,
thousands of customers.
No chance for mistake.
Calm down, dude!
1. How to deal

with open-source?

2. Legal Issues

• What type of licence?
• Why this one?
• Intellectual property?
Dec, 2013
xframeworkjs.org
Sugar.
Generator
npm install generator-xf
yo xf
yo xf:application init
docs.xframeworkjs.org/
Future-proof.
XF ❤ Web Components
Yet another
framework!
Yet another
framework?
Software Engineer should be
technology and solution agnostic.
!
The blind passion for the solution
can ruin your growth
as a professional.
Learn.
Contribute.
Build.
Thanks.
!
@pukhalski

More Related Content

PPTX
Harness jQuery Templates and Data Link
PDF
jQuery in the [Aol.] Enterprise
PDF
Requirejs
PDF
Real World Web components
KEY
Requirejs
PPT
Managing JavaScript Dependencies With RequireJS
PPTX
Liking performance
PPTX
JsViews - Next Generation jQuery Templates
Harness jQuery Templates and Data Link
jQuery in the [Aol.] Enterprise
Requirejs
Real World Web components
Requirejs
Managing JavaScript Dependencies With RequireJS
Liking performance
JsViews - Next Generation jQuery Templates

What's hot (20)

PPTX
Angular - Beginner
PDF
jQuery Conference San Diego 2014 - Web Performance
PDF
Enjoy the vue.js
PPTX
JavaScript performance patterns
PDF
JavaScript Dependencies, Modules & Browserify
KEY
Rapid Testing, Rapid Development
PPTX
Bower power
PPTX
BDD in Drupal 8 Using Behat, mink and Selenium
PDF
PDF
PDF
Thinking in Components
PDF
Web Components v1
KEY
Mobile HTML, CSS, and JavaScript
PDF
Great Responsive-ability Web Design
PDF
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
PPTX
Backbone.js
PDF
Javascript ui for rest services
ODP
An Introduction to Vuejs
PDF
The Point of Vue - Intro to Vue.js
PDF
The Art of AngularJS in 2015 - Angular Summit 2015
Angular - Beginner
jQuery Conference San Diego 2014 - Web Performance
Enjoy the vue.js
JavaScript performance patterns
JavaScript Dependencies, Modules & Browserify
Rapid Testing, Rapid Development
Bower power
BDD in Drupal 8 Using Behat, mink and Selenium
Thinking in Components
Web Components v1
Mobile HTML, CSS, and JavaScript
Great Responsive-ability Web Design
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Backbone.js
Javascript ui for rest services
An Introduction to Vuejs
The Point of Vue - Intro to Vue.js
The Art of AngularJS in 2015 - Angular Summit 2015
Ad

Similar to CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения (20)

PDF
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
PDF
Create a mobile web app with Sencha Touch
PDF
Bd conf sencha touch workshop
PDF
HTML5 and the dawn of rich mobile web applications pt 1
PDF
Cross platform mobile web apps
PDF
A mobile web app for Android in 75 minutes
PDF
##dd12 sviluppo mobile XPages
PDF
Pablo Villalba -
PDF
Declarative and standards-based web application development with the Ample SDK
PDF
Building Cross Platform Mobile Web Apps
PDF
The Mobile Web - HTML5 on mobile devices
PDF
Building mobile web apps with Mobello
PPTX
Mobile App Development 101
ODP
IBM Lotus Notes Domino XPages and XPages for Mobile
PDF
Modernize Your Real-World Application with Eclipse 4 and JavaFX
PDF
Effectively using Nokia Web Tools 2.0 templates for Series 40 web apps
PPTX
Branding & Design Opportunities/Challenges with SharePoint 2013
PPTX
SharePoint 2013 APIs
PDF
Mobile App Development
PDF
A Snapshot of the Mobile HTML5 Revolution
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
Create a mobile web app with Sencha Touch
Bd conf sencha touch workshop
HTML5 and the dawn of rich mobile web applications pt 1
Cross platform mobile web apps
A mobile web app for Android in 75 minutes
##dd12 sviluppo mobile XPages
Pablo Villalba -
Declarative and standards-based web application development with the Ample SDK
Building Cross Platform Mobile Web Apps
The Mobile Web - HTML5 on mobile devices
Building mobile web apps with Mobello
Mobile App Development 101
IBM Lotus Notes Domino XPages and XPages for Mobile
Modernize Your Real-World Application with Eclipse 4 and JavaFX
Effectively using Nokia Web Tools 2.0 templates for Series 40 web apps
Branding & Design Opportunities/Challenges with SharePoint 2013
SharePoint 2013 APIs
Mobile App Development
A Snapshot of the Mobile HTML5 Revolution
Ad

More from CodeFest (20)

PDF
Alexander Graebe
PDF
Никита Прокопов
PPTX
Денис Баталов
PDF
Елена Гальцина
PDF
Александр Калашников
PDF
Ирина Иванова
PDF
Marko Berković
PDF
Денис Кортунов
PDF
Александр Зимин
PDF
Сергей Крапивенский
PDF
Сергей Игнатов
PDF
Николай Крапивный
PDF
Alexander Graebe
PDF
Вадим Смирнов
PDF
Константин Осипов
PDF
Raffaele Rialdi
PDF
Максим Пугачев
PDF
Rene Groeschke
PDF
Иван Бондаренко
PDF
Mete Atamel
Alexander Graebe
Никита Прокопов
Денис Баталов
Елена Гальцина
Александр Калашников
Ирина Иванова
Marko Berković
Денис Кортунов
Александр Зимин
Сергей Крапивенский
Сергей Игнатов
Николай Крапивный
Alexander Graebe
Вадим Смирнов
Константин Осипов
Raffaele Rialdi
Максим Пугачев
Rene Groeschke
Иван Бондаренко
Mete Atamel

Recently uploaded (20)

PDF
SASE Traffic Flow - ZTNA Connector-1.pdf
PDF
simpleintnettestmetiaerl for the simple testint
PPTX
newyork.pptxirantrafgshenepalchinachinane
PPTX
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
PPT
250152213-Excitation-SystemWERRT (1).ppt
PPT
Ethics in Information System - Management Information System
PPTX
Introduction to cybersecurity and digital nettiquette
PDF
si manuel quezon at mga nagawa sa bansang pilipinas
PPTX
artificial intelligence overview of it and more
PPTX
IPCNA VIRTUAL CLASSES INTERMEDIATE 6 PROJECT.pptx
PDF
FINAL CALL-6th International Conference on Networks & IOT (NeTIOT 2025)
PPT
Design_with_Watersergyerge45hrbgre4top (1).ppt
PDF
The Evolution of Traditional to New Media .pdf
PPTX
artificialintelligenceai1-copy-210604123353.pptx
PDF
SlidesGDGoCxRAIS about Google Dialogflow and NotebookLM.pdf
PPTX
Internet Safety for Seniors presentation
PPTX
Power Point - Lesson 3_2.pptx grad school presentation
PDF
Exploring VPS Hosting Trends for SMBs in 2025
PPT
415456121-Jiwratrwecdtwfdsfwgdwedvwe dbwsdjsadca-EVN.ppt
PDF
The New Creative Director: How AI Tools for Social Media Content Creation Are...
SASE Traffic Flow - ZTNA Connector-1.pdf
simpleintnettestmetiaerl for the simple testint
newyork.pptxirantrafgshenepalchinachinane
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
250152213-Excitation-SystemWERRT (1).ppt
Ethics in Information System - Management Information System
Introduction to cybersecurity and digital nettiquette
si manuel quezon at mga nagawa sa bansang pilipinas
artificial intelligence overview of it and more
IPCNA VIRTUAL CLASSES INTERMEDIATE 6 PROJECT.pptx
FINAL CALL-6th International Conference on Networks & IOT (NeTIOT 2025)
Design_with_Watersergyerge45hrbgre4top (1).ppt
The Evolution of Traditional to New Media .pdf
artificialintelligenceai1-copy-210604123353.pptx
SlidesGDGoCxRAIS about Google Dialogflow and NotebookLM.pdf
Internet Safety for Seniors presentation
Power Point - Lesson 3_2.pptx grad school presentation
Exploring VPS Hosting Trends for SMBs in 2025
415456121-Jiwratrwecdtwfdsfwgdwedvwe dbwsdjsadca-EVN.ppt
The New Creative Director: How AI Tools for Social Media Content Creation Are...

CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения