SlideShare a Scribd company logo
YYeett AAnnootthheerr DDSSLL ffoorr 
CCrroossss--ppllaattffoorrmmss MMoobbiillee 
DDeevveellooppmmeenntt 
Olivier Le Goaer and Sacha Waltham 
olivier.legoaer@univ-pau.fr 
GlobalDSL 2013 # Session 2 
Montpellier, 2013
AAggeennddaa 
 Context of work 
 A survey of existing tools 
 Presentation of the XMOB solution 
 Questions? 
Olivier Le Goaer @ GlobalDSL 2013
CCoonntteexxtt ooff wwoorrkk
DDeevveellooppmmeenntt sshhiifftt 
 The new era of mobility 
 People massively use apps on handheld devices (SmartPhones, 
Tablets) 
 From Desktop application to mobile applications 
 Lower ressources (battery, network latency, processor, etc.) 
 Smaller screen and new navigation fashion (“Tap-able” not 
“clickable”) 
 Increased platform heterogeneity 
 Now steady, limited number of desktop OS 
 Yet unsteady, high number of mobile OS 
Olivier Le Goaer @ GlobalDSL 2013
HHeetteerrooggeenneeiittyy iiss bbaacckk !! 
« Desktop App » 
Development 
Olivier Le Goaer @ GlobalDSL 2013 
« Mobile App » 
Development 
$$ $$$$$, augmented 
Time-to-Market
MMoobbiillee aapppp:: nnaattiivvee oorr wweebb?? 
 Two development approaches are competing 
 Native: develop directly for the mobile device 
 Web: develop for a browser installed in the mobile device, and 
tailored to be « mobile-friendly » 
 Tame the development costs... 
 Native: one app per platform 
 Web: solely one app 
(assuming that nowadays the different browsers evenly process the code) 
 ...but do not neglect the « user experience » 
 Native: almost limitless capabilities 
 Web: limited to the browser capabilities 
Olivier Le Goaer @ GlobalDSL 2013
IInn aa nnuuttsshheellll 
 WebApps are the best way to reach the most 
possible people with the least effort 
 WebApps are inherently cross-platforms but in the agnostic sense 
(the underlying OS specificities are ignored) 
 The browser already partly solved the heterogeneity question 
 NativeApps are the best way to create the best 
possible experience 
 Native apps are specifically designed for their host, and hence 
require further solutions to achieve actual cross-platform 
 Cross-platform Mobile development Tools (XMTs) have emerged 
 This is where the scientific challenge lies 
Olivier Le Goaer @ GlobalDSL 2013
AA ssuurrvveeyy ooff eexxiissttiinngg ttoooollss
WWrriittee OOnnccee?? RRuunn eevveerryywwhheerree?? 
Olivier Le Goaer @ GlobalDSL 2013 
HTML5,CSS3, 
JavaScript 
C++, 
Java, Ruby, 
Bridge 
Translation
RReeaappppeeaarraannccee ooff MMDDAA 
 Such heterogeneity and lack of sustainability 
was already encountered in the past 
 The mid-2000s was the age of « middlewar » 
 The OMG brought its Model-Driven Architecture (MDA) vision 
 When MDA meets the mobile challenge 
 Capture knowledge into models 
 Describe things independently of mobile platforms (PIM level) 
 Platform details are woven subsequently (PSM level) 
 OMG's contributions (UML2, MOF, QVT) are centre-stage, but 
domain-specific languages are encouraged 
 A langage dedicated to the mobile domain rather than a general-purpose language 
 Offers a basis for further stuff (tests, simulation and analysis, ...) 
Olivier Le Goaer @ GlobalDSL 2013
OOvveerrvviieeww ooff eexxiissttiinngg XXMMTTss 
Olivier Le Goaer @ GlobalDSL 2013
RRaattiioonnaalleess ooff tthhee XXMMOOBB ssoolluuttiioonn 
 Domain-specific language 
 Define a language which really fits your needs 
 Decrease the efforts needed to write a (simple) mob app 
 Obviously far away to be as complete as a general language 
 Key idea : « Write less, generate more » 
 Generation of full-native code 
 Because this is the holy grail of mobile programming 
 Model-driven Architecture 
 Proved that « it works ». Separation PIM/PSM is useful. 
 Reinventing the wheel? 
 Several languages may be competing. Let us try... 
Olivier Le Goaer @ GlobalDSL 2013
PPrreesseennttaattiioonn ooff tthhee XXMMOOBB ssoolluuttiioonn
XXMMOOBB rrooaaddmmaapp 
 Set the architecture of the XMOB crosscompiler 
 Envision a MDA-compliant chain to produce native code 
 Design the XMOB language 
 Define both its abstract and concrete syntax 
 Create UML profiles for each platform 
 Write the associated transformation (M2M and M2T) 
 Android initially, then move onto other platforms 
 Deliver the XMOB solution as an Eclipse Plugin 
 Built on top of EMF 
 But the generated code ought to be reworked into specific IDE 
Olivier Le Goaer @ GlobalDSL 2013
XXMMOOBB CCrroossss--ccoommppiilleerr AArrcchhiitteeccttuurree 
crosscompiler 
PSM 
UML2 + iOS 
Profile 
Xmob Native 
… Code 
.NET program Olivier Le Goaer @ GlobalDSL 2013 
PIM 
XMOB 
PIM 
XMOB 
PSM 
UML2 + iOS 
Profile 
PSM 
UML2 + 
PSM 
UML2 + 
Android Profile 
Android Profile 
PSM 
PSM 
… Profile 
UML2 + WP8 
UML2 + WP8 
Profile 
Native 
Code 
Objective-C 
program 
Native 
Code 
Java program 
M2M 
M2M 
M2M 
M2T 
M2T 
M2T
XXMMOOBB ssuubb--llaanngguuaaggeess 
Olivier Le Goaer @ GlobalDSL 2013 
XXXXMMMMOOOOBBBB----UUUUIIII 
XXXXMMMMOOOOBBBB----eeeevvvveeeennnntttt XXXXMMMMOOOOBBBB----ddddaaaattttaaaa 
Deals with display 
(widgets) 
Deals with gluing 
together 
UI and data 
Deals with data 
sources (read only)
MMoobbiillee--ssppeecciiffiicc sshhaarreedd ccoonncceeppttss 
 XMOB-UI 
 UI is broken down into a succession of screens 
 UI elements (widgets) are declared inside a screen 
 UI elements will automatically be placed on the screen 
 XMOB-data 
 Datasources location: local or remote 
 Datasources format: xml, json, recordset, raw text, ... 
 XMOB-event 
 Triggers actions on System-related or UI-related events 
 Actions are based on verbs : open, close, fetch, start, ... 
Olivier Le Goaer @ GlobalDSL 2013
XXMMOOBB aabbssttrraacctt ssyynnttaaxx ((EEccoorree)) 
Olivier Le Goaer @ GlobalDSL 2013
XXMMOOBB ccoonnccrreettee ssyynnttaaxx ((XXtteexxtt)) 
 XMOB has a textual syntax 
 Better suited than graphical syntax, especially for data and events 
 XMOB has multiple files 
 Separated ui/event/data files but same extension « .xmob » 
 Implies to manage properly cross-references and scoping 
 No Type System nor Function definition 
 Because XMOB is much more a description language than a 
programming language 
 Because this is a tedious task: code for type-checking and calls 
must be added programmatically to the parser 
Olivier Le Goaer @ GlobalDSL 2013
EEMMFF TToooolliinngg ffoorr tthhee XXMMOOBB ssoolluuttiioonn 
XXppaanndd 
eemmiitttteerr 
UML 
uml2.ecore eennggiinnee 
metamodel 
Olivier Le Goaer @ GlobalDSL 2013 
XMOB file 
XMOB 
grammar 
*.xmob 
Xtext Generator 
xmob.xtext 
AANNTTLLRR 
ppaarrsseerr 
ppaarrsseerr 
XMOB 
metamodel xmob.ecore 
XMOB model 
(in-memory) 
KKeerrmmeettaa 
XMOB2UML 
Transform. 
xmob2android.kmt 
xmob2ios.kmt 
... 
XXppaanndd 
eemmiitttteerr 
eennggiinnee 
UML model 
+ profile 
UML2Code 
Template 
OS-specific 
Source code 
project 
uml2ADT.xpand 
uml2X-code.xpand 
...
XXMMOOBB ssnniippppeettss 
#xmob-ui 
@Launch 
screen main { 
#xmob-ui 
@Launch 
screen main { 
l_welcome as label["Welcome to this app"] 
b_next as button["Proceed to next screen"] 
menu { 
l_welcome as label["Welcome to this app"] 
b_next as button["Proceed to next screen"] 
menu { 
item[image: "settings.png", destination:settings] 
item[text:"Credits", destination:credits] 
item[image: "settings.png", destination:settings] 
item[text:"Credits", destination:credits] 
} 
} 
} 
screen next { 
} 
screen next { 
label["Here is some data:"] 
list_somedata as list 
label["Here is some data:"] 
list_somedata as list 
} 
screen credits { 
} 
screen credits { 
label["Contributors:"] 
label["Olivier le Goaer & Sacha Waltham"] 
label["Contributors:"] 
label["Olivier le Goaer & Sacha Waltham"] 
} 
screen settings { 
} 
screen settings { 
label["music ?"] 
switch_music as switch 
label["music ?"] 
switch_music as switch 
} 
} 
Olivier Le Goaer @ GlobalDSL 2013 
#xmob-data 
somedata as datasource { 
#xmob-data 
somedata as datasource { 
remote ["http://somewebsite.com/someservice?param=1"] 
return [xml] 
} 
remote ["http://somewebsite.com/someservice?param=1"] 
return [xml] 
} 
#xmob-event 
on (pressed[main.b_next]) do { open[next] } 
on (networkAvailable[SYSTEM]) do { 
#xmob-event 
on (pressed[main.b_next]) do { open[next] } 
on (networkAvailable[SYSTEM]) do { 
fetch[somedata] into[next.list_somedata] 
} 
on (switched[settings.switch_music]) do { 
start[player:./music.mp3] 
} 
fetch[somedata] into[next.list_somedata] 
} 
on (switched[settings.switch_music]) do { 
start[player:./music.mp3] 
}
XXMMOOBB ssnniippppeettss 
#xmob-ui 
@Launch 
screen main { 
#xmob-ui 
@Launch 
screen main { 
l_welcome as label["Welcome to this app"] 
b_next as button["Proceed to next screen"] 
menu { 
l_welcome as label["Welcome to this app"] 
b_next as button["Proceed to next screen"] 
menu { 
item[image: "settings.png", destination:settings] 
item[text:"Credits", destination:credits] 
item[image: "settings.png", destination:settings] 
item[text:"Credits", destination:credits] 
} 
} 
} 
screen next { 
} 
screen next { 
label["Here is some data:"] 
list_somedata as list 
label["Here is some data:"] 
list_somedata as list 
} 
screen credits { 
} 
screen credits { 
label["Contributors:"] 
label["Olivier le Goaer & Sacha Waltham"] 
label["Contributors:"] 
label["Olivier le Goaer & Sacha Waltham"] 
} 
screen settings { 
} 
screen settings { 
label["music ?"] 
switch_music as switch 
label["music ?"] 
switch_music as switch 
} 
} 
Olivier Le Goaer @ GlobalDSL 2013 
#xmob-data 
somedata as datasource { 
#xmob-data 
somedata as datasource { 
remote ["http://somewebsite.com/someservice?param=1"] 
return [xml] 
} 
remote ["http://somewebsite.com/someservice?param=1"] 
return [xml] 
} 
#xmob-event 
on (pressed[main.b_next]) do { open[next] } 
on (networkAvailable[SYSTEM]) do { 
#xmob-event 
on (pressed[main.b_next]) do { open[next] } 
on (networkAvailable[SYSTEM]) do { 
fetch[somedata] into[next.list_somedata] 
} 
on (switched[settings.switch_music]) do { 
start[player:./music.mp3] 
} 
fetch[somedata] into[next.list_somedata] 
} 
on (switched[settings.switch_music]) do { 
start[player:./music.mp3] 
} 
Android 
● BroadcastReceiver 
● AsyncTask 
● Progress Dialog 
● SAX Parser 
● ArrayAdapter 
●...
QQuueessttiioonnss??

More Related Content

ODP
Android executable modeling: beyond android programming
PDF
Executable modeling & dynamic adaptation
PPTX
Model-Driven Development in the context of Software Product Lines
PDF
Acceleo - Let's start with an Android example
PDF
Acceleo Code Generation
PPT
Csharp dot net
PDF
Generating an Android App with Acceleo (Eclipse Summit Europe 2010)
PDF
超級全能危樓改造王 - 增建、改建、打掉重建你的軟體架構?
Android executable modeling: beyond android programming
Executable modeling & dynamic adaptation
Model-Driven Development in the context of Software Product Lines
Acceleo - Let's start with an Android example
Acceleo Code Generation
Csharp dot net
Generating an Android App with Acceleo (Eclipse Summit Europe 2010)
超級全能危樓改造王 - 增建、改建、打掉重建你的軟體架構?

Viewers also liked (20)

PDF
Introduction à l'approche ADM de l'OMG
PDF
Adaptation d'exécution de modèles : vers des iDSML adaptables
PDF
Syntaxe concrète des DSL en IDM [avec Xtext]
PDF
Les Web Services en 60 diapos chrono !
PDF
Formation VBA Excel
PDF
Cours JavaScript
PDF
Programmation sous Android
PDF
Principe de fonctionnement du cryptage RSA
PDF
Notions de base de JavaScript
PDF
Formation JavaScript full-stack (JS, jQuery, Node.js...)
PDF
النشاط العلمي - الكهرباء
PDF
Model Transformation: A survey of the state of the art
ODP
Local Optimizations in Eclipse QVTc and QVTr using the Micro-Mapping Model of...
PDF
Prfc rhapsody simulation_1.0
PDF
OCCIware, an extensible, standard-based XaaS consumer platform to manage ever...
PDF
01072013 e governance
ODP
Yet Another Three QVT Languages
PDF
Frame latency evaluation: when simulation and analysis alone are not enough
ODP
OCL Integration and Code Generation
PDF
erocci - a scalable model-driven API framework, OW2con'16, Paris.
Introduction à l'approche ADM de l'OMG
Adaptation d'exécution de modèles : vers des iDSML adaptables
Syntaxe concrète des DSL en IDM [avec Xtext]
Les Web Services en 60 diapos chrono !
Formation VBA Excel
Cours JavaScript
Programmation sous Android
Principe de fonctionnement du cryptage RSA
Notions de base de JavaScript
Formation JavaScript full-stack (JS, jQuery, Node.js...)
النشاط العلمي - الكهرباء
Model Transformation: A survey of the state of the art
Local Optimizations in Eclipse QVTc and QVTr using the Micro-Mapping Model of...
Prfc rhapsody simulation_1.0
OCCIware, an extensible, standard-based XaaS consumer platform to manage ever...
01072013 e governance
Yet Another Three QVT Languages
Frame latency evaluation: when simulation and analysis alone are not enough
OCL Integration and Code Generation
erocci - a scalable model-driven API framework, OW2con'16, Paris.
Ad

Similar to Yet another DSL for cross platforms mobile development (20)

PPTX
DNN Connect - Mobile Development With Xamarin
PDF
TK2323 Lecture 1 - Introduction to Mobile Application.pdf
PDF
AD503: XPages Mobile Development in IBM Domino 9.0.1 and Beyond
PDF
Plattformübergreifende App-Entwicklung (ein Vergleich) - MobileTechCon 2010
PDF
AD114 -- Beyond the Mobile Browser? Building Rich Mobile Applications for IBM...
PPTX
mobile computing XML_and_Mobile_Applications[1].pptx
PPTX
Mobile application development
PDF
Domain specific modeling for mobile and io t apps
PDF
Codestock 2013: Beginner's Guide to Mobile Development with Xamarin
PDF
Xamarin for (not only) Android developers
PDF
Mobile Development Architecture Ppt with Slides, Book Notes on using Web Silv...
PDF
Firefox extension Development
PDF
Cross Platform Mobile Development
PDF
Introduction to Cross Platform Development with Xamarin/ Visual Studio
PPTX
Development of Mobile Application -PPT
PPTX
Xamarin Development
PDF
"Write once, run everywhere", Oleksii Levzhynskyi
PDF
Difference between xml and json
PPTX
C# everywhere: Xamarin and cross platform development
PDF
Introduction of Mobile applications
DNN Connect - Mobile Development With Xamarin
TK2323 Lecture 1 - Introduction to Mobile Application.pdf
AD503: XPages Mobile Development in IBM Domino 9.0.1 and Beyond
Plattformübergreifende App-Entwicklung (ein Vergleich) - MobileTechCon 2010
AD114 -- Beyond the Mobile Browser? Building Rich Mobile Applications for IBM...
mobile computing XML_and_Mobile_Applications[1].pptx
Mobile application development
Domain specific modeling for mobile and io t apps
Codestock 2013: Beginner's Guide to Mobile Development with Xamarin
Xamarin for (not only) Android developers
Mobile Development Architecture Ppt with Slides, Book Notes on using Web Silv...
Firefox extension Development
Cross Platform Mobile Development
Introduction to Cross Platform Development with Xamarin/ Visual Studio
Development of Mobile Application -PPT
Xamarin Development
"Write once, run everywhere", Oleksii Levzhynskyi
Difference between xml and json
C# everywhere: Xamarin and cross platform development
Introduction of Mobile applications
Ad

More from Olivier Le Goaër (6)

PDF
The road to green code
PDF
Ecological Impact of Native vs. Cross-Platform Mobile Apps: a Preliminary Study
PDF
PowDroid: Energy Profiling of Android Applications (ASE 2021 [Workshop] SUSTA...
PDF
Enforcing Green Code With Android Lint
PDF
GREEN PAUWARE - For a power-thrifty mobile app marketplace
PDF
Introduction au langage SQL
The road to green code
Ecological Impact of Native vs. Cross-Platform Mobile Apps: a Preliminary Study
PowDroid: Energy Profiling of Android Applications (ASE 2021 [Workshop] SUSTA...
Enforcing Green Code With Android Lint
GREEN PAUWARE - For a power-thrifty mobile app marketplace
Introduction au langage SQL

Recently uploaded (9)

PDF
2025 Guide to Buy Verified Cash App Accounts You Can Trust.pdf
PDF
Best 4 Sites for Buy Verified Cash App Accounts – BTC Only.pdf
DOC
SIUE毕业证学历认证,阿祖萨太平洋大学毕业证学位证书复制
DOC
Camb毕业证学历认证,格罗斯泰斯特主教大学毕业证仿冒文凭毕业证
PPTX
Introduction to Packet Tracer Course Overview - Aug 21 (1).pptx
DOC
NIU毕业证学历认证,阿比林基督大学毕业证留学生学历
PDF
Lesson 13- HEREDITY _ pedSAWEREGFVCXZDSASEWFigree.pdf
PPTX
ASMS Telecommunication company Profile
PDF
6-UseCfgfhgfhgfhgfhgfhfhhaseActivity.pdf
2025 Guide to Buy Verified Cash App Accounts You Can Trust.pdf
Best 4 Sites for Buy Verified Cash App Accounts – BTC Only.pdf
SIUE毕业证学历认证,阿祖萨太平洋大学毕业证学位证书复制
Camb毕业证学历认证,格罗斯泰斯特主教大学毕业证仿冒文凭毕业证
Introduction to Packet Tracer Course Overview - Aug 21 (1).pptx
NIU毕业证学历认证,阿比林基督大学毕业证留学生学历
Lesson 13- HEREDITY _ pedSAWEREGFVCXZDSASEWFigree.pdf
ASMS Telecommunication company Profile
6-UseCfgfhgfhgfhgfhgfhfhhaseActivity.pdf

Yet another DSL for cross platforms mobile development

  • 1. YYeett AAnnootthheerr DDSSLL ffoorr CCrroossss--ppllaattffoorrmmss MMoobbiillee DDeevveellooppmmeenntt Olivier Le Goaer and Sacha Waltham olivier.legoaer@univ-pau.fr GlobalDSL 2013 # Session 2 Montpellier, 2013
  • 2. AAggeennddaa  Context of work  A survey of existing tools  Presentation of the XMOB solution  Questions? Olivier Le Goaer @ GlobalDSL 2013
  • 4. DDeevveellooppmmeenntt sshhiifftt  The new era of mobility  People massively use apps on handheld devices (SmartPhones, Tablets)  From Desktop application to mobile applications  Lower ressources (battery, network latency, processor, etc.)  Smaller screen and new navigation fashion (“Tap-able” not “clickable”)  Increased platform heterogeneity  Now steady, limited number of desktop OS  Yet unsteady, high number of mobile OS Olivier Le Goaer @ GlobalDSL 2013
  • 5. HHeetteerrooggeenneeiittyy iiss bbaacckk !! « Desktop App » Development Olivier Le Goaer @ GlobalDSL 2013 « Mobile App » Development $$ $$$$$, augmented Time-to-Market
  • 6. MMoobbiillee aapppp:: nnaattiivvee oorr wweebb??  Two development approaches are competing  Native: develop directly for the mobile device  Web: develop for a browser installed in the mobile device, and tailored to be « mobile-friendly »  Tame the development costs...  Native: one app per platform  Web: solely one app (assuming that nowadays the different browsers evenly process the code)  ...but do not neglect the « user experience »  Native: almost limitless capabilities  Web: limited to the browser capabilities Olivier Le Goaer @ GlobalDSL 2013
  • 7. IInn aa nnuuttsshheellll  WebApps are the best way to reach the most possible people with the least effort  WebApps are inherently cross-platforms but in the agnostic sense (the underlying OS specificities are ignored)  The browser already partly solved the heterogeneity question  NativeApps are the best way to create the best possible experience  Native apps are specifically designed for their host, and hence require further solutions to achieve actual cross-platform  Cross-platform Mobile development Tools (XMTs) have emerged  This is where the scientific challenge lies Olivier Le Goaer @ GlobalDSL 2013
  • 8. AA ssuurrvveeyy ooff eexxiissttiinngg ttoooollss
  • 9. WWrriittee OOnnccee?? RRuunn eevveerryywwhheerree?? Olivier Le Goaer @ GlobalDSL 2013 HTML5,CSS3, JavaScript C++, Java, Ruby, Bridge Translation
  • 10. RReeaappppeeaarraannccee ooff MMDDAA  Such heterogeneity and lack of sustainability was already encountered in the past  The mid-2000s was the age of « middlewar »  The OMG brought its Model-Driven Architecture (MDA) vision  When MDA meets the mobile challenge  Capture knowledge into models  Describe things independently of mobile platforms (PIM level)  Platform details are woven subsequently (PSM level)  OMG's contributions (UML2, MOF, QVT) are centre-stage, but domain-specific languages are encouraged  A langage dedicated to the mobile domain rather than a general-purpose language  Offers a basis for further stuff (tests, simulation and analysis, ...) Olivier Le Goaer @ GlobalDSL 2013
  • 11. OOvveerrvviieeww ooff eexxiissttiinngg XXMMTTss Olivier Le Goaer @ GlobalDSL 2013
  • 12. RRaattiioonnaalleess ooff tthhee XXMMOOBB ssoolluuttiioonn  Domain-specific language  Define a language which really fits your needs  Decrease the efforts needed to write a (simple) mob app  Obviously far away to be as complete as a general language  Key idea : « Write less, generate more »  Generation of full-native code  Because this is the holy grail of mobile programming  Model-driven Architecture  Proved that « it works ». Separation PIM/PSM is useful.  Reinventing the wheel?  Several languages may be competing. Let us try... Olivier Le Goaer @ GlobalDSL 2013
  • 13. PPrreesseennttaattiioonn ooff tthhee XXMMOOBB ssoolluuttiioonn
  • 14. XXMMOOBB rrooaaddmmaapp  Set the architecture of the XMOB crosscompiler  Envision a MDA-compliant chain to produce native code  Design the XMOB language  Define both its abstract and concrete syntax  Create UML profiles for each platform  Write the associated transformation (M2M and M2T)  Android initially, then move onto other platforms  Deliver the XMOB solution as an Eclipse Plugin  Built on top of EMF  But the generated code ought to be reworked into specific IDE Olivier Le Goaer @ GlobalDSL 2013
  • 15. XXMMOOBB CCrroossss--ccoommppiilleerr AArrcchhiitteeccttuurree crosscompiler PSM UML2 + iOS Profile Xmob Native … Code .NET program Olivier Le Goaer @ GlobalDSL 2013 PIM XMOB PIM XMOB PSM UML2 + iOS Profile PSM UML2 + PSM UML2 + Android Profile Android Profile PSM PSM … Profile UML2 + WP8 UML2 + WP8 Profile Native Code Objective-C program Native Code Java program M2M M2M M2M M2T M2T M2T
  • 16. XXMMOOBB ssuubb--llaanngguuaaggeess Olivier Le Goaer @ GlobalDSL 2013 XXXXMMMMOOOOBBBB----UUUUIIII XXXXMMMMOOOOBBBB----eeeevvvveeeennnntttt XXXXMMMMOOOOBBBB----ddddaaaattttaaaa Deals with display (widgets) Deals with gluing together UI and data Deals with data sources (read only)
  • 17. MMoobbiillee--ssppeecciiffiicc sshhaarreedd ccoonncceeppttss  XMOB-UI  UI is broken down into a succession of screens  UI elements (widgets) are declared inside a screen  UI elements will automatically be placed on the screen  XMOB-data  Datasources location: local or remote  Datasources format: xml, json, recordset, raw text, ...  XMOB-event  Triggers actions on System-related or UI-related events  Actions are based on verbs : open, close, fetch, start, ... Olivier Le Goaer @ GlobalDSL 2013
  • 18. XXMMOOBB aabbssttrraacctt ssyynnttaaxx ((EEccoorree)) Olivier Le Goaer @ GlobalDSL 2013
  • 19. XXMMOOBB ccoonnccrreettee ssyynnttaaxx ((XXtteexxtt))  XMOB has a textual syntax  Better suited than graphical syntax, especially for data and events  XMOB has multiple files  Separated ui/event/data files but same extension « .xmob »  Implies to manage properly cross-references and scoping  No Type System nor Function definition  Because XMOB is much more a description language than a programming language  Because this is a tedious task: code for type-checking and calls must be added programmatically to the parser Olivier Le Goaer @ GlobalDSL 2013
  • 20. EEMMFF TToooolliinngg ffoorr tthhee XXMMOOBB ssoolluuttiioonn XXppaanndd eemmiitttteerr UML uml2.ecore eennggiinnee metamodel Olivier Le Goaer @ GlobalDSL 2013 XMOB file XMOB grammar *.xmob Xtext Generator xmob.xtext AANNTTLLRR ppaarrsseerr ppaarrsseerr XMOB metamodel xmob.ecore XMOB model (in-memory) KKeerrmmeettaa XMOB2UML Transform. xmob2android.kmt xmob2ios.kmt ... XXppaanndd eemmiitttteerr eennggiinnee UML model + profile UML2Code Template OS-specific Source code project uml2ADT.xpand uml2X-code.xpand ...
  • 21. XXMMOOBB ssnniippppeettss #xmob-ui @Launch screen main { #xmob-ui @Launch screen main { l_welcome as label["Welcome to this app"] b_next as button["Proceed to next screen"] menu { l_welcome as label["Welcome to this app"] b_next as button["Proceed to next screen"] menu { item[image: "settings.png", destination:settings] item[text:"Credits", destination:credits] item[image: "settings.png", destination:settings] item[text:"Credits", destination:credits] } } } screen next { } screen next { label["Here is some data:"] list_somedata as list label["Here is some data:"] list_somedata as list } screen credits { } screen credits { label["Contributors:"] label["Olivier le Goaer & Sacha Waltham"] label["Contributors:"] label["Olivier le Goaer & Sacha Waltham"] } screen settings { } screen settings { label["music ?"] switch_music as switch label["music ?"] switch_music as switch } } Olivier Le Goaer @ GlobalDSL 2013 #xmob-data somedata as datasource { #xmob-data somedata as datasource { remote ["http://somewebsite.com/someservice?param=1"] return [xml] } remote ["http://somewebsite.com/someservice?param=1"] return [xml] } #xmob-event on (pressed[main.b_next]) do { open[next] } on (networkAvailable[SYSTEM]) do { #xmob-event on (pressed[main.b_next]) do { open[next] } on (networkAvailable[SYSTEM]) do { fetch[somedata] into[next.list_somedata] } on (switched[settings.switch_music]) do { start[player:./music.mp3] } fetch[somedata] into[next.list_somedata] } on (switched[settings.switch_music]) do { start[player:./music.mp3] }
  • 22. XXMMOOBB ssnniippppeettss #xmob-ui @Launch screen main { #xmob-ui @Launch screen main { l_welcome as label["Welcome to this app"] b_next as button["Proceed to next screen"] menu { l_welcome as label["Welcome to this app"] b_next as button["Proceed to next screen"] menu { item[image: "settings.png", destination:settings] item[text:"Credits", destination:credits] item[image: "settings.png", destination:settings] item[text:"Credits", destination:credits] } } } screen next { } screen next { label["Here is some data:"] list_somedata as list label["Here is some data:"] list_somedata as list } screen credits { } screen credits { label["Contributors:"] label["Olivier le Goaer & Sacha Waltham"] label["Contributors:"] label["Olivier le Goaer & Sacha Waltham"] } screen settings { } screen settings { label["music ?"] switch_music as switch label["music ?"] switch_music as switch } } Olivier Le Goaer @ GlobalDSL 2013 #xmob-data somedata as datasource { #xmob-data somedata as datasource { remote ["http://somewebsite.com/someservice?param=1"] return [xml] } remote ["http://somewebsite.com/someservice?param=1"] return [xml] } #xmob-event on (pressed[main.b_next]) do { open[next] } on (networkAvailable[SYSTEM]) do { #xmob-event on (pressed[main.b_next]) do { open[next] } on (networkAvailable[SYSTEM]) do { fetch[somedata] into[next.list_somedata] } on (switched[settings.switch_music]) do { start[player:./music.mp3] } fetch[somedata] into[next.list_somedata] } on (switched[settings.switch_music]) do { start[player:./music.mp3] } Android ● BroadcastReceiver ● AsyncTask ● Progress Dialog ● SAX Parser ● ArrayAdapter ●...