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

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Recently uploaded (20)

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 

mobl