SlideShare a Scribd company logo
Best Practices
in mobile cross platform development
@wolframkriesing
@uxebu
Donnerstag, 11. November 2010
We open the mobile web.
Donnerstag, 11. November 2010
http://www.flickr.com/photos/andresrueda/2276197032/
Donnerstag, 11. November 2010
Donnerstag, 11. November 2010
Donnerstag, 11. November 2010
Donnerstag, 11. November 2010
JavaScript
Donnerstag, 11. November 2010
ONLY
Donnerstag, 11. November 2010
Use Namespaces!
•globals suck
•objects as namespace
•easy mapping
•directory structure comes by itself
Donnerstag, 11. November 2010
Use Namespaces!
shop.page.cart.getItems() javascript
http://shop.de/api/cart/items/ URL
(r'^cart/items/$', views.cart.get_items), mapper
def get_items(request):
item_ids = request.POST.list("ids")
code
Donnerstag, 11. November 2010
Patterns
•solve your problem
•solve it again
•copy+paste•
•you got a pattern
•abstract it
•reuse the pattern
AJAX
Donnerstag, 11. November 2010
Let's code together!
Donnerstag, 11. November 2010
for (var i=0; i<s.length; i++)
if (i%2) node.innerHTML = „is even“
else node.innerHTML = „is odd“;
for (var i=0, len=s.length; i<len; i++){
if (i%2){
node.innerHTML = „is even“;
} else {
node.innerHTML = „is odd“;
}
}
for (var i=0; i<s.length; i++)
if (i%2==0)
node.innerHTML = „is even“;
else
node.innerHTML = „is odd“;
for (var i=0; i<s.length; i++)
node.innerHTML = i%2 ? „is even“ : „is odd“;
Donnerstag, 11. November 2010
Coding Style, etc.
•less to think
•all code looks the same
•do code, don‘t style
•stay focused
Donnerstag, 11. November 2010
But!
Donnerstag, 11. November 2010
d.declare(obj, null, {
func1:function(){}
});
var obj = {};
obj.func1 = function(){}
var obj = new Object();
Object.prototype.func1 = function(){}
var obj = new function(){
arguments.callee.prototype.func1 = function(){}
}
Donnerstag, 11. November 2010
Code Folding
Donnerstag, 11. November 2010
Template
Donnerstag, 11. November 2010
Templates
•faster
•no typos
•for the whole team
•docs built in
•copy with pride
Donnerstag, 11. November 2010
Comment out
Donnerstag, 11. November 2010
Comment out
Donnerstag, 11. November 2010
JSLint
•finds IE traps (trailing comma)
•gives JS insight (parseInt, ===, ...)
•understand type coercion
•finds missing var statements
•undefined vars, typos (myVar vs. myvar)
http://jslint.com
http://wolfram.kriesing.de/blog/index.php/2007/understanding-jslint-output
http://www.danhulton.com/blog/2008/01/16/integrate-js-lint-into-komodo-edit/
Donnerstag, 11. November 2010
Try it first (1)
d.query("h2")
.style({color:"red"})
.anim({left:300}, 500)
Are you sure this works?
d.query("h2")
.style({position:"absolute", color:"red"})
.anim({left:300}, 500)
NO
save one reload!
Donnerstag, 11. November 2010
Try it first (2)
•try the code in FireBug first
•learn more about your library
•play with the code
•find better ways?
Donnerstag, 11. November 2010
alert, console.log
•alert hell? use confirm!
•numbered console.log
Donnerstag, 11. November 2010
*.toString()
Donnerstag, 11. November 2010
debugger;
Donnerstag, 11. November 2010
Best Practices
• test on the desktop
• test on the desktop
• test on the desktop
• try-catch a lot
• alert() IS your friend!
• simplify your CSS
Donnerstag, 11. November 2010
EventNinja
Donnerstag, 11. November 2010
Permissions
Donnerstag, 11. November 2010
Extend
Donnerstag, 11. November 2010
First Version
Donnerstag, 11. November 2010
Backend
Donnerstag, 11. November 2010
Object Browser
Donnerstag, 11. November 2010
Donnerstag, 11. November 2010
Donnerstag, 11. November 2010
Donnerstag, 11. November 2010
Open Source
•a developer must have
•developer.vodafone.com
http://developer.vodafone.com/object-browser
•github
http://github.com/wolframkriesing/object-browser
Donnerstag, 11. November 2010
Other sources
•google your problem
•talk to a colleague
•sleep over it
Donnerstag, 11. November 2010
Wolfram Kriesing
http://apparat.io
http://embedjs.org
Thank you
Donnerstag, 11. November 2010

More Related Content

PDF
Ruby Kansai49
PDF
An Introduction to
PDF
Pocket Knife JS
PDF
iBizLog - ESUG2010
PPTX
Introduction to python
KEY
Palm Developer Day PhoneGap
PPTX
Vlad Zelinschi - Embrace Native JavaScript (the anti-plugins talk) - Codecamp...
PDF
Javascript - How to avoid the bad parts
Ruby Kansai49
An Introduction to
Pocket Knife JS
iBizLog - ESUG2010
Introduction to python
Palm Developer Day PhoneGap
Vlad Zelinschi - Embrace Native JavaScript (the anti-plugins talk) - Codecamp...
Javascript - How to avoid the bad parts

What's hot (6)

PDF
QueryPath: It's like PHP jQuery in Drupal!
PDF
"How Mozilla Uses Selenium"
PDF
The no-framework Scala Dependency Injection Framework
PDF
Odnoklassniki.ru Architecture
KEY
QueryPath, Mash-ups, and Web Services
PDF
The ideal module system and the harsh reality
QueryPath: It's like PHP jQuery in Drupal!
"How Mozilla Uses Selenium"
The no-framework Scala Dependency Injection Framework
Odnoklassniki.ru Architecture
QueryPath, Mash-ups, and Web Services
The ideal module system and the harsh reality
Ad

Viewers also liked (8)

PPT
Cio Summit 2008
PDF
Self service in health care
PPT
Conheça a Desenvolva
PPT
Health-e-cITi NJ
PDF
HFMA Moffitt_Telehealth
PPSX
Frank Mayer & Associates
PPT
Health Care Information Exchange Strategy & Roadmap
PDF
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
Cio Summit 2008
Self service in health care
Conheça a Desenvolva
Health-e-cITi NJ
HFMA Moffitt_Telehealth
Frank Mayer & Associates
Health Care Information Exchange Strategy & Roadmap
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
Ad

Similar to Best Practices - Mobile Developer Summit (20)

PDF
Week 05 Web, App and Javascript_Brandon, S.H. Wu
PDF
Mobile Apps Cross Platform - Droidcon 2009
PDF
Mobile Apps Cross Platform - Webmontag Frankfurt 2009
PDF
Mobile Apps Cross Platform - Overtheair London, 2009
KEY
Front end engineering, YUI Gallery, and your future
PDF
Building Cross Platform Mobile Web Apps
PPTX
Seattle bestpractices2010
PDF
Building native mobile apps using web technologies
PDF
A Snapshot of the Mobile HTML5 Revolution
PDF
Mobile Apps Cross Platform Mobile Monday Düsseldorf 2009
KEY
PDF
Preparing your web services for Android and your Android app for web services...
PDF
Cross platform mobile web apps
PDF
Attractive HTML5~開発者の視点から~
PPTX
Old code doesn't stink
PDF
Play framework: lessons learned
PDF
Efficient JavaScript Development
PDF
Modern Web Development
PDF
Vodafone 360 - Live Porting
KEY
Html5 For Jjugccc2009fall
Week 05 Web, App and Javascript_Brandon, S.H. Wu
Mobile Apps Cross Platform - Droidcon 2009
Mobile Apps Cross Platform - Webmontag Frankfurt 2009
Mobile Apps Cross Platform - Overtheair London, 2009
Front end engineering, YUI Gallery, and your future
Building Cross Platform Mobile Web Apps
Seattle bestpractices2010
Building native mobile apps using web technologies
A Snapshot of the Mobile HTML5 Revolution
Mobile Apps Cross Platform Mobile Monday Düsseldorf 2009
Preparing your web services for Android and your Android app for web services...
Cross platform mobile web apps
Attractive HTML5~開発者の視点から~
Old code doesn't stink
Play framework: lessons learned
Efficient JavaScript Development
Modern Web Development
Vodafone 360 - Live Porting
Html5 For Jjugccc2009fall

More from wolframkriesing (20)

PDF
JavaScript The Language Meetup - Async functions
PDF
Our react-native experiences at crewmeister
PDF
ES6 katas - talk given at enterjs
PDF
TDD for Kids - VLCjs (Valencia Spain, July 2015)
PDF
ES6Katas.org - an introduction and the story behind
PDF
TDD with Google Spreadsheets #enterjs 2015
PDF
Baby steps
PDF
TDD with Google Spreadsheets
PDF
ECMAScript 6 for real
PDF
Refactoring out of the mess
PDF
Day2 - Refactoring (Lecture SS 2015)
PDF
Day1 - TDD (Lecture SS 2015)
PDF
react.js - DOM as it was meant
PDF
Pixelplant - WebDev Meetup Salzburg
PDF
Better Code through TDD
PDF
April JavaScript Tools
PDF
Presentation Mobile Monday Munich, March 2012
PDF
Webtestsuite black berrydevcon
PDF
PDF
JavaScript Tools (PHPConference 2011, Berlin)
JavaScript The Language Meetup - Async functions
Our react-native experiences at crewmeister
ES6 katas - talk given at enterjs
TDD for Kids - VLCjs (Valencia Spain, July 2015)
ES6Katas.org - an introduction and the story behind
TDD with Google Spreadsheets #enterjs 2015
Baby steps
TDD with Google Spreadsheets
ECMAScript 6 for real
Refactoring out of the mess
Day2 - Refactoring (Lecture SS 2015)
Day1 - TDD (Lecture SS 2015)
react.js - DOM as it was meant
Pixelplant - WebDev Meetup Salzburg
Better Code through TDD
April JavaScript Tools
Presentation Mobile Monday Munich, March 2012
Webtestsuite black berrydevcon
JavaScript Tools (PHPConference 2011, Berlin)

Recently uploaded (20)

PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
Cloud computing and distributed systems.
PPTX
Big Data Technologies - Introduction.pptx
PDF
Electronic commerce courselecture one. Pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Approach and Philosophy of On baking technology
PPT
Teaching material agriculture food technology
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Empathic Computing: Creating Shared Understanding
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Spectral efficient network and resource selection model in 5G networks
Understanding_Digital_Forensics_Presentation.pptx
Cloud computing and distributed systems.
Big Data Technologies - Introduction.pptx
Electronic commerce courselecture one. Pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Unlocking AI with Model Context Protocol (MCP)
Approach and Philosophy of On baking technology
Teaching material agriculture food technology
The Rise and Fall of 3GPP – Time for a Sabbatical?
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Empathic Computing: Creating Shared Understanding
Building Integrated photovoltaic BIPV_UPV.pdf

Best Practices - Mobile Developer Summit