SlideShare a Scribd company logo
1 of 94
Download to read offline
mobl
Zef Hemel
50 million


 iPhones
50 million    20 million


 iPhones     iPod Touches
50 million                  20 million


 iPhones                   iPod Touches




             100 million
1.5 million

    G1
1.5 million   1.2 million

    G1          Droid
1.5 million          1.2 million

    G1                 Droid


              2013
application
development
Objective-C
Objective-C   Java
Objective-C   Java   J2ME/C++
Objective-C        Java   J2ME/C++




 HTML/Javascript
Objective-C        Java          J2ME/C++




 HTML/Javascript          Java
Objective-C


Android Java

Blackberry
Java
J2ME

HTML/JS
3.3.1
3.3.1 – Applications may only use Documented
APIs in the manner prescribed by Apple and
must not use or call any private APIs.
Applications must be originally written in
Objective-C, C, C++, or JavaScript as executed
by the iPhone OS WebKit engine, and only code
written in C, C++, and Objective-C may compile
and directly link against the Documented APIs
(e.g., Applications that link to Documented APIs
through an intermediary translation or
compatibility layer or tool are prohibited).
3.3.1 – Applications may only use Documented
APIs in the manner prescribed by Apple and
must not use or call any private APIs.
Applications must be originally written in
Objective-C, C, C++, or JavaScript as executed
by the iPhone OS WebKit engine, and only code
written in C, C++, and Objective-C may compile
and directly link against the Documented APIs
(e.g., Applications that link to Documented APIs
through an intermediary translation or
compatibility layer or tool are prohibited).
AppStore
cross-platform development


   arbitrary rejections


  language expressivity
mobl
Webkit
HTML
WebDatabases
WebDatabases

Location information
       (GPS)
WebDatabases

Location information
       (GPS)




                       Threading
WebDatabases

Location information
       (GPS)

         Canvas

                       Threading
WebDatabases

Location information
       (GPS)

         Canvas

  Multi-touch          Threading
WebDatabases

Location information
       (GPS)
                       Offline support
         Canvas

  Multi-touch            Threading
WebDatabases
                 Full-screen support
Location information
       (GPS)
                       Offline support
         Canvas

  Multi-touch            Threading
“   We believe the web has won and over the next
    several years, the browser [..] will become the
    platform that matters and certainly that’s where
    Google is investing.
                                                                ”
                            Vic Gundotra, Google VP of Engineering
syntax similar to
demo
entity   Task {
  name   : String (searchable)
  done   : Bool
  tags   : Collection<Tag> (inverse: tasks)
}


entity Tag {
  name : String (searchable)
  tasks : Collection<Task> (inverse: tags)
}
function sayHello(name : String) {
  alert("Hello there, " + name);
}
screen root() {
  basicView("Tasks") {
    group {
      list(t in Task.all()) {
        item { label(t.name) }
      }
    }
  }
}
screen prompt(question : String) : String {
  var answer = ""
  header(question)
  group {
     inputString(answer)
  }
  button("Done", onclick={
     screen return answer;
  })
}
screen root() {
  var firstName = prompt("First name?")
  var lastName = prompt("Last name?")
  header("Hello there")
  label("Hello, " + firstName + " "
        + lastName)
}
data binding
var s = ""
<span databind=s/>
button("Set s", onclick={
   s = "Hello";
})
template label(t : String) {
   <span databind=t/>
}
...
var s = ""
label(s)
button("Set s", onclick={
   s = "Hello";
})
<span databind=s/>
<input type="text" databind=s/>

        two-way binding
reactive/dataflow programming
demo
screen root() {
  var amount     = 10
  var percentage = 10
  var total      = amount *
                   (1 + percentage/100)

    header("Tip calculator")
    group {
      inputNumber(amount, label="amount")
      inputNumber(percentage, label="%")
      label(total)
    }
}
demo
implementation
HTML/Javascript
<span>64</span>
<span>64</span>




             CSS styles
      span
             events
             - onclick
      64
var myspan = $("<span>");
myspan.text("64");
anotherEl.append(myspan);
sync vs async
synchronous programming


var results = tx.executeQuery("SELECT * FROM Task");
for(var i = 0; i < results.length; i++) {
   alert(results[i].name);
}
render page




                 time
query database
 and process
    results




      ...
render page




                                  time
                 query database
browser freeze    and process
                     results




                       ...
render page

 send query




                time
     ...


process query
    result


     ...
asynchronous programming


tx.executeQuery("SELECT * FROM Task",
  function(results) {
    for(var i = 0; i < results.length; i++) {
       alert(results[i].name);
    }
  });
...
tx.executeQuery("SELECT * FROM Task",
  function(results) {
    alert("Hello, ");
  });
alert("world!");
tx.executeQuery("SELECT * FROM Task",
  function(results) {
    tx.executeQuery("INSERT ...", function() {
      alert("Selected, then inserted");
    });
  });
continuation-passing style
     transformation
function displayLocationAndReturn() : Coordinates {
  var position = mobl::location::getPosition();
  alert("Lat: " + position.latitude);
  alert("Long: " + position.longitude);
  return position;
}
function displayLocationAndReturn() : Coordinates {
  var position = mobl::location::getPosition();
  alert("Lat: " + position.latitude);
  alert("Long: " + position.longitude);
  return position;
}




function displayLocationAndReturn(callback) {
   mobl.location.getPosition(function(result) {
     var position = result;
     alert("Lat: " + position.latitude);
     alert("Long: " + position.longitude);
     callback(position);
   });
};
function displayLocationAndReturn() : Coordinates {
  var position = mobl::location::getPosition();
  alert("Lat: " + position.latitude);
  alert("Long: " + position.longitude);
  return position;
}




function displayLocationAndReturn(callback) {
   mobl.location.getPosition(function(result) {
     var position = result;
     alert("Lat: " + position.latitude);
     alert("Long: " + position.longitude);
     callback(position);
   });
};
function displayLocationAndReturn() : Coordinates {
  var position = mobl::location::getPosition();
  alert("Lat: " + position.latitude);
  alert("Long: " + position.longitude);
  return position;
}




function displayLocationAndReturn(callback) {
   mobl.location.getPosition(function(result) {
     var position = result;
     alert("Lat: " + position.latitude);
     alert("Long: " + position.longitude);
     callback(position);
   });
};
reactive programming
screen root() {
  var n = 8
  label(n * n)
  button("Inc", onclick={
     n = n + 1;
  })
}
var n = 8



var n = ref(8);
var n = 8



       var n = ref(8);

Observable
- set(value)
- get()
- addEventListener(eventType, callback)
label(n * n)




var node565 = $("<span>");
node565.text(n.get() * n.get());
n.addEventListener("change", function() {
    node565.text(n.get() * n.get());
});
root.append(node565);
button("Inc", onclick={
            n = n + 1;
         })




var nodes566 = $("<span class='button'>");
node566.text("Inc");
node566.click(function() {
  n.set(n.get() + 1);
});
root.append(node566);
screen root() {
  var n = 8
  label(n * n)
  button("Inc", onclick={
     n = n + 1;
  })
}
screen root() {
  var n = 8
  label(n * n)
  button("Inc", onclick={
     n = n + 1;
  })
}
screen root() {
  var n = 8
  label(n * n)
  button("Inc", onclick={
     n = n + 1;
  })
}
conclusion
many mobile platforms


      HTML5/JS


avoid AppStore approval
mobl

statically-typed WebDSL-like language


        generates HTML/JS


CPS transform/reactive programming
get it?

http://mobl-lang.org

http://twitter.com/zef

More Related Content

What's hot

MDSD for iPhone and Android
MDSD for iPhone and AndroidMDSD for iPhone and Android
MDSD for iPhone and Android
Heiko Behrens
 
Get started with YUI
Get started with YUIGet started with YUI
Get started with YUI
Adam Lu
 

What's hot (20)

Error Management: Future vs ZIO
Error Management: Future vs ZIOError Management: Future vs ZIO
Error Management: Future vs ZIO
 
Snickers: Open Source HTTP API for Media Encoding
Snickers: Open Source HTTP API for Media EncodingSnickers: Open Source HTTP API for Media Encoding
Snickers: Open Source HTTP API for Media Encoding
 
Reactive, component 그리고 angular2
Reactive, component 그리고  angular2Reactive, component 그리고  angular2
Reactive, component 그리고 angular2
 
beyond tellerrand: Mobile Apps with JavaScript – There's More Than Web
beyond tellerrand: Mobile Apps with JavaScript – There's More Than Webbeyond tellerrand: Mobile Apps with JavaScript – There's More Than Web
beyond tellerrand: Mobile Apps with JavaScript – There's More Than Web
 
ES6, WTF?
ES6, WTF?ES6, WTF?
ES6, WTF?
 
Sylius and Api Platform The story of integration
Sylius and Api Platform The story of integrationSylius and Api Platform The story of integration
Sylius and Api Platform The story of integration
 
MDSD for iPhone and Android
MDSD for iPhone and AndroidMDSD for iPhone and Android
MDSD for iPhone and Android
 
I phone勉強会 (2011.11.23)
I phone勉強会 (2011.11.23)I phone勉強会 (2011.11.23)
I phone勉強会 (2011.11.23)
 
Pads lab manual final
Pads lab manual finalPads lab manual final
Pads lab manual final
 
Introduction to Android Wear - Peter Friese
Introduction to Android Wear - Peter FrieseIntroduction to Android Wear - Peter Friese
Introduction to Android Wear - Peter Friese
 
CQRS and Event Sourcing in a Symfony application
CQRS and Event Sourcing in a Symfony applicationCQRS and Event Sourcing in a Symfony application
CQRS and Event Sourcing in a Symfony application
 
JavaScript and the AST
JavaScript and the ASTJavaScript and the AST
JavaScript and the AST
 
Tweaking the interactive grid
Tweaking the interactive gridTweaking the interactive grid
Tweaking the interactive grid
 
Emerging Languages: A Tour of the Horizon
Emerging Languages: A Tour of the HorizonEmerging Languages: A Tour of the Horizon
Emerging Languages: A Tour of the Horizon
 
Epic South Disasters
Epic South DisastersEpic South Disasters
Epic South Disasters
 
Get started with YUI
Get started with YUIGet started with YUI
Get started with YUI
 
Extending grimoirelab
Extending grimoirelabExtending grimoirelab
Extending grimoirelab
 
Creating sub zero dashboard plugin for apex with google
Creating sub zero dashboard plugin for apex with googleCreating sub zero dashboard plugin for apex with google
Creating sub zero dashboard plugin for apex with google
 
Un dsl pour ma base de données
Un dsl pour ma base de donnéesUn dsl pour ma base de données
Un dsl pour ma base de données
 
Decoupling with Design Patterns and Symfony2 DIC
Decoupling with Design Patterns and Symfony2 DICDecoupling with Design Patterns and Symfony2 DIC
Decoupling with Design Patterns and Symfony2 DIC
 

Viewers also liked

mobl presentation @ IHomer
mobl presentation @ IHomermobl presentation @ IHomer
mobl presentation @ IHomer
zefhemel
 
Frontrow conf
Frontrow confFrontrow conf
Frontrow conf
zefhemel
 
mobl - model-driven engineering lecture
mobl - model-driven engineering lecturemobl - model-driven engineering lecture
mobl - model-driven engineering lecture
zefhemel
 

Viewers also liked (9)

mobl presentation @ IHomer
mobl presentation @ IHomermobl presentation @ IHomer
mobl presentation @ IHomer
 
Abstractie (Dutch)
Abstractie (Dutch)Abstractie (Dutch)
Abstractie (Dutch)
 
Cloud9 IDE Talk at meet.js Poznań
Cloud9 IDE Talk at meet.js PoznańCloud9 IDE Talk at meet.js Poznań
Cloud9 IDE Talk at meet.js Poznań
 
Frontrow conf
Frontrow confFrontrow conf
Frontrow conf
 
Internal DSLs
Internal DSLsInternal DSLs
Internal DSLs
 
Avoiding JavaScript Pitfalls Through Tree Hugging
Avoiding JavaScript Pitfalls Through Tree HuggingAvoiding JavaScript Pitfalls Through Tree Hugging
Avoiding JavaScript Pitfalls Through Tree Hugging
 
WebWorkFlow
WebWorkFlowWebWorkFlow
WebWorkFlow
 
mobl - model-driven engineering lecture
mobl - model-driven engineering lecturemobl - model-driven engineering lecture
mobl - model-driven engineering lecture
 
PIL - A Platform Independent Language
PIL - A Platform Independent LanguagePIL - A Platform Independent Language
PIL - A Platform Independent Language
 

Similar to mobl

CouchDB on Android
CouchDB on AndroidCouchDB on Android
CouchDB on Android
Sven Haiges
 
mobl: Een DSL voor mobiele applicatieontwikkeling
mobl: Een DSL voor mobiele applicatieontwikkelingmobl: Een DSL voor mobiele applicatieontwikkeling
mobl: Een DSL voor mobiele applicatieontwikkeling
Devnology
 
After max+phonegap
After max+phonegapAfter max+phonegap
After max+phonegap
yangdj
 
混搭移动开发:PhoneGap+JQurey+Dreamweaver
混搭移动开发:PhoneGap+JQurey+Dreamweaver混搭移动开发:PhoneGap+JQurey+Dreamweaver
混搭移动开发:PhoneGap+JQurey+Dreamweaver
yangdj
 
Android Best Practices
Android Best PracticesAndroid Best Practices
Android Best Practices
Yekmer Simsek
 
Designing and developing mobile web applications with Mockup, Sencha Touch an...
Designing and developing mobile web applications with Mockup, Sencha Touch an...Designing and developing mobile web applications with Mockup, Sencha Touch an...
Designing and developing mobile web applications with Mockup, Sencha Touch an...
Matteo Collina
 

Similar to mobl (20)

CouchDB on Android
CouchDB on AndroidCouchDB on Android
CouchDB on Android
 
mobl: Een DSL voor mobiele applicatieontwikkeling
mobl: Een DSL voor mobiele applicatieontwikkelingmobl: Een DSL voor mobiele applicatieontwikkeling
mobl: Een DSL voor mobiele applicatieontwikkeling
 
2008 - TechDays PT: WCF, JSON and AJAX for performance and manageability
2008 - TechDays PT: WCF, JSON and AJAX for performance and manageability2008 - TechDays PT: WCF, JSON and AJAX for performance and manageability
2008 - TechDays PT: WCF, JSON and AJAX for performance and manageability
 
MOPCON 2014 - Best software architecture in app development
MOPCON 2014 - Best software architecture in app developmentMOPCON 2014 - Best software architecture in app development
MOPCON 2014 - Best software architecture in app development
 
Paris js extensions
Paris js extensionsParis js extensions
Paris js extensions
 
A More Flash Like Web?
A More Flash Like Web?A More Flash Like Web?
A More Flash Like Web?
 
Asynchronous Programming at Netflix
Asynchronous Programming at NetflixAsynchronous Programming at Netflix
Asynchronous Programming at Netflix
 
After max+phonegap
After max+phonegapAfter max+phonegap
After max+phonegap
 
混搭移动开发:PhoneGap+JQurey+Dreamweaver
混搭移动开发:PhoneGap+JQurey+Dreamweaver混搭移动开发:PhoneGap+JQurey+Dreamweaver
混搭移动开发:PhoneGap+JQurey+Dreamweaver
 
Software Language Design & Engineering
Software Language Design & EngineeringSoftware Language Design & Engineering
Software Language Design & Engineering
 
mobl
moblmobl
mobl
 
Android Best Practices
Android Best PracticesAndroid Best Practices
Android Best Practices
 
huhu
huhuhuhu
huhu
 
Backbone.js — Introduction to client-side JavaScript MVC
Backbone.js — Introduction to client-side JavaScript MVCBackbone.js — Introduction to client-side JavaScript MVC
Backbone.js — Introduction to client-side JavaScript MVC
 
Design Summit - UI Roadmap - Dan Clarizio, Martin Povolny
Design Summit - UI Roadmap - Dan Clarizio, Martin PovolnyDesign Summit - UI Roadmap - Dan Clarizio, Martin Povolny
Design Summit - UI Roadmap - Dan Clarizio, Martin Povolny
 
What's New in Android
What's New in AndroidWhat's New in Android
What's New in Android
 
Quick and Easy Development with Node.js and Couchbase Server
Quick and Easy Development with Node.js and Couchbase ServerQuick and Easy Development with Node.js and Couchbase Server
Quick and Easy Development with Node.js and Couchbase Server
 
Designing and developing mobile web applications with Mockup, Sencha Touch an...
Designing and developing mobile web applications with Mockup, Sencha Touch an...Designing and developing mobile web applications with Mockup, Sencha Touch an...
Designing and developing mobile web applications with Mockup, Sencha Touch an...
 
WordPress Realtime - WordCamp São Paulo 2015
WordPress Realtime - WordCamp São Paulo 2015WordPress Realtime - WordCamp São Paulo 2015
WordPress Realtime - WordCamp São Paulo 2015
 
Introduction To Google Android (Ft Rohan Bomle)
Introduction To Google Android (Ft Rohan Bomle)Introduction To Google Android (Ft Rohan Bomle)
Introduction To Google Android (Ft Rohan Bomle)
 

Recently uploaded

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
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
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
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
 
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...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
API Governance and Monetization - The evolution of API governance
API Governance and Monetization -  The evolution of API governanceAPI Governance and Monetization -  The evolution of API governance
API Governance and Monetization - The evolution of API governance
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software Engineering
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
 

mobl