SlideShare ist ein Scribd-Unternehmen logo
1 von 67
Downloaden Sie, um offline zu lesen
Linguistic Abstraction for the Web


             Eelco Visser
            http://eelcovisser.org




                                     Mountain View
                                     June 8, 2011
Messages




Linguistic abstraction as software engineering tool



         Web languages can be improved
Software Engineering




Problem
                                                         Machine
Domain




   bridging the gap between problem domain and solution domain
High-Level Languages




Problem
                                                 HLL                     Machine
Domain




          "A programming language is low level when its programs
           require attention to the irrelevant." Alan J. Perlis (1982)


                          HLLs reduce gap
Domain-Specific Languages




Problem
                   DSL                 HLL               Machine
Domain




      domain-specific languages support more specialization
Software Language Design & Engineering




enable software engineers to
effectively design, implement,
 and apply domain-specific
     software languages
Research: Software Language Engineering



 Automatically derive efficient,
scalable, incremental compiler +
   usable IDE from high-level,
   declarativelanguage
           definition
The Spoofax Language Workbench




creating full featured IDEs for domain-specific languages
Research: Software Language Design


 Systematically design domain-
      specific software
  languages with optimal
   tradeoff between expressivity,
completeness, portability, coverage, and
           maintainability
Software Language Design Case Studies

                                               Mobl: client-side stateful web applications




WebDSL: server-side restful web applications
http://webdsl.org

Eelco Visser, Danny Groenewegen, et al.
Web Programming




browser        server       database




              web app
Web Programming




browser                    server                      database




HTML,
                            Java                         SQL
JS, CSS


          code runs on server, browser, and database
Concerns in Web Programming

❖ Persistent data
  ★ data integrity
  ★ search

❖ User interface
  ★ data validation
  ★ styling, layout
  ★ navigation
  ★ actions

❖ Access control
Separation of Concerns in Web Programming

Example
❖ Data modeling
  ★ Java classes with JPA annotations

❖ User interface
  ★ Java ServerFaces XML templates
  ★ Seam Java classes

❖ Access control
  ★ Acegi configuration/annotation
Problems in Web Programming




❖ Lack of integration
  ★ no cross language/concern consistency checking
  ★ leads to late (detection of) failures

❖ Low-level encoding
  ★ leads to boilerplate code
When Seam Fails




Welcome #{user.name}     Welcome #{user.nam}
When Rails Fails

@post = Post.new(params[:get])

                         @post = Post.new(params[:post])
Late Failures in Web Applications




               Zef Hemel, Danny M. Groenewegen, Lennart C. L. Kats, Eelco Visser.
             Static consistency checking of web applications with WebDSL. Journal of
                            Symbolic Computation, 46(2):150-182, 2011.
Separation of Concerns
+ Linguistic Integration
WebDSL Example
Model-View Pattern
Model
Model


entity Blog {
  key   :: String (id)
  title :: String (name)
  posts -> Set<Post> (inverse=Post.blog)
}
entity Post {
  key      :: String (id)
  title    :: String (name, searchable)
  content :: WikiText (searchable)
  blog     -> Blog
  created :: DateTime (default=now())
  modified :: DateTime (default=now())
}
Automatic Persistence



Data           Entity              DB
Model          Classes           Schema




WebDSL           Java              DB
Object          Object           Records
Logic

entity Blog {
  key   :: String (id)
  title :: String (name)
  posts -> Set<Post> (inverse=Post.blog)

    function recentPosts(index: Int, n: Int): List<Post> {
      var i := max(1,index) - 1;
      return [p | p: Post in posts
                    order by p.created desc limit n offset i*n].list();
    }
    function newPost(): Post {
      var p := Post{ title := "No Title" blog := this };
      p.key := p.id.toString();
      return p;
    }
}
View
Page Definition
define page blog(b: Blog, index: Int) {
  main(b){
    for(p: Post in b.recentPosts(index,5)) { showPost(p) }
  }
}
define showPost(p: Post) { ... }
define page post(p: Post) { ... }
Template Definition
define page blog(b: Blog, index: Int) { ... }
define showPost(p: Post) {
  section{
    header{ navigate post(p) { output(p.title) } }
    par{ output(p.content) }
    par{ output(p.created.format("MMMM d, yyyy")) }
  }
}
define page post(p: Post) { ... }




                    Navigate = Deferred Page Call
Page Definition
define page blog(b: Blog, index: Int) { ... }
define showPost(p: Post) { ... }
define page post(p: Post) {
  main(p.blog){
    showPost(p)
    navigate editpost(p) { "[Edit]" }
  }
}
Forms & Data Binding
define page post(p: Post) { ... }
define page editpost(p: Post) {
  action save() {
    return post(p); }
  main(p.blog){
    form{
      formEntry("Title"){
        input(p.title) }
      formEntry("Content") {
        input(p.content) }
      formEntry("Posted") {
        input(p.created) }
      submit save() { "Save" }
    }
  }
}




                     (Look Ma, No Controller!)
Type-Directed Input
define page post(p: Post) { ... }
define page editpost(p: Post) {
  action save() {
    return post(p); }
  main(p.blog){
    form{
      formEntry("Title"){
        input(p.title) }
      formEntry("Content") {
        input(p.content) }
      formEntry("Posted") {
        input(p.created) }
      submit save() { "Save" }
    }
  }
}
View Composition
define sidebar(b: Blog) {
  list{
    listitem{ navigate blog(b,1) { "Home" } }
    listitem{
      submitlink action{ return editpost(b.newPost()); } {
        "[New Post]" } }
  }
  section{
    header{"Recent Posts"}
    output(b.recentPosts(1,10))
  }
}
Native Interface
define main(b: Blog) {
  includeCSS("style.css")
  <div id="outercontainer">
    <div id="container">
      <div id="sidebar">sidebar(b)</div>
      <div id="contents">elements</div>
      <div class="clear"> </div>
    </div>
    <div class="clear"> </div>
  </div>
}
Integrated Development Environment




     short demo: consistency checking
WebDSL Languages

     Data Model
          Logic
      Templates
     (UI, Email, Service)

   Access Control
   Data Validation
         Search
Collaborative Filtering
http://www.mobl-lang.org

Zef Hemel
Divergence in Mobile Platforms




 Objective-C            Java                  J2ME/C++




HTML/Javascript         Java                    .NET

           Native Applications not Portable
Convergence in Mobile Platform




Webkit browser   Webkit browser




Webkit browser   Webkit browser
The Universal Userinterface Engine
Mobile Web Architecture
Rich Applications

                                      Audio
    WebDatabases
                              Full-screen support

Location information (GPS)
                                 Offline support
         Canvas

                             Accelerator support
       Multi-touch
Native Applications


            Address book
                Camera
               Compass
                 File IO
             Notifications
Software Engineering with JavaScript




annotated HTML                imperative Javascript

 MVC, No Integration, No Abstraction, Accidental Complexity
typed        declarative




integrated      concise
Web Application with Touch
Portable Applications
Mobl Architecture
tipcalculator.mobl


application tipcalculator

import mobl::ui::generic

screen root() {
  var amount = 20
  var percentage = 10
  header("Tip calculator")
  group {
    item { numField(amount, label="amount") }
    item { numField(percentage, label="percentage") }
    item { "$" label(Math.round(amount * (1 + percentage/100))) }
  }
  nl()
}
Task Manager
Data Model

entity Task {
  name : String (searchable)
  done : Bool
  due : DateTime
  category : Category (inverse: tasks)
  tags : Collection<Tag> (inverse: tasks)
}
entity Category {
  name : String
  tasks : Collection<Task> (inverse: category)
}
entity Tag {
  name : String
  tasks : Collection<Task> (inverse: tags)
}




           HTML5 Data Persistence
Logic
entity Task {
  name : String (searchable)
  done : Bool
  due : DateTime
  category : Category (inverse: tasks)
  tags : Collection<Tag> (inverse: tasks)
  function postpone(days : Num) {
    this.due = DateTime.create(
      this.due.getFullYear(),
      this.due.getMonth(),
      this.due.getDate() + days);
  }
  function import(user : String, pw : String) {
    var tasksJSON = httpRequest("/export?user="+ user + "&pw=" + pw);
    foreach(t in tasksJSON) {
      add(Task.fromSelectJSON(t));
    }
  }
}




                 statically typed: catch errors early
Reactive User Interfaces

screen root() {
  var phrase = ""
  header("Tasks") {
    button("Add", onclick={ addTask(); })
  }
  searchBox(phrase)
  group {
    list(t in Task.search(phrase) limit 20){
      item {
        checkBox(t.done, label=t.name)
      }
    }
  }
}
Reactive User Interfaces

screen root() {
  var phrase = ""
  header("Tasks") {
    button("Add", onclick={ addTask(); })
  }
  searchBox(phrase)
  group {
    list(t in Task.search(phrase) limit 20){
      item {
        checkBox(t.done, label=t.name)
      }
    }
  }
}
Navigation

screen root() {
  var phrase = ""
  header("Tasks") {
    button("Add", onclick={ addTask(); })
  }
  searchBox(phrase)
  group {
    list(t in Task.search(phrase) limit 20){
      item {
        checkBox(t.done, label=t.name)
      }
    }
  }
}
Navigation

screen root() { {
         addTask()
  var phrase = ""
       t = Task()
  header("Add") {
  header("Tasks") {
    button("Done", onclick={
    button("Add", onclick={ addTask(); })
  }    add(t);
  searchBox(phrase)
       screen return;
  group {
    })
  } list(t in Task.search(phrase) limit 20){
  textField(t.name)
       item {
  datePicker(t.due)
          checkBox(t.done, label=t.name)
}      }
    }
  }
}
Navigation

screen root() {
  var phrase = ""
  header("Tasks") {
    button("Add", onclick={ addTask(); })
  }
  searchBox(phrase)
  group {
    list(t in Task.search(phrase) limit 20){
      item {
        checkBox(t.done, label=t.name)
      }
    }
  }
}
Continuations

screen root() {
  button("Ask", onclick={
     alert("Hello " + prompt("First name") + " "
                     + prompt("Last name"));
  })
}
screen prompt(question : String) : String {
  var answer = ""
  header(question) {
     button("Done", onclick={
        screen return answer;
     })
  }
  textField(answer)
}
User Interface Idiom: Tab



control tab1() {
  header("Tab 1")
  label("This is tab 1")
}
control tab2() {
  header("Tab 2")
  label("This is tab 2")
}
screen root() {
  tabSet([("One", tab1), ("Two", tab2)],
  defaultTab="One")
}
Tab Set: Higher-Order Control


control tabSet(tabs : [(String,Control)], activeTab : String) {
  list((tabName, tabControl) in tabs) {
    block(onclick={ activeTab = tabName; },
          style=activeTab==tabName ?
                activeTabButton : inactiveTabButton) {
      label(tabName)
    }
  }
  list((tabName, tabControl) in tabs) {
    block(activeTab==tabName ? visibleTab : invisibleTab) {
      tabControl()
    }
  }
}




  increase coverage: developers can create abstractions
User Interface Idiom: Master Detail



control taskItem(t : Task) {
  checkBox(t.done, label=t.name)
}
control taskDetail(t : Task) {
  textField(t.name)
  datePicker(t.due)
}
screen root() {
  header("Tasks")
  masterDetail(Task.all() order by due desc,
  taskItem, taskDetail)
}
User Interface Idiom: Master Detail



control taskItem(t : Task) {
  checkBox(t.done, label=t.name)
}
control taskDetail(t : Task) {
  textField(t.name)
  datePicker(t.due)
}
screen root() {
  header("Tasks")
  masterDetail(Task.all() order by due desc,
  taskItem, taskDetail)
}
Master Detail: Higher-Order Control


control masterDetail(items : Collection<?>, masterItem : Control1<?>,
detail : Control1<?>) {
  group {
    list(it in items) {
      item(onclick={ detailScreen(it,detail); }) {
        masterItem(it)
      }
    }
  }
}
screen detailScreen(it : ?, detail : Control1<?>) {
  header("Detail") { backButton() }
  detail(it)
}
Adaptive Layout
Mobl IDE




static cross-concern consistency checking
Discussion




WebDSL vs Mobl
 crucial difference: navigation models



       why do we need both?
Linguistic Abstraction for the Web

           Linguistic abstraction:
       capture software knowledge in
         domain-specific languages                    http://spoofax.org

separation of concerns + linguistic integration    http://mobl-lang.org

     cross concern consistency checking               http://webdsl.org
           early detection failures                http://researchr.org
    Language workbench: DSL design and            http://eelcovisser.org
    implementation with less effort than
       traditional language engineering


 http://researchr.org/search/publication/mobl+spoofax+webdsl

Weitere ähnliche Inhalte

Was ist angesagt?

IBM Connect 2014 - AD205: Creating State-of-the-Art Web Applications with Dom...
IBM Connect 2014 - AD205: Creating State-of-the-Art Web Applications with Dom...IBM Connect 2014 - AD205: Creating State-of-the-Art Web Applications with Dom...
IBM Connect 2014 - AD205: Creating State-of-the-Art Web Applications with Dom...Dave Delay
 
SPTechCon - Share point and jquery essentials
SPTechCon - Share point and jquery essentialsSPTechCon - Share point and jquery essentials
SPTechCon - Share point and jquery essentialsMark Rackley
 
2/15/2012 - Wrapping Your Head Around the SharePoint Beast
2/15/2012 - Wrapping Your Head Around the SharePoint Beast2/15/2012 - Wrapping Your Head Around the SharePoint Beast
2/15/2012 - Wrapping Your Head Around the SharePoint BeastMark Rackley
 
Building Cross Platform Mobile Web Apps
Building Cross Platform Mobile Web AppsBuilding Cross Platform Mobile Web Apps
Building Cross Platform Mobile Web AppsJames Pearce
 
A Snapshot of the Mobile HTML5 Revolution
A Snapshot of the Mobile HTML5 RevolutionA Snapshot of the Mobile HTML5 Revolution
A Snapshot of the Mobile HTML5 RevolutionJames Pearce
 
HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2James Pearce
 
Advanced Site Studio Class, June 18, 2012
Advanced Site Studio Class, June 18, 2012Advanced Site Studio Class, June 18, 2012
Advanced Site Studio Class, June 18, 2012Lee Klement
 
ePUB 3 and Publishing e-books
ePUB 3 and Publishing e-booksePUB 3 and Publishing e-books
ePUB 3 and Publishing e-booksKerem Karatal
 
Ruby on Rails: Building Web Applications Is Fun Again!
Ruby on Rails: Building Web Applications Is Fun Again!Ruby on Rails: Building Web Applications Is Fun Again!
Ruby on Rails: Building Web Applications Is Fun Again!judofyr
 
Domain Driven Design using Laravel
Domain Driven Design using LaravelDomain Driven Design using Laravel
Domain Driven Design using Laravelwajrcs
 
Jetpack Compose - Hands-on February 2020
Jetpack Compose - Hands-on February 2020Jetpack Compose - Hands-on February 2020
Jetpack Compose - Hands-on February 2020Pedro Veloso
 
SharePoint Saturday St. Louis - SharePoint & jQuery
SharePoint Saturday St. Louis - SharePoint & jQuerySharePoint Saturday St. Louis - SharePoint & jQuery
SharePoint Saturday St. Louis - SharePoint & jQueryMark Rackley
 
Native Phone Development 101
Native Phone Development 101Native Phone Development 101
Native Phone Development 101Sasmito Adibowo
 
Entity Framework: Code First and Magic Unicorns
Entity Framework: Code First and Magic UnicornsEntity Framework: Code First and Magic Unicorns
Entity Framework: Code First and Magic UnicornsRichie Rump
 
HTML5: An Introduction To Next Generation Web Development
HTML5: An Introduction To Next Generation Web DevelopmentHTML5: An Introduction To Next Generation Web Development
HTML5: An Introduction To Next Generation Web DevelopmentTilak Joshi
 
Easy javascript
Easy javascriptEasy javascript
Easy javascriptBui Kiet
 
Entity Framework v1 and v2
Entity Framework v1 and v2Entity Framework v1 and v2
Entity Framework v1 and v2Eric Nelson
 

Was ist angesagt? (20)

IBM Connect 2014 - AD205: Creating State-of-the-Art Web Applications with Dom...
IBM Connect 2014 - AD205: Creating State-of-the-Art Web Applications with Dom...IBM Connect 2014 - AD205: Creating State-of-the-Art Web Applications with Dom...
IBM Connect 2014 - AD205: Creating State-of-the-Art Web Applications with Dom...
 
Appengine Nljug
Appengine NljugAppengine Nljug
Appengine Nljug
 
SPTechCon - Share point and jquery essentials
SPTechCon - Share point and jquery essentialsSPTechCon - Share point and jquery essentials
SPTechCon - Share point and jquery essentials
 
2/15/2012 - Wrapping Your Head Around the SharePoint Beast
2/15/2012 - Wrapping Your Head Around the SharePoint Beast2/15/2012 - Wrapping Your Head Around the SharePoint Beast
2/15/2012 - Wrapping Your Head Around the SharePoint Beast
 
Building Cross Platform Mobile Web Apps
Building Cross Platform Mobile Web AppsBuilding Cross Platform Mobile Web Apps
Building Cross Platform Mobile Web Apps
 
Spug pt linqtosharepoint
Spug pt linqtosharepointSpug pt linqtosharepoint
Spug pt linqtosharepoint
 
A Snapshot of the Mobile HTML5 Revolution
A Snapshot of the Mobile HTML5 RevolutionA Snapshot of the Mobile HTML5 Revolution
A Snapshot of the Mobile HTML5 Revolution
 
HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2
 
Advanced Site Studio Class, June 18, 2012
Advanced Site Studio Class, June 18, 2012Advanced Site Studio Class, June 18, 2012
Advanced Site Studio Class, June 18, 2012
 
ePUB 3 and Publishing e-books
ePUB 3 and Publishing e-booksePUB 3 and Publishing e-books
ePUB 3 and Publishing e-books
 
Ruby on Rails: Building Web Applications Is Fun Again!
Ruby on Rails: Building Web Applications Is Fun Again!Ruby on Rails: Building Web Applications Is Fun Again!
Ruby on Rails: Building Web Applications Is Fun Again!
 
Domain Driven Design using Laravel
Domain Driven Design using LaravelDomain Driven Design using Laravel
Domain Driven Design using Laravel
 
Jetpack Compose - Hands-on February 2020
Jetpack Compose - Hands-on February 2020Jetpack Compose - Hands-on February 2020
Jetpack Compose - Hands-on February 2020
 
SharePoint Saturday St. Louis - SharePoint & jQuery
SharePoint Saturday St. Louis - SharePoint & jQuerySharePoint Saturday St. Louis - SharePoint & jQuery
SharePoint Saturday St. Louis - SharePoint & jQuery
 
Native Phone Development 101
Native Phone Development 101Native Phone Development 101
Native Phone Development 101
 
Entity Framework: Code First and Magic Unicorns
Entity Framework: Code First and Magic UnicornsEntity Framework: Code First and Magic Unicorns
Entity Framework: Code First and Magic Unicorns
 
JavaScript
JavaScriptJavaScript
JavaScript
 
HTML5: An Introduction To Next Generation Web Development
HTML5: An Introduction To Next Generation Web DevelopmentHTML5: An Introduction To Next Generation Web Development
HTML5: An Introduction To Next Generation Web Development
 
Easy javascript
Easy javascriptEasy javascript
Easy javascript
 
Entity Framework v1 and v2
Entity Framework v1 and v2Entity Framework v1 and v2
Entity Framework v1 and v2
 

Ähnlich wie Linguistic Abstraction for the Web

Software Language Design & Engineering: Mobl & Spoofax
Software Language Design & Engineering: Mobl & SpoofaxSoftware Language Design & Engineering: Mobl & Spoofax
Software Language Design & Engineering: Mobl & SpoofaxEelco Visser
 
Software Language Design & Engineering
Software Language Design & EngineeringSoftware Language Design & Engineering
Software Language Design & EngineeringEelco Visser
 
Building DSLs with the Spoofax Language Workbench
Building DSLs with the Spoofax Language WorkbenchBuilding DSLs with the Spoofax Language Workbench
Building DSLs with the Spoofax Language WorkbenchEelco Visser
 
Visual Studio.NET
Visual Studio.NETVisual Studio.NET
Visual Studio.NETsalonityagi
 
TI1220 Lecture 14: Domain-Specific Languages
TI1220 Lecture 14: Domain-Specific LanguagesTI1220 Lecture 14: Domain-Specific Languages
TI1220 Lecture 14: Domain-Specific LanguagesEelco Visser
 
Whidbey old
Whidbey old Whidbey old
Whidbey old grenaud
 
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for DevelopersMSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for DevelopersDave Bost
 
Google Dev Day2007
Google Dev Day2007Google Dev Day2007
Google Dev Day2007lucclaes
 
SharePoint 2007 Presentation
SharePoint 2007 PresentationSharePoint 2007 Presentation
SharePoint 2007 PresentationAjay Jain
 
Visual Studio 2010 and .NET 4.0 Overview
Visual Studio 2010 and .NET 4.0 OverviewVisual Studio 2010 and .NET 4.0 Overview
Visual Studio 2010 and .NET 4.0 Overviewbwullems
 
Workflow Management with Espresso Workflow
Workflow Management with Espresso WorkflowWorkflow Management with Espresso Workflow
Workflow Management with Espresso WorkflowRolf Kremer
 
Developing Next-Gen Enterprise Web Application
Developing Next-Gen Enterprise Web ApplicationDeveloping Next-Gen Enterprise Web Application
Developing Next-Gen Enterprise Web ApplicationMark Gu
 
Accessing loosely structured data from F# and C#
Accessing loosely structured data from F# and C#Accessing loosely structured data from F# and C#
Accessing loosely structured data from F# and C#Tomas Petricek
 
TypeScript and SharePoint Framework
TypeScript and SharePoint FrameworkTypeScript and SharePoint Framework
TypeScript and SharePoint FrameworkBob German
 
Exploring SharePoint with F#
Exploring SharePoint with F#Exploring SharePoint with F#
Exploring SharePoint with F#Talbott Crowell
 
Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010Satish Verma
 

Ähnlich wie Linguistic Abstraction for the Web (20)

Software Language Design & Engineering: Mobl & Spoofax
Software Language Design & Engineering: Mobl & SpoofaxSoftware Language Design & Engineering: Mobl & Spoofax
Software Language Design & Engineering: Mobl & Spoofax
 
IN4308 Lecture 3
IN4308 Lecture 3IN4308 Lecture 3
IN4308 Lecture 3
 
Software Language Design & Engineering
Software Language Design & EngineeringSoftware Language Design & Engineering
Software Language Design & Engineering
 
Building DSLs with the Spoofax Language Workbench
Building DSLs with the Spoofax Language WorkbenchBuilding DSLs with the Spoofax Language Workbench
Building DSLs with the Spoofax Language Workbench
 
Visual Studio.NET
Visual Studio.NETVisual Studio.NET
Visual Studio.NET
 
TI1220 Lecture 14: Domain-Specific Languages
TI1220 Lecture 14: Domain-Specific LanguagesTI1220 Lecture 14: Domain-Specific Languages
TI1220 Lecture 14: Domain-Specific Languages
 
Whidbey old
Whidbey old Whidbey old
Whidbey old
 
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for DevelopersMSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
 
Google Dev Day2007
Google Dev Day2007Google Dev Day2007
Google Dev Day2007
 
SharePoint 2007 Presentation
SharePoint 2007 PresentationSharePoint 2007 Presentation
SharePoint 2007 Presentation
 
Visual Studio 2010 and .NET 4.0 Overview
Visual Studio 2010 and .NET 4.0 OverviewVisual Studio 2010 and .NET 4.0 Overview
Visual Studio 2010 and .NET 4.0 Overview
 
Html5 For Jjugccc2009fall
Html5 For Jjugccc2009fallHtml5 For Jjugccc2009fall
Html5 For Jjugccc2009fall
 
Workflow Management with Espresso Workflow
Workflow Management with Espresso WorkflowWorkflow Management with Espresso Workflow
Workflow Management with Espresso Workflow
 
Visual studio.net
Visual studio.netVisual studio.net
Visual studio.net
 
Developing Next-Gen Enterprise Web Application
Developing Next-Gen Enterprise Web ApplicationDeveloping Next-Gen Enterprise Web Application
Developing Next-Gen Enterprise Web Application
 
Accessing loosely structured data from F# and C#
Accessing loosely structured data from F# and C#Accessing loosely structured data from F# and C#
Accessing loosely structured data from F# and C#
 
TypeScript and SharePoint Framework
TypeScript and SharePoint FrameworkTypeScript and SharePoint Framework
TypeScript and SharePoint Framework
 
Web Application SG
Web Application SGWeb Application SG
Web Application SG
 
Exploring SharePoint with F#
Exploring SharePoint with F#Exploring SharePoint with F#
Exploring SharePoint with F#
 
Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010
 

Mehr von Eelco Visser

CS4200 2019 | Lecture 5 | Transformation by Term Rewriting
CS4200 2019 | Lecture 5 | Transformation by Term RewritingCS4200 2019 | Lecture 5 | Transformation by Term Rewriting
CS4200 2019 | Lecture 5 | Transformation by Term RewritingEelco Visser
 
CS4200 2019 | Lecture 4 | Syntactic Services
CS4200 2019 | Lecture 4 | Syntactic ServicesCS4200 2019 | Lecture 4 | Syntactic Services
CS4200 2019 | Lecture 4 | Syntactic ServicesEelco Visser
 
CS4200 2019 | Lecture 3 | Parsing
CS4200 2019 | Lecture 3 | ParsingCS4200 2019 | Lecture 3 | Parsing
CS4200 2019 | Lecture 3 | ParsingEelco Visser
 
CS4200 2019 | Lecture 2 | syntax-definition
CS4200 2019 | Lecture 2 | syntax-definitionCS4200 2019 | Lecture 2 | syntax-definition
CS4200 2019 | Lecture 2 | syntax-definitionEelco Visser
 
CS4200 2019 Lecture 1: Introduction
CS4200 2019 Lecture 1: IntroductionCS4200 2019 Lecture 1: Introduction
CS4200 2019 Lecture 1: IntroductionEelco Visser
 
A Direct Semantics of Declarative Disambiguation Rules
A Direct Semantics of Declarative Disambiguation RulesA Direct Semantics of Declarative Disambiguation Rules
A Direct Semantics of Declarative Disambiguation RulesEelco Visser
 
Declarative Type System Specification with Statix
Declarative Type System Specification with StatixDeclarative Type System Specification with Statix
Declarative Type System Specification with StatixEelco Visser
 
Compiler Construction | Lecture 17 | Beyond Compiler Construction
Compiler Construction | Lecture 17 | Beyond Compiler ConstructionCompiler Construction | Lecture 17 | Beyond Compiler Construction
Compiler Construction | Lecture 17 | Beyond Compiler ConstructionEelco Visser
 
Domain Specific Languages for Parallel Graph AnalytiX (PGX)
Domain Specific Languages for Parallel Graph AnalytiX (PGX)Domain Specific Languages for Parallel Graph AnalytiX (PGX)
Domain Specific Languages for Parallel Graph AnalytiX (PGX)Eelco Visser
 
Compiler Construction | Lecture 15 | Memory Management
Compiler Construction | Lecture 15 | Memory ManagementCompiler Construction | Lecture 15 | Memory Management
Compiler Construction | Lecture 15 | Memory ManagementEelco Visser
 
Compiler Construction | Lecture 14 | Interpreters
Compiler Construction | Lecture 14 | InterpretersCompiler Construction | Lecture 14 | Interpreters
Compiler Construction | Lecture 14 | InterpretersEelco Visser
 
Compiler Construction | Lecture 13 | Code Generation
Compiler Construction | Lecture 13 | Code GenerationCompiler Construction | Lecture 13 | Code Generation
Compiler Construction | Lecture 13 | Code GenerationEelco Visser
 
Compiler Construction | Lecture 12 | Virtual Machines
Compiler Construction | Lecture 12 | Virtual MachinesCompiler Construction | Lecture 12 | Virtual Machines
Compiler Construction | Lecture 12 | Virtual MachinesEelco Visser
 
Compiler Construction | Lecture 11 | Monotone Frameworks
Compiler Construction | Lecture 11 | Monotone FrameworksCompiler Construction | Lecture 11 | Monotone Frameworks
Compiler Construction | Lecture 11 | Monotone FrameworksEelco Visser
 
Compiler Construction | Lecture 10 | Data-Flow Analysis
Compiler Construction | Lecture 10 | Data-Flow AnalysisCompiler Construction | Lecture 10 | Data-Flow Analysis
Compiler Construction | Lecture 10 | Data-Flow AnalysisEelco Visser
 
Compiler Construction | Lecture 9 | Constraint Resolution
Compiler Construction | Lecture 9 | Constraint ResolutionCompiler Construction | Lecture 9 | Constraint Resolution
Compiler Construction | Lecture 9 | Constraint ResolutionEelco Visser
 
Compiler Construction | Lecture 8 | Type Constraints
Compiler Construction | Lecture 8 | Type ConstraintsCompiler Construction | Lecture 8 | Type Constraints
Compiler Construction | Lecture 8 | Type ConstraintsEelco Visser
 
Compiler Construction | Lecture 7 | Type Checking
Compiler Construction | Lecture 7 | Type CheckingCompiler Construction | Lecture 7 | Type Checking
Compiler Construction | Lecture 7 | Type CheckingEelco Visser
 
Compiler Construction | Lecture 6 | Introduction to Static Analysis
Compiler Construction | Lecture 6 | Introduction to Static AnalysisCompiler Construction | Lecture 6 | Introduction to Static Analysis
Compiler Construction | Lecture 6 | Introduction to Static AnalysisEelco Visser
 
Compiler Construction | Lecture 5 | Transformation by Term Rewriting
Compiler Construction | Lecture 5 | Transformation by Term RewritingCompiler Construction | Lecture 5 | Transformation by Term Rewriting
Compiler Construction | Lecture 5 | Transformation by Term RewritingEelco Visser
 

Mehr von Eelco Visser (20)

CS4200 2019 | Lecture 5 | Transformation by Term Rewriting
CS4200 2019 | Lecture 5 | Transformation by Term RewritingCS4200 2019 | Lecture 5 | Transformation by Term Rewriting
CS4200 2019 | Lecture 5 | Transformation by Term Rewriting
 
CS4200 2019 | Lecture 4 | Syntactic Services
CS4200 2019 | Lecture 4 | Syntactic ServicesCS4200 2019 | Lecture 4 | Syntactic Services
CS4200 2019 | Lecture 4 | Syntactic Services
 
CS4200 2019 | Lecture 3 | Parsing
CS4200 2019 | Lecture 3 | ParsingCS4200 2019 | Lecture 3 | Parsing
CS4200 2019 | Lecture 3 | Parsing
 
CS4200 2019 | Lecture 2 | syntax-definition
CS4200 2019 | Lecture 2 | syntax-definitionCS4200 2019 | Lecture 2 | syntax-definition
CS4200 2019 | Lecture 2 | syntax-definition
 
CS4200 2019 Lecture 1: Introduction
CS4200 2019 Lecture 1: IntroductionCS4200 2019 Lecture 1: Introduction
CS4200 2019 Lecture 1: Introduction
 
A Direct Semantics of Declarative Disambiguation Rules
A Direct Semantics of Declarative Disambiguation RulesA Direct Semantics of Declarative Disambiguation Rules
A Direct Semantics of Declarative Disambiguation Rules
 
Declarative Type System Specification with Statix
Declarative Type System Specification with StatixDeclarative Type System Specification with Statix
Declarative Type System Specification with Statix
 
Compiler Construction | Lecture 17 | Beyond Compiler Construction
Compiler Construction | Lecture 17 | Beyond Compiler ConstructionCompiler Construction | Lecture 17 | Beyond Compiler Construction
Compiler Construction | Lecture 17 | Beyond Compiler Construction
 
Domain Specific Languages for Parallel Graph AnalytiX (PGX)
Domain Specific Languages for Parallel Graph AnalytiX (PGX)Domain Specific Languages for Parallel Graph AnalytiX (PGX)
Domain Specific Languages for Parallel Graph AnalytiX (PGX)
 
Compiler Construction | Lecture 15 | Memory Management
Compiler Construction | Lecture 15 | Memory ManagementCompiler Construction | Lecture 15 | Memory Management
Compiler Construction | Lecture 15 | Memory Management
 
Compiler Construction | Lecture 14 | Interpreters
Compiler Construction | Lecture 14 | InterpretersCompiler Construction | Lecture 14 | Interpreters
Compiler Construction | Lecture 14 | Interpreters
 
Compiler Construction | Lecture 13 | Code Generation
Compiler Construction | Lecture 13 | Code GenerationCompiler Construction | Lecture 13 | Code Generation
Compiler Construction | Lecture 13 | Code Generation
 
Compiler Construction | Lecture 12 | Virtual Machines
Compiler Construction | Lecture 12 | Virtual MachinesCompiler Construction | Lecture 12 | Virtual Machines
Compiler Construction | Lecture 12 | Virtual Machines
 
Compiler Construction | Lecture 11 | Monotone Frameworks
Compiler Construction | Lecture 11 | Monotone FrameworksCompiler Construction | Lecture 11 | Monotone Frameworks
Compiler Construction | Lecture 11 | Monotone Frameworks
 
Compiler Construction | Lecture 10 | Data-Flow Analysis
Compiler Construction | Lecture 10 | Data-Flow AnalysisCompiler Construction | Lecture 10 | Data-Flow Analysis
Compiler Construction | Lecture 10 | Data-Flow Analysis
 
Compiler Construction | Lecture 9 | Constraint Resolution
Compiler Construction | Lecture 9 | Constraint ResolutionCompiler Construction | Lecture 9 | Constraint Resolution
Compiler Construction | Lecture 9 | Constraint Resolution
 
Compiler Construction | Lecture 8 | Type Constraints
Compiler Construction | Lecture 8 | Type ConstraintsCompiler Construction | Lecture 8 | Type Constraints
Compiler Construction | Lecture 8 | Type Constraints
 
Compiler Construction | Lecture 7 | Type Checking
Compiler Construction | Lecture 7 | Type CheckingCompiler Construction | Lecture 7 | Type Checking
Compiler Construction | Lecture 7 | Type Checking
 
Compiler Construction | Lecture 6 | Introduction to Static Analysis
Compiler Construction | Lecture 6 | Introduction to Static AnalysisCompiler Construction | Lecture 6 | Introduction to Static Analysis
Compiler Construction | Lecture 6 | Introduction to Static Analysis
 
Compiler Construction | Lecture 5 | Transformation by Term Rewriting
Compiler Construction | Lecture 5 | Transformation by Term RewritingCompiler Construction | Lecture 5 | Transformation by Term Rewriting
Compiler Construction | Lecture 5 | Transformation by Term Rewriting
 

Kürzlich hochgeladen

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 Pakistandanishmna97
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
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 AmsterdamUiPathCommunity
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
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.pdfOrbitshub
 
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...Martijn de Jong
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 

Kürzlich hochgeladen (20)

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
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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
 
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...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 

Linguistic Abstraction for the Web

  • 1. Linguistic Abstraction for the Web Eelco Visser http://eelcovisser.org Mountain View June 8, 2011
  • 2. Messages Linguistic abstraction as software engineering tool Web languages can be improved
  • 3. Software Engineering Problem Machine Domain bridging the gap between problem domain and solution domain
  • 4. High-Level Languages Problem HLL Machine Domain "A programming language is low level when its programs require attention to the irrelevant." Alan J. Perlis (1982) HLLs reduce gap
  • 5. Domain-Specific Languages Problem DSL HLL Machine Domain domain-specific languages support more specialization
  • 6. Software Language Design & Engineering enable software engineers to effectively design, implement, and apply domain-specific software languages
  • 7. Research: Software Language Engineering Automatically derive efficient, scalable, incremental compiler + usable IDE from high-level, declarativelanguage definition
  • 8. The Spoofax Language Workbench creating full featured IDEs for domain-specific languages
  • 9. Research: Software Language Design Systematically design domain- specific software languages with optimal tradeoff between expressivity, completeness, portability, coverage, and maintainability
  • 10. Software Language Design Case Studies Mobl: client-side stateful web applications WebDSL: server-side restful web applications
  • 12. Web Programming browser server database web app
  • 13. Web Programming browser server database HTML, Java SQL JS, CSS code runs on server, browser, and database
  • 14. Concerns in Web Programming ❖ Persistent data ★ data integrity ★ search ❖ User interface ★ data validation ★ styling, layout ★ navigation ★ actions ❖ Access control
  • 15. Separation of Concerns in Web Programming Example ❖ Data modeling ★ Java classes with JPA annotations ❖ User interface ★ Java ServerFaces XML templates ★ Seam Java classes ❖ Access control ★ Acegi configuration/annotation
  • 16. Problems in Web Programming ❖ Lack of integration ★ no cross language/concern consistency checking ★ leads to late (detection of) failures ❖ Low-level encoding ★ leads to boilerplate code
  • 17. When Seam Fails Welcome #{user.name} Welcome #{user.nam}
  • 18. When Rails Fails @post = Post.new(params[:get]) @post = Post.new(params[:post])
  • 19. Late Failures in Web Applications Zef Hemel, Danny M. Groenewegen, Lennart C. L. Kats, Eelco Visser. Static consistency checking of web applications with WebDSL. Journal of Symbolic Computation, 46(2):150-182, 2011.
  • 20. Separation of Concerns + Linguistic Integration
  • 23. Model
  • 24. Model entity Blog { key :: String (id) title :: String (name) posts -> Set<Post> (inverse=Post.blog) } entity Post { key :: String (id) title :: String (name, searchable) content :: WikiText (searchable) blog -> Blog created :: DateTime (default=now()) modified :: DateTime (default=now()) }
  • 25. Automatic Persistence Data Entity DB Model Classes Schema WebDSL Java DB Object Object Records
  • 26. Logic entity Blog { key :: String (id) title :: String (name) posts -> Set<Post> (inverse=Post.blog) function recentPosts(index: Int, n: Int): List<Post> { var i := max(1,index) - 1; return [p | p: Post in posts order by p.created desc limit n offset i*n].list(); } function newPost(): Post { var p := Post{ title := "No Title" blog := this }; p.key := p.id.toString(); return p; } }
  • 27. View
  • 28. Page Definition define page blog(b: Blog, index: Int) { main(b){ for(p: Post in b.recentPosts(index,5)) { showPost(p) } } } define showPost(p: Post) { ... } define page post(p: Post) { ... }
  • 29. Template Definition define page blog(b: Blog, index: Int) { ... } define showPost(p: Post) { section{ header{ navigate post(p) { output(p.title) } } par{ output(p.content) } par{ output(p.created.format("MMMM d, yyyy")) } } } define page post(p: Post) { ... } Navigate = Deferred Page Call
  • 30. Page Definition define page blog(b: Blog, index: Int) { ... } define showPost(p: Post) { ... } define page post(p: Post) { main(p.blog){ showPost(p) navigate editpost(p) { "[Edit]" } } }
  • 31. Forms & Data Binding define page post(p: Post) { ... } define page editpost(p: Post) { action save() { return post(p); } main(p.blog){ form{ formEntry("Title"){ input(p.title) } formEntry("Content") { input(p.content) } formEntry("Posted") { input(p.created) } submit save() { "Save" } } } } (Look Ma, No Controller!)
  • 32. Type-Directed Input define page post(p: Post) { ... } define page editpost(p: Post) { action save() { return post(p); } main(p.blog){ form{ formEntry("Title"){ input(p.title) } formEntry("Content") { input(p.content) } formEntry("Posted") { input(p.created) } submit save() { "Save" } } } }
  • 33. View Composition define sidebar(b: Blog) { list{ listitem{ navigate blog(b,1) { "Home" } } listitem{ submitlink action{ return editpost(b.newPost()); } { "[New Post]" } } } section{ header{"Recent Posts"} output(b.recentPosts(1,10)) } }
  • 34. Native Interface define main(b: Blog) { includeCSS("style.css") <div id="outercontainer"> <div id="container"> <div id="sidebar">sidebar(b)</div> <div id="contents">elements</div> <div class="clear"> </div> </div> <div class="clear"> </div> </div> }
  • 35. Integrated Development Environment short demo: consistency checking
  • 36. WebDSL Languages Data Model Logic Templates (UI, Email, Service) Access Control Data Validation Search Collaborative Filtering
  • 38. Divergence in Mobile Platforms Objective-C Java J2ME/C++ HTML/Javascript Java .NET Native Applications not Portable
  • 39. Convergence in Mobile Platform Webkit browser Webkit browser Webkit browser Webkit browser
  • 42. Rich Applications Audio WebDatabases Full-screen support Location information (GPS) Offline support Canvas Accelerator support Multi-touch
  • 43. Native Applications Address book Camera Compass File IO Notifications
  • 44. Software Engineering with JavaScript annotated HTML imperative Javascript MVC, No Integration, No Abstraction, Accidental Complexity
  • 45. typed declarative integrated concise
  • 49. tipcalculator.mobl application tipcalculator import mobl::ui::generic screen root() { var amount = 20 var percentage = 10 header("Tip calculator") group { item { numField(amount, label="amount") } item { numField(percentage, label="percentage") } item { "$" label(Math.round(amount * (1 + percentage/100))) } } nl() }
  • 51. Data Model entity Task { name : String (searchable) done : Bool due : DateTime category : Category (inverse: tasks) tags : Collection<Tag> (inverse: tasks) } entity Category { name : String tasks : Collection<Task> (inverse: category) } entity Tag { name : String tasks : Collection<Task> (inverse: tags) } HTML5 Data Persistence
  • 52. Logic entity Task { name : String (searchable) done : Bool due : DateTime category : Category (inverse: tasks) tags : Collection<Tag> (inverse: tasks) function postpone(days : Num) { this.due = DateTime.create( this.due.getFullYear(), this.due.getMonth(), this.due.getDate() + days); } function import(user : String, pw : String) { var tasksJSON = httpRequest("/export?user="+ user + "&pw=" + pw); foreach(t in tasksJSON) { add(Task.fromSelectJSON(t)); } } } statically typed: catch errors early
  • 53. Reactive User Interfaces screen root() { var phrase = "" header("Tasks") { button("Add", onclick={ addTask(); }) } searchBox(phrase) group { list(t in Task.search(phrase) limit 20){ item { checkBox(t.done, label=t.name) } } } }
  • 54. Reactive User Interfaces screen root() { var phrase = "" header("Tasks") { button("Add", onclick={ addTask(); }) } searchBox(phrase) group { list(t in Task.search(phrase) limit 20){ item { checkBox(t.done, label=t.name) } } } }
  • 55. Navigation screen root() { var phrase = "" header("Tasks") { button("Add", onclick={ addTask(); }) } searchBox(phrase) group { list(t in Task.search(phrase) limit 20){ item { checkBox(t.done, label=t.name) } } } }
  • 56. Navigation screen root() { { addTask() var phrase = "" t = Task() header("Add") { header("Tasks") { button("Done", onclick={ button("Add", onclick={ addTask(); }) } add(t); searchBox(phrase) screen return; group { }) } list(t in Task.search(phrase) limit 20){ textField(t.name) item { datePicker(t.due) checkBox(t.done, label=t.name) } } } } }
  • 57. Navigation screen root() { var phrase = "" header("Tasks") { button("Add", onclick={ addTask(); }) } searchBox(phrase) group { list(t in Task.search(phrase) limit 20){ item { checkBox(t.done, label=t.name) } } } }
  • 58. Continuations screen root() { button("Ask", onclick={ alert("Hello " + prompt("First name") + " " + prompt("Last name")); }) } screen prompt(question : String) : String { var answer = "" header(question) { button("Done", onclick={ screen return answer; }) } textField(answer) }
  • 59. User Interface Idiom: Tab control tab1() { header("Tab 1") label("This is tab 1") } control tab2() { header("Tab 2") label("This is tab 2") } screen root() { tabSet([("One", tab1), ("Two", tab2)], defaultTab="One") }
  • 60. Tab Set: Higher-Order Control control tabSet(tabs : [(String,Control)], activeTab : String) { list((tabName, tabControl) in tabs) { block(onclick={ activeTab = tabName; }, style=activeTab==tabName ? activeTabButton : inactiveTabButton) { label(tabName) } } list((tabName, tabControl) in tabs) { block(activeTab==tabName ? visibleTab : invisibleTab) { tabControl() } } } increase coverage: developers can create abstractions
  • 61. User Interface Idiom: Master Detail control taskItem(t : Task) { checkBox(t.done, label=t.name) } control taskDetail(t : Task) { textField(t.name) datePicker(t.due) } screen root() { header("Tasks") masterDetail(Task.all() order by due desc, taskItem, taskDetail) }
  • 62. User Interface Idiom: Master Detail control taskItem(t : Task) { checkBox(t.done, label=t.name) } control taskDetail(t : Task) { textField(t.name) datePicker(t.due) } screen root() { header("Tasks") masterDetail(Task.all() order by due desc, taskItem, taskDetail) }
  • 63. Master Detail: Higher-Order Control control masterDetail(items : Collection<?>, masterItem : Control1<?>, detail : Control1<?>) { group { list(it in items) { item(onclick={ detailScreen(it,detail); }) { masterItem(it) } } } } screen detailScreen(it : ?, detail : Control1<?>) { header("Detail") { backButton() } detail(it) }
  • 65. Mobl IDE static cross-concern consistency checking
  • 66. Discussion WebDSL vs Mobl crucial difference: navigation models why do we need both?
  • 67. Linguistic Abstraction for the Web Linguistic abstraction: capture software knowledge in domain-specific languages http://spoofax.org separation of concerns + linguistic integration http://mobl-lang.org cross concern consistency checking http://webdsl.org early detection failures http://researchr.org Language workbench: DSL design and http://eelcovisser.org implementation with less effort than traditional language engineering http://researchr.org/search/publication/mobl+spoofax+webdsl