SlideShare a Scribd company logo
1 of 43
One CODE
                                   to rule
                                     them
                                        all

DSLs and Mobile App Development
presented by Herman Lintvelt
Agenda
•   Challenges in Mobile App development

•   Possible Solutions

•   Introducing Domain Specific Languages (DSL)

    •   What & Why

•   Applause Framework

    •   XText

    •   Example: SASSI Pocketguide App

•   Next steps
Poll

 What is the biggest frustration you have when
developing mobile applications for smartphones?
Challenges in Mobile
 App Development

           Can we have it for
            BlackBerry too?
Challenges in Mobile
      App Development

Do we really have to do this
          again?
Multi-platform Challenge
•   For a while iPhone was “the one and only”
•   Increasingly clients want to roll out apps to multiple
    smart phone platforms (Android, Blackberry)
•   BUT
    •   Clients do not necessarily want to pay extra full cost
        for each platform
    •   It’s boring and inefficient to duplicate effort for each
        platform
Possibilities
• Numerous frameworks / tools out there to help
  develop mobile apps for multiple platforms:
 •   PhoneGap, Appcelerator, RAMP, Rhomobile, J2ME
     Polish, etc.

• Does have drawbacks:
 •   limited functionality: cannot access all the
     functionality of each mobile platform
 •   for some: web-driven content (constant use of
     expensive bandwidth)
Towards a CODE
    solution
Manually written code




          Frameworks



      Libraries
Manually written app code

     Manually written
 schematic/scaffolding code


            Frameworks



        Libraries
Scenario 1: Develop same app for multiple platforms



    Manually written app code        Manually written app code
            Manually written                 Manually written
        schematic/scaffolding code       schematic/scaffolding code


             iOS Frameworks               Android Frameworks

         iOS Libraries                  Android Libraries

                iOS                          Android
Scenario 2: Develop second app on same platform
                    Manually written app code
                            Manually written
                        schematic/scaffolding code

  iOS App One
                             iOS Frameworks

                         iOS Libraries

                    Manually written app code
                            Manually written
                        schematic/scaffolding code

  iOS App Two
                             iOS Frameworks

                         iOS Libraries
Scenario 3: Multiple apps for multiple platforms
            Manually written app code        Manually written app code
                     Manually written                 Manually written
               schematic/scaffolding code        schematic/scaffolding code

App One             iOS Frameworks                Android Frameworks

                  iOS Libraries                 Android Libraries

            Manually written app code        Manually written app code
                     Manually written                 Manually written
                schematic/scaffolding code       schematic/scaffolding code


App Two             iOS Frameworks                Android Frameworks

                  iOS Libraries                 Android Libraries
What’s wrong with this picture?
                 • Repetition,
                  Repetition,
                  Repetition
                  •   Mostly Manual

                 • Accidental
                  Complexity
                  •   UI code is difficult
What If?
What If?
We code each app ONCE
What If?
     We code each app ONCE

               AND

We have control over the native code
What If?
       We code each app ONCE

                 AND

  We have control over the native code

                 AND
Experience gained with each app enhances
      overall quality of native code
Scenario 3: Multiple apps for multiple platforms
                        Manually written app code
App One


       iOS Generated app code          Android Generated app code
          iOS Scaffolding code              Android Scaffolding code


             iOS Frameworks                   Android Frameworks

           iOS Libraries                    Android Libraries


App Two
                        Manually written app code
Introducing
Domain Specific Languages
         (DSL)
What is a DSL?
• Programming/Specification language
  dedicated to specific problem domain
  •   e.g. Logo, Mathematica, SQL, regular
      expressions, GraphViz, XSLT, Business Rules
      Engines, UnrealScript, Lua

• Java, Objective-C: general purpose
  languages
Why use a DSL?
• allows solutions to be expressed more
  clearly & closer to domain
• enhances understanding and
  communication
• allows validation at domain level
• self-documenting
Mobile App DSL
• It is possible to define a DSL for the Mobile
  application domain
• Examples:
  •   RAMP uses a custom DSL
  •   Applause (now applitude)
Introducing the
 Applause
Framework
What is it?
• “(XText) DSL for creating mobile apps”
• Use code generation (via XPand) to generate for
    multiple platforms (iOS and Android)
DSL           Manually written app
                                                       Generated

iOS Generated app          Android Generated app
       code
 iOS Scaffolding code       Android code
                                    Scaffolding code

          iOS                          Android
      Frameworks                     Frameworks
  iOS Libraries              Android Libraries
Applause Background
• Developed by Heiko Behrens, Peter Friese
 •   from Itemis AG (www.itemis.com)

• http://code.google.com/applause
• Reworked into: applitude
 •   http://applitude.org/

• Makes use of XText and Xpand Eclipse
  projects
XText : Quick Intro
•   language development framework for DSL (or even full-blown
    GPL)
•   http://www.eclipse.org/XText
•   creates Eclipse-based development environment for your DSL
•   it provides way (i.e. its own DSL) to describe your language, then
    gives:
    •   parser
    •   type-safe abstract syntax tree (AST)
    •   serializer
    •   code formatter
    •   scoping, linking, compiler checks, validation
    •   code generator or interpreter
    •   Eclipse IDE for your language

•   Highly configurable (using Google Guice)
Explore by Example
• SASSI Pocket Guide app (wwfsassi.co.za)
First we need some
          data
• Google Docs to the rescue
App Anatomy
                          iPhone               10:15 PM
                                                                   View Title
                                   SASSI Pocket Guide
                                Fish A
                         IMG
                                Note
                                                                   Table View
                         IMG
                                Fish B
                                Note

         Fish            IMG
                                Fish C                             Table Cell
                                Note
     FishName
     status                     Fish D
     note                IMG
                                Note

                         IMG
                                Fish E
                                Note

                         IMG
                                Fish F
                                Note

                         IMG
                                Fish G
                                Note

                                Fish H
Entity                   IMG
                                Note                               Tab Bar
                          All          Green        Orange   Red

         Data Provider                                             Tab Bar Button
Mapping concepts

 Entity
 Data Provider
 View Title
 Table View
 Table Cell
 Tab Bar
 Tab Bar Button
Mapping concepts

 Entity
 Data Provider
 View Title
 Table View
 Table Cell
 Tab Bar
 Tab Bar Button
Mapping concepts

 Entity
 Data Provider
 View Title
 Table View
 Table Cell
 Tab Bar
 Tab Bar Button
Mapping concepts
 Entity
 Data Provider
 View Title
 Table View
 Table Cell
 Tab Bar
 Tab Bar Button
The flow of things
              Applause DSL




       iOS Code Generation templates
The flow of things

       Generated iOS Application Code
The flow of things

  iPhone               10:15 PM


           SASSI Pocket Guide

 IMG
        Fish A
        Note

 IMG
        Fish B
        Note

 IMG
        Fish C
        Note

 IMG
        Fish D
        Note

 IMG
        Fish E
        Note

 IMG
        Fish F
        Note

 IMG
        Fish G
        Note

 IMG
        Fish H
        Note


  All          Green        Orange   Red
Retrospective
• Did this give us what we want?
• Inspect & Adapt
 •   enhance scaffolding templates
 •   enhance DSL
Next Steps
•   Investigate iPhonical
    •   http://code.google.com/p/iphonical/
•   Also XText based (similar to Applause)
•   Currently focussed on CRUD-based apps
•   Generate Titanium Mobile javascript (i.e.
    Appcelerator do multi-platform abstraction)
Next Steps
•   DSL for your business domain
    •   Differentiate between enterprise business
        domain and the business of building apps for
        various clients
        •   e.g. Car Telematics DSL vs. Applause DSL

•   Other uses?
    •   Specification (BDD?)
    •   Testing
iOS User Group
           Cape Town
• Please email me: herman@polymorph.co.za
 •   Indicate if you want to:
     •   a) help organise
     •   b) just want to attend
Thanks
• Thanks for attending
• Feel free to email me at:
  •   herman@polymorph.co.za


• Have fun creating your own coding
  language

More Related Content

Viewers also liked

Sendakuntza sakramentuak
Sendakuntza sakramentuakSendakuntza sakramentuak
Sendakuntza sakramentuakColegio
 
Utdanningsvalg På Nett Tromsø 16012008
Utdanningsvalg På Nett Tromsø 16012008Utdanningsvalg På Nett Tromsø 16012008
Utdanningsvalg På Nett Tromsø 16012008Oystein Johannessen
 
All That Jazz
All That JazzAll That Jazz
All That Jazztgritten
 
Empowerment of a High Achiever - Stockholm, September 2011
Empowerment of a High Achiever - Stockholm, September 2011Empowerment of a High Achiever - Stockholm, September 2011
Empowerment of a High Achiever - Stockholm, September 2011Rotary International
 
Technology nicole
Technology nicoleTechnology nicole
Technology nicoleNICKYDAVIS
 
Traffic Cone Marketing - Marketing for Restaurants PowerPoint
Traffic Cone Marketing - Marketing for Restaurants PowerPointTraffic Cone Marketing - Marketing for Restaurants PowerPoint
Traffic Cone Marketing - Marketing for Restaurants PowerPointDan McMullen
 
11 relación-de-docentes-de-la-unsch-registrado-en-el-dina
11 relación-de-docentes-de-la-unsch-registrado-en-el-dina11 relación-de-docentes-de-la-unsch-registrado-en-el-dina
11 relación-de-docentes-de-la-unsch-registrado-en-el-dinaRosmery Morales Montes
 
ADC NGF-TB2BRRD4
ADC NGF-TB2BRRD4ADC NGF-TB2BRRD4
ADC NGF-TB2BRRD4savomir
 

Viewers also liked (14)

New Hots Presentation
New Hots PresentationNew Hots Presentation
New Hots Presentation
 
Roses
RosesRoses
Roses
 
Sendakuntza sakramentuak
Sendakuntza sakramentuakSendakuntza sakramentuak
Sendakuntza sakramentuak
 
Utdanningsvalg På Nett Tromsø 16012008
Utdanningsvalg På Nett Tromsø 16012008Utdanningsvalg På Nett Tromsø 16012008
Utdanningsvalg På Nett Tromsø 16012008
 
Intranet solution for small businesses
Intranet solution for small businessesIntranet solution for small businesses
Intranet solution for small businesses
 
Noel
NoelNoel
Noel
 
All That Jazz
All That JazzAll That Jazz
All That Jazz
 
Empowerment of a High Achiever - Stockholm, September 2011
Empowerment of a High Achiever - Stockholm, September 2011Empowerment of a High Achiever - Stockholm, September 2011
Empowerment of a High Achiever - Stockholm, September 2011
 
Technology nicole
Technology nicoleTechnology nicole
Technology nicole
 
Kristian
KristianKristian
Kristian
 
puppy ads
puppy adspuppy ads
puppy ads
 
Traffic Cone Marketing - Marketing for Restaurants PowerPoint
Traffic Cone Marketing - Marketing for Restaurants PowerPointTraffic Cone Marketing - Marketing for Restaurants PowerPoint
Traffic Cone Marketing - Marketing for Restaurants PowerPoint
 
11 relación-de-docentes-de-la-unsch-registrado-en-el-dina
11 relación-de-docentes-de-la-unsch-registrado-en-el-dina11 relación-de-docentes-de-la-unsch-registrado-en-el-dina
11 relación-de-docentes-de-la-unsch-registrado-en-el-dina
 
ADC NGF-TB2BRRD4
ADC NGF-TB2BRRD4ADC NGF-TB2BRRD4
ADC NGF-TB2BRRD4
 

Similar to Once CODE to rule them all

What is a Native Application and Why We Need Them
What is a Native Application and Why We Need ThemWhat is a Native Application and Why We Need Them
What is a Native Application and Why We Need ThemSubham Mazumdar
 
Mono for Android... for Google Devs
Mono for Android... for Google DevsMono for Android... for Google Devs
Mono for Android... for Google DevsCraig Dunn
 
I os dev_insights
I os dev_insightsI os dev_insights
I os dev_insightsMarkus Kopf
 
Developing Applications on iOS
Developing Applications on iOSDeveloping Applications on iOS
Developing Applications on iOSFrancisco Ramos
 
Shoukry Kattan - Titanium Mobile. Cross Platform Mobile Apps
Shoukry Kattan - Titanium Mobile. Cross Platform Mobile AppsShoukry Kattan - Titanium Mobile. Cross Platform Mobile Apps
Shoukry Kattan - Titanium Mobile. Cross Platform Mobile Apps#DevTO
 
Top iOS App Development Tools That You Can Consider.pdf
Top iOS App Development Tools That You Can Consider.pdfTop iOS App Development Tools That You Can Consider.pdf
Top iOS App Development Tools That You Can Consider.pdfHarryParker32
 
Smartface ile Crossplatform Uygulama Geliştirme
Smartface ile Crossplatform Uygulama GeliştirmeSmartface ile Crossplatform Uygulama Geliştirme
Smartface ile Crossplatform Uygulama GeliştirmeMobile İstanbul
 
Bringing the Ruby language into the mobile world
Bringing the Ruby language into the mobile worldBringing the Ruby language into the mobile world
Bringing the Ruby language into the mobile worldLaurent Sansonetti
 
排隊 Paiduei App, | React Native | iOS | Android
排隊 Paiduei App, | React Native | iOS | Android排隊 Paiduei App, | React Native | iOS | Android
排隊 Paiduei App, | React Native | iOS | AndroidLiyang Zhang
 
iOS app development Technologies, benefits, and use cases.pdf
iOS app development Technologies, benefits, and use cases.pdfiOS app development Technologies, benefits, and use cases.pdf
iOS app development Technologies, benefits, and use cases.pdfLaura Miller
 
Optimized Cross Platform Development
Optimized Cross Platform DevelopmentOptimized Cross Platform Development
Optimized Cross Platform Developmentjobandesther
 
Code and Conquer with Globe Labs, October 27, 2012
Code and Conquer with Globe Labs, October 27, 2012Code and Conquer with Globe Labs, October 27, 2012
Code and Conquer with Globe Labs, October 27, 2012jobandesther
 
Which Language Is Best For iOS App Development.pdf
Which Language Is Best For iOS App Development.pdfWhich Language Is Best For iOS App Development.pdf
Which Language Is Best For iOS App Development.pdfQServices Inc.
 
SETCON'18 - Yauheni Pakala - .NET Embedding
SETCON'18 - Yauheni Pakala - .NET Embedding SETCON'18 - Yauheni Pakala - .NET Embedding
SETCON'18 - Yauheni Pakala - .NET Embedding Nadzeya Pus
 
iOS development made easy
iOS development made easyiOS development made easy
iOS development made easyAdrian Thompson
 
Midweek breather hybridapps
Midweek breather hybridappsMidweek breather hybridapps
Midweek breather hybridappsstrider1981
 
Swift Or Dart: Which One is the Most Viable Choice for iOS App Development!
Swift Or Dart: Which One is the Most Viable Choice for iOS App Development!					Swift Or Dart: Which One is the Most Viable Choice for iOS App Development!
Swift Or Dart: Which One is the Most Viable Choice for iOS App Development! Shelly Megan
 

Similar to Once CODE to rule them all (20)

What is a Native Application and Why We Need Them
What is a Native Application and Why We Need ThemWhat is a Native Application and Why We Need Them
What is a Native Application and Why We Need Them
 
Mono for Android... for Google Devs
Mono for Android... for Google DevsMono for Android... for Google Devs
Mono for Android... for Google Devs
 
I os dev_insights
I os dev_insightsI os dev_insights
I os dev_insights
 
Developing Applications on iOS
Developing Applications on iOSDeveloping Applications on iOS
Developing Applications on iOS
 
Shoukry Kattan - Titanium Mobile. Cross Platform Mobile Apps
Shoukry Kattan - Titanium Mobile. Cross Platform Mobile AppsShoukry Kattan - Titanium Mobile. Cross Platform Mobile Apps
Shoukry Kattan - Titanium Mobile. Cross Platform Mobile Apps
 
Top iOS App Development Tools That You Can Consider.pdf
Top iOS App Development Tools That You Can Consider.pdfTop iOS App Development Tools That You Can Consider.pdf
Top iOS App Development Tools That You Can Consider.pdf
 
Smartface ile Crossplatform Uygulama Geliştirme
Smartface ile Crossplatform Uygulama GeliştirmeSmartface ile Crossplatform Uygulama Geliştirme
Smartface ile Crossplatform Uygulama Geliştirme
 
Bringing the Ruby language into the mobile world
Bringing the Ruby language into the mobile worldBringing the Ruby language into the mobile world
Bringing the Ruby language into the mobile world
 
排隊 Paiduei App, | React Native | iOS | Android
排隊 Paiduei App, | React Native | iOS | Android排隊 Paiduei App, | React Native | iOS | Android
排隊 Paiduei App, | React Native | iOS | Android
 
iOS app development Technologies, benefits, and use cases.pdf
iOS app development Technologies, benefits, and use cases.pdfiOS app development Technologies, benefits, and use cases.pdf
iOS app development Technologies, benefits, and use cases.pdf
 
Optimized Cross Platform Development
Optimized Cross Platform DevelopmentOptimized Cross Platform Development
Optimized Cross Platform Development
 
Code and Conquer with Globe Labs, October 27, 2012
Code and Conquer with Globe Labs, October 27, 2012Code and Conquer with Globe Labs, October 27, 2012
Code and Conquer with Globe Labs, October 27, 2012
 
Which Language Is Best For iOS App Development.pdf
Which Language Is Best For iOS App Development.pdfWhich Language Is Best For iOS App Development.pdf
Which Language Is Best For iOS App Development.pdf
 
Xamarin v.Now
Xamarin v.NowXamarin v.Now
Xamarin v.Now
 
Hybrid Mobile App
Hybrid Mobile AppHybrid Mobile App
Hybrid Mobile App
 
Hybrid mobile app
Hybrid mobile appHybrid mobile app
Hybrid mobile app
 
SETCON'18 - Yauheni Pakala - .NET Embedding
SETCON'18 - Yauheni Pakala - .NET Embedding SETCON'18 - Yauheni Pakala - .NET Embedding
SETCON'18 - Yauheni Pakala - .NET Embedding
 
iOS development made easy
iOS development made easyiOS development made easy
iOS development made easy
 
Midweek breather hybridapps
Midweek breather hybridappsMidweek breather hybridapps
Midweek breather hybridapps
 
Swift Or Dart: Which One is the Most Viable Choice for iOS App Development!
Swift Or Dart: Which One is the Most Viable Choice for iOS App Development!					Swift Or Dart: Which One is the Most Viable Choice for iOS App Development!
Swift Or Dart: Which One is the Most Viable Choice for iOS App Development!
 

Recently uploaded

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
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 interpreternaman860154
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 

Recently uploaded (20)

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
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
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 

Once CODE to rule them all

  • 1. One CODE to rule them all DSLs and Mobile App Development presented by Herman Lintvelt
  • 2. Agenda • Challenges in Mobile App development • Possible Solutions • Introducing Domain Specific Languages (DSL) • What & Why • Applause Framework • XText • Example: SASSI Pocketguide App • Next steps
  • 3. Poll What is the biggest frustration you have when developing mobile applications for smartphones?
  • 4. Challenges in Mobile App Development Can we have it for BlackBerry too?
  • 5. Challenges in Mobile App Development Do we really have to do this again?
  • 6. Multi-platform Challenge • For a while iPhone was “the one and only” • Increasingly clients want to roll out apps to multiple smart phone platforms (Android, Blackberry) • BUT • Clients do not necessarily want to pay extra full cost for each platform • It’s boring and inefficient to duplicate effort for each platform
  • 7. Possibilities • Numerous frameworks / tools out there to help develop mobile apps for multiple platforms: • PhoneGap, Appcelerator, RAMP, Rhomobile, J2ME Polish, etc. • Does have drawbacks: • limited functionality: cannot access all the functionality of each mobile platform • for some: web-driven content (constant use of expensive bandwidth)
  • 8. Towards a CODE solution
  • 9. Manually written code Frameworks Libraries
  • 10. Manually written app code Manually written schematic/scaffolding code Frameworks Libraries
  • 11. Scenario 1: Develop same app for multiple platforms Manually written app code Manually written app code Manually written Manually written schematic/scaffolding code schematic/scaffolding code iOS Frameworks Android Frameworks iOS Libraries Android Libraries iOS Android
  • 12. Scenario 2: Develop second app on same platform Manually written app code Manually written schematic/scaffolding code iOS App One iOS Frameworks iOS Libraries Manually written app code Manually written schematic/scaffolding code iOS App Two iOS Frameworks iOS Libraries
  • 13. Scenario 3: Multiple apps for multiple platforms Manually written app code Manually written app code Manually written Manually written schematic/scaffolding code schematic/scaffolding code App One iOS Frameworks Android Frameworks iOS Libraries Android Libraries Manually written app code Manually written app code Manually written Manually written schematic/scaffolding code schematic/scaffolding code App Two iOS Frameworks Android Frameworks iOS Libraries Android Libraries
  • 14. What’s wrong with this picture? • Repetition, Repetition, Repetition • Mostly Manual • Accidental Complexity • UI code is difficult
  • 16. What If? We code each app ONCE
  • 17. What If? We code each app ONCE AND We have control over the native code
  • 18. What If? We code each app ONCE AND We have control over the native code AND Experience gained with each app enhances overall quality of native code
  • 19. Scenario 3: Multiple apps for multiple platforms Manually written app code App One iOS Generated app code Android Generated app code iOS Scaffolding code Android Scaffolding code iOS Frameworks Android Frameworks iOS Libraries Android Libraries App Two Manually written app code
  • 21. What is a DSL? • Programming/Specification language dedicated to specific problem domain • e.g. Logo, Mathematica, SQL, regular expressions, GraphViz, XSLT, Business Rules Engines, UnrealScript, Lua • Java, Objective-C: general purpose languages
  • 22. Why use a DSL? • allows solutions to be expressed more clearly & closer to domain • enhances understanding and communication • allows validation at domain level • self-documenting
  • 23. Mobile App DSL • It is possible to define a DSL for the Mobile application domain • Examples: • RAMP uses a custom DSL • Applause (now applitude)
  • 25. What is it? • “(XText) DSL for creating mobile apps” • Use code generation (via XPand) to generate for multiple platforms (iOS and Android) DSL Manually written app Generated iOS Generated app Android Generated app code iOS Scaffolding code Android code Scaffolding code iOS Android Frameworks Frameworks iOS Libraries Android Libraries
  • 26. Applause Background • Developed by Heiko Behrens, Peter Friese • from Itemis AG (www.itemis.com) • http://code.google.com/applause • Reworked into: applitude • http://applitude.org/ • Makes use of XText and Xpand Eclipse projects
  • 27. XText : Quick Intro • language development framework for DSL (or even full-blown GPL) • http://www.eclipse.org/XText • creates Eclipse-based development environment for your DSL • it provides way (i.e. its own DSL) to describe your language, then gives: • parser • type-safe abstract syntax tree (AST) • serializer • code formatter • scoping, linking, compiler checks, validation • code generator or interpreter • Eclipse IDE for your language • Highly configurable (using Google Guice)
  • 28. Explore by Example • SASSI Pocket Guide app (wwfsassi.co.za)
  • 29. First we need some data • Google Docs to the rescue
  • 30. App Anatomy iPhone 10:15 PM View Title SASSI Pocket Guide Fish A IMG Note Table View IMG Fish B Note Fish IMG Fish C Table Cell Note FishName status Fish D note IMG Note IMG Fish E Note IMG Fish F Note IMG Fish G Note Fish H Entity IMG Note Tab Bar All Green Orange Red Data Provider Tab Bar Button
  • 31. Mapping concepts Entity Data Provider View Title Table View Table Cell Tab Bar Tab Bar Button
  • 32. Mapping concepts Entity Data Provider View Title Table View Table Cell Tab Bar Tab Bar Button
  • 33. Mapping concepts Entity Data Provider View Title Table View Table Cell Tab Bar Tab Bar Button
  • 34. Mapping concepts Entity Data Provider View Title Table View Table Cell Tab Bar Tab Bar Button
  • 35. The flow of things Applause DSL iOS Code Generation templates
  • 36. The flow of things Generated iOS Application Code
  • 37. The flow of things iPhone 10:15 PM SASSI Pocket Guide IMG Fish A Note IMG Fish B Note IMG Fish C Note IMG Fish D Note IMG Fish E Note IMG Fish F Note IMG Fish G Note IMG Fish H Note All Green Orange Red
  • 38.
  • 39. Retrospective • Did this give us what we want? • Inspect & Adapt • enhance scaffolding templates • enhance DSL
  • 40. Next Steps • Investigate iPhonical • http://code.google.com/p/iphonical/ • Also XText based (similar to Applause) • Currently focussed on CRUD-based apps • Generate Titanium Mobile javascript (i.e. Appcelerator do multi-platform abstraction)
  • 41. Next Steps • DSL for your business domain • Differentiate between enterprise business domain and the business of building apps for various clients • e.g. Car Telematics DSL vs. Applause DSL • Other uses? • Specification (BDD?) • Testing
  • 42. iOS User Group Cape Town • Please email me: herman@polymorph.co.za • Indicate if you want to: • a) help organise • b) just want to attend
  • 43. Thanks • Thanks for attending • Feel free to email me at: • herman@polymorph.co.za • Have fun creating your own coding language

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. RAMP: Virtual Mobile Technologies\n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. MWE2: Modeling workflow engine 2\ntextual approach much easier to implement & use than GUI\n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. Specification: DSL done in-house, build of native app from that outsourced\n
  41. \n
  42. \n