1
Adding Spreadsheets
to the MDE Toolbox
Martin Francis, D. Kolovos,
N. Matragkas, R. Paige
Department of Computer Science
University of York
2MDE
• Aims to improve the quality and
efficiency of the software development
process
– Promotes models to first-class citizens
– Reduces the need for human compilers
• Not restricted to a particular modelling
technology / model representation
format
Skip Ad>
3Models in MDE
• Structured artefacts that
– Contain (meta-)information of interest
related to the system under development
– Are amenable to automated processing
• Transformation
• Validation
• Simulation etc.
4Artefacts of Interest
EMF
XML XSD
Spreadsheets
Visio RDBMS
5The MDE Community
EMF
XML XSD
Spreadsheets
Visio
RDBMS
6Everyone else
EMF
XML XSD
Spreadsheets
Visio RDBMS
7Spreadsheets
• Versatile and intuitive
• Fill in gaps in the software development
process
– When no specialised tools exist for the job
– When specialised tools are too
expensive/complicated
– When information needs to be collected
from non-programmers
8Spreadsheets
• Used for
– Capturing requirements
– Tracking bugs
– Allocating roles
– Monitoring tasks
• ... but have been largely ignored by MDE
languages and tools
9Aim of this Work
• Add support for (Google) spreadsheets to
languages for
– Model querying
– Model-to-model transformation
– Model validation
– Model-to-text transformation
– Model comparison
– Model merging
• ... so that spreadsheets can be used in any
step of an MDE process
10eclipse.org/Epsilon
11Concept Mapping
• Spreadsheet -> Model
• Worksheet -> Type
• Column -> Property
• Row -> Model element
modules
MSD,HCI
F
MSD,RQE
E
mt506
supervisor
mt506
4
jd5023 SmithJane 22
jd501 232 ThompsonJoe
D
age
C
lastname
B
firstname
A
id1
Student Staff
ED
teaches
C
lastname
B
firstname
A
id1
Module Mark
12Preview (Query)
modules
MSD,HCI
F
MSD,RQE
E
mt506
supervisor
mt506
4
jd5023 SmithJane 22
jd501 232 ThompsonJoe
D
age
C
lastname
B
firstname
A
id1
Student Staff
E
dj5123 JacksonDaniel HCI
mt506 MSD,RQE2 ThomasMatthew
D
teaches
C
lastname
B
firstname
A
id1
Student Staff
Module
Module
Student Staff Module
Human Computer Interaction Spring4 HCI
D
RQE3 SpringRequirements Engineering
MSD2 AutumnModelling and System Design
C
term
B
title
A
id1
Mark
Mark
Mark
Student.allInstances->
select(s | s.age >= 18).println();
13Preview (Query)
modules
MSD,HCI
F
MSD,RQE
E
mt506
supervisor
mt506
4
jd5023 SmithJane 22
jd501 232 ThompsonJoe
D
age
C
lastname
B
firstname
A
id1
Student Staff
E
dj5123 JacksonDaniel HCI
mt506 MSD,RQE2 ThomasMatthew
D
teaches
C
lastname
B
firstname
A
id1
Student Staff
Module
Module
Student Staff Module
Human Computer Interaction Spring4 HCI
D
RQE3 SpringRequirements Engineering
MSD2 AutumnModelling and System Design
C
term
B
title
A
id1
Mark
Mark
Mark
Student.all.
select(s | s.age >= 18).println();
14Preview (Query)
modules
MSD,HCI
F
MSD,RQE
E
mt506
supervisor
mt506
4
jd5023 SmithJane 22
jd501 232 ThompsonJoe
D
age
C
lastname
B
firstname
A
id1
Student Staff
E
dj5123 JacksonDaniel HCI
mt506 MSD,RQE2 ThomasMatthew
D
teaches
C
lastname
B
firstname
A
id1
Student Staff
Module
Module
Student Staff Module
Human Computer Interaction Spring4 HCI
D
RQE3 SpringRequirements Engineering
MSD2 AutumnModelling and System Design
C
term
B
title
A
id1
Mark
Mark
Mark
for (s in Student.all) {
if (s.age >= 18) {
s.println();
}
}
15Preview (M2T)
modules
MSD,HCI
F
MSD,RQE
E
mt506
supervisor
mt506
4
jd5023 SmithJane 22
jd501 232 ThompsonJoe
D
age
C
lastname
B
firstname
A
id1
Student Staff
E
dj5123 JacksonDaniel HCI
mt506 MSD,RQE2 ThomasMatthew
D
teaches
C
lastname
B
firstname
A
id1
Student Staff
Module
Module
Student Staff Module
Human Computer Interaction Spring4 HCI
D
RQE3 SpringRequirements Engineering
MSD2 AutumnModelling and System Design
C
term
B
title
A
id1
Mark
Mark
Mark
<ul>
[%for (s in Student.allInstances){%]
<li> [%=s.firstname] [%=s.lastname]
[%}%]
</ul>
16Preview (Validation)
context Mark {
constraint WithinRange {
check: self.mark <= 100 and
self.mark >= 0
message: “Mark ” + self.mark +
“ must be between 0-100”
}
}
Student Staff Module
Human Computer Interaction Spring4 HCI
D
RQE3 SpringRequirements Engineering
MSD2 AutumnModelling and System Design
C
term
B
title
A
id1
Mark
E
jd5023 74ICAR
jd5012 62TPOP
DC
mark
B
module
A
student1
Student Staff Module Mark
17Concept Mapping
• Spreadsheet -> Model
• Worksheet -> Type
• Column -> Property
• Row -> Model element
modules
MSD,HCI
F
MSD,RQE
E
mt506
supervisor
mt506
4
jd5023 SmithJane 22
jd501 232 ThompsonJoe
D
age
C
lastname
B
firstname
A
id1
Student Staff
ED
teaches
C
lastname
B
firstname
A
id1
Module Mark
18Limitations
• No way to specify
– Column data types
– Cross-references between columns
– Multiplicities
modules
MSD,HCI
F
MSD,RQE
E
mt506
supervisor
mt506
4
jd5023 SmithJane 22
jd501 232 ThompsonJoe
D
age
C
lastname
B
firstname
A
id1
Student Staff
E
mt506 MSD,RQE2 ThomasMatthew
D
teaches
C
lastname
B
firstname
A
id1
Module Mark
19Limitations
• No way to work with
– Title-less columns
– Worksheets with bizarre names (“Tom’s
Data”)
modules
MSD,HCI
F
MSD,RQE
E
mt506
supervisor
mt506
4
jd5023 SmithJane 22
jd501 232 ThompsonJoe
D
age
C
lastname
B
firstname
A
id1
Student Staff
E
dj5123 JacksonDaniel HCI
mt506 MSD,RQE2 ThomasMatthew
D
teaches
C
lastname
B
firstname
A
id1
Student Staff
Module
Module
Student Staff Module
Human Computer Interaction Spring4 HCI
D
RQE3 SpringRequirements Engineering
MSD2 AutumnModelling and System Design
C
term
B
title
A
id1
Mark
Mark
Mark
E
jd5023 74ICAR
jd5012 62TPOP
DC
mark
B
module
A
student1
Student Staff Module Mark
20Configuration Metamodel
Spreadsheet
Worksheet
name : String
alias : String
Column
index : Integer
name : String
alias : String
dataType : String
many : boolean
delimiter : String
Reference
name : String
many : boolean
cascadeUpdates : boolean
source
target
columns
worksheets
21Data Types
<spreadsheet>
<worksheet name=“Student”>
<column name=“age” type=“Integer”/>
</worksheet>
</spreadsheet>
modules
MSD,HCI
F
MSD,RQE
E
mt506
supervisor
mt506
4
jd5023 SmithJane 22
jd501 232 ThompsonJoe
D
age
C
lastname
B
firstname
A
id1
Student Staff
E
mt506 MSD,RQE2 ThomasMatthew
D
teaches
C
lastname
B
firstname
A
id1
Module Mark
22Data Types
Student.allInstances->
select(s | s.age >= 18)
modules
MSD,HCI
F
MSD,RQE
E
mt506
supervisor
mt506
4
jd5023 SmithJane 22
jd501 232 ThompsonJoe
D
age
C
lastname
B
firstname
A
id1
Student Staff
E
mt506 MSD,RQE2 ThomasMatthew
D
teaches
C
lastname
B
firstname
A
id1
Module Mark
23References
<spreadsheet>
<reference source=“Mark->module”
target=“Module->id”
many=“false”/>
</spreadsheet>
modules
MSD,HCI
F
MSD,RQE
E
mt506
supervisor
mt506
4
jd5023 SmithJane 22
jd501 232 ThompsonJoe
D
age
C
lastname
B
firstname
A
id1
Student Staff
E
dj5123 JacksonDaniel HCI
mt506 MSD,RQE2 ThomasMatthew
D
teaches
C
lastname
B
firstname
A
id1
Student Staff
Module
Module
Student Staff Module
Human Computer Interaction Spring4 HCI
D
RQE3 SpringRequirements Engineering
MSD2 AutumnModelling and System Design
C
term
B
title
A
id1
Mark
Mark
Mark
E
jd5023 74ICAR
jd5012 62TPOP
DC
mark
B
module
A
student1
Student Staff Module Mark
24References
Mark.allInstances
->select(m | m.mark < 40)
->collect(m | m.module.title)
->asSet();
modules
MSD,HCI
F
MSD,RQE
E
mt506
supervisor
mt506
4
jd5023 SmithJane 22
jd501 232 ThompsonJoe
D
age
C
lastname
B
firstname
A
id1
Student Staff
E
dj5123 JacksonDaniel HCI
mt506 MSD,RQE2 ThomasMatthew
D
teaches
C
lastname
B
firstname
A
id1
Student Staff
Module
Module
Student Staff Module
Human Computer Interaction Spring4 HCI
D
RQE3 SpringRequirements Engineering
MSD2 AutumnModelling and System Design
C
term
B
title
A
id1
Mark
Mark
Mark
E
jd5023 74ICAR
jd5012 62TPOP
DC
mark
B
module
A
student1
Student Staff Module Mark
25
Implementation
26eclipse.org/Epsilon
28Option #1
29Problems
• Injection of large spreadsheets can be
slow
• Propagating changes back to the
spreadsheet can be challenging
• Loss of native querying capabilities
30Option #2
• Develop a native spreadsheets driver for
Epsilon’s pluggable type system (EMC)
• Pros
– No intermediate artefacts
– No stale data
– Direct updates to the spreadsheet
– Can leverage native querying capabilities
31
32Query Translation
• Exploit the built-in querying capabilities
of Google Spreadsheets
• Example
– Find all students who have a mark higher
than 70 in some module
modules
MSD,HCI
F
MSD,RQE
E
mt506
supervisor
mt506
4
jd5023 SmithJane 22
jd501 232 ThompsonJoe
D
age
C
lastname
B
firstname
A
id1
Student Staff
E
dj5123 JacksonDaniel HCI
mt506 MSD,RQE2 ThomasMatthew
D
teaches
C
lastname
B
firstname
A
id1
Student Staff
Module
Module
Student Staff Module
Human Computer Interaction Spring4 HCI
D
RQE3 SpringRequirements Engineering
MSD2 AutumnModelling and System Design
C
term
B
title
A
id1
Mark
Mark
Mark
E
jd5023 74ICAR
jd5012 62TPOP
DC
mark
B
module
A
student1
Student Staff Module Mark
33Using select()
Mark.allInstances
->select(m | m.mark > 70);
modules
MSD,HCI
F
MSD,RQE
E
mt506
supervisor
mt506
4
jd5023 SmithJane 22
jd501 232 ThompsonJoe
D
age
C
lastname
B
firstname
A
id1
Student Staff
E
dj5123 JacksonDaniel HCI
mt506 MSD,RQE2 ThomasMatthew
D
teaches
C
lastname
B
firstname
A
id1
Student Staff
Module
Module
Student Staff Module
Human Computer Interaction Spring4 HCI
D
RQE3 SpringRequirements Engineering
MSD2 AutumnModelling and System Design
C
term
B
title
A
id1
Mark
Mark
Mark
E
jd5023 74ICAR
jd5012 62TPOP
DC
mark
B
module
A
student1
Student Staff Module Mark
34Using find()
S.find(m:Mark | m.mark > 70);
modules
MSD,HCI
F
MSD,RQE
E
mt506
supervisor
mt506
4
jd5023 SmithJane 22
jd501 232 ThompsonJoe
D
age
C
lastname
B
firstname
A
id1
Student Staff
E
dj5123 JacksonDaniel HCI
mt506 MSD,RQE2 ThomasMatthew
D
teaches
C
lastname
B
firstname
A
id1
Student Staff
Module
Module
Student Staff Module
Human Computer Interaction Spring4 HCI
D
RQE3 SpringRequirements Engineering
MSD2 AutumnModelling and System Design
C
term
B
title
A
id1
Mark
Mark
Mark
E
jd5023 74ICAR
jd5012 62TPOP
DC
mark
B
module
A
student1
Student Staff Module Mark
35Query Translation
• The implementation of find() can be
overloaded by each driver
• The Google Spreadsheets driver rewrites
the query at runtime as
– https://spreadsheets.google.com/feeds/list/tb-
<mark-worksheet-
guid>/od6/private/full?sq=mark>70
• Search is performed on the server and a
Set(Mark)is returned
– Composite queries are supported
36
37Moving to EMF
Mark.allInstances
->select(m | m.mark < 40)
->collect(m | m.module.title)
->asSet();
modules
MSD,HCI
F
MSD,RQE
E
mt506
supervisor
mt506
4
jd5023 SmithJane 22
jd501 232 ThompsonJoe
D
age
C
lastname
B
firstname
A
id1
Student Staff
E
dj5123 JacksonDaniel HCI
mt506 MSD,RQE2 ThomasMatthew
D
teaches
C
lastname
B
firstname
A
id1
Student Staff
Module
Module
Student Staff Module
Human Computer Interaction Spring4 HCI
D
RQE3 SpringRequirements Engineering
MSD2 AutumnModelling and System Design
C
term
B
title
A
id1
Mark
Mark
Mark
E
jd5023 74ICAR
jd5012 62TPOP
DC
mark
B
module
A
student1
Student Staff Module Mark
38Moving to EMF
Mark.allInstances
->select(m | m.mark < 40)
->collect(m | m.module.title)
->asSet();
39code.google.com/p/Epsilonlabs
40Take-home Message
• We need to reach out to mainstream
developers and embrace the types
of models they are using
– or risk becoming irrelevant

Adding Spreadsheets to the MDE Toolbox

  • 1.
    1 Adding Spreadsheets to theMDE Toolbox Martin Francis, D. Kolovos, N. Matragkas, R. Paige Department of Computer Science University of York
  • 2.
    2MDE • Aims toimprove the quality and efficiency of the software development process – Promotes models to first-class citizens – Reduces the need for human compilers • Not restricted to a particular modelling technology / model representation format Skip Ad>
  • 3.
    3Models in MDE •Structured artefacts that – Contain (meta-)information of interest related to the system under development – Are amenable to automated processing • Transformation • Validation • Simulation etc.
  • 4.
    4Artefacts of Interest EMF XMLXSD Spreadsheets Visio RDBMS
  • 5.
    5The MDE Community EMF XMLXSD Spreadsheets Visio RDBMS
  • 6.
  • 7.
    7Spreadsheets • Versatile andintuitive • Fill in gaps in the software development process – When no specialised tools exist for the job – When specialised tools are too expensive/complicated – When information needs to be collected from non-programmers
  • 8.
    8Spreadsheets • Used for –Capturing requirements – Tracking bugs – Allocating roles – Monitoring tasks • ... but have been largely ignored by MDE languages and tools
  • 9.
    9Aim of thisWork • Add support for (Google) spreadsheets to languages for – Model querying – Model-to-model transformation – Model validation – Model-to-text transformation – Model comparison – Model merging • ... so that spreadsheets can be used in any step of an MDE process
  • 10.
  • 11.
    11Concept Mapping • Spreadsheet-> Model • Worksheet -> Type • Column -> Property • Row -> Model element modules MSD,HCI F MSD,RQE E mt506 supervisor mt506 4 jd5023 SmithJane 22 jd501 232 ThompsonJoe D age C lastname B firstname A id1 Student Staff ED teaches C lastname B firstname A id1 Module Mark
  • 12.
    12Preview (Query) modules MSD,HCI F MSD,RQE E mt506 supervisor mt506 4 jd5023 SmithJane22 jd501 232 ThompsonJoe D age C lastname B firstname A id1 Student Staff E dj5123 JacksonDaniel HCI mt506 MSD,RQE2 ThomasMatthew D teaches C lastname B firstname A id1 Student Staff Module Module Student Staff Module Human Computer Interaction Spring4 HCI D RQE3 SpringRequirements Engineering MSD2 AutumnModelling and System Design C term B title A id1 Mark Mark Mark Student.allInstances-> select(s | s.age >= 18).println();
  • 13.
    13Preview (Query) modules MSD,HCI F MSD,RQE E mt506 supervisor mt506 4 jd5023 SmithJane22 jd501 232 ThompsonJoe D age C lastname B firstname A id1 Student Staff E dj5123 JacksonDaniel HCI mt506 MSD,RQE2 ThomasMatthew D teaches C lastname B firstname A id1 Student Staff Module Module Student Staff Module Human Computer Interaction Spring4 HCI D RQE3 SpringRequirements Engineering MSD2 AutumnModelling and System Design C term B title A id1 Mark Mark Mark Student.all. select(s | s.age >= 18).println();
  • 14.
    14Preview (Query) modules MSD,HCI F MSD,RQE E mt506 supervisor mt506 4 jd5023 SmithJane22 jd501 232 ThompsonJoe D age C lastname B firstname A id1 Student Staff E dj5123 JacksonDaniel HCI mt506 MSD,RQE2 ThomasMatthew D teaches C lastname B firstname A id1 Student Staff Module Module Student Staff Module Human Computer Interaction Spring4 HCI D RQE3 SpringRequirements Engineering MSD2 AutumnModelling and System Design C term B title A id1 Mark Mark Mark for (s in Student.all) { if (s.age >= 18) { s.println(); } }
  • 15.
    15Preview (M2T) modules MSD,HCI F MSD,RQE E mt506 supervisor mt506 4 jd5023 SmithJane22 jd501 232 ThompsonJoe D age C lastname B firstname A id1 Student Staff E dj5123 JacksonDaniel HCI mt506 MSD,RQE2 ThomasMatthew D teaches C lastname B firstname A id1 Student Staff Module Module Student Staff Module Human Computer Interaction Spring4 HCI D RQE3 SpringRequirements Engineering MSD2 AutumnModelling and System Design C term B title A id1 Mark Mark Mark <ul> [%for (s in Student.allInstances){%] <li> [%=s.firstname] [%=s.lastname] [%}%] </ul>
  • 16.
    16Preview (Validation) context Mark{ constraint WithinRange { check: self.mark <= 100 and self.mark >= 0 message: “Mark ” + self.mark + “ must be between 0-100” } } Student Staff Module Human Computer Interaction Spring4 HCI D RQE3 SpringRequirements Engineering MSD2 AutumnModelling and System Design C term B title A id1 Mark E jd5023 74ICAR jd5012 62TPOP DC mark B module A student1 Student Staff Module Mark
  • 17.
    17Concept Mapping • Spreadsheet-> Model • Worksheet -> Type • Column -> Property • Row -> Model element modules MSD,HCI F MSD,RQE E mt506 supervisor mt506 4 jd5023 SmithJane 22 jd501 232 ThompsonJoe D age C lastname B firstname A id1 Student Staff ED teaches C lastname B firstname A id1 Module Mark
  • 18.
    18Limitations • No wayto specify – Column data types – Cross-references between columns – Multiplicities modules MSD,HCI F MSD,RQE E mt506 supervisor mt506 4 jd5023 SmithJane 22 jd501 232 ThompsonJoe D age C lastname B firstname A id1 Student Staff E mt506 MSD,RQE2 ThomasMatthew D teaches C lastname B firstname A id1 Module Mark
  • 19.
    19Limitations • No wayto work with – Title-less columns – Worksheets with bizarre names (“Tom’s Data”) modules MSD,HCI F MSD,RQE E mt506 supervisor mt506 4 jd5023 SmithJane 22 jd501 232 ThompsonJoe D age C lastname B firstname A id1 Student Staff E dj5123 JacksonDaniel HCI mt506 MSD,RQE2 ThomasMatthew D teaches C lastname B firstname A id1 Student Staff Module Module Student Staff Module Human Computer Interaction Spring4 HCI D RQE3 SpringRequirements Engineering MSD2 AutumnModelling and System Design C term B title A id1 Mark Mark Mark E jd5023 74ICAR jd5012 62TPOP DC mark B module A student1 Student Staff Module Mark
  • 20.
    20Configuration Metamodel Spreadsheet Worksheet name :String alias : String Column index : Integer name : String alias : String dataType : String many : boolean delimiter : String Reference name : String many : boolean cascadeUpdates : boolean source target columns worksheets
  • 21.
    21Data Types <spreadsheet> <worksheet name=“Student”> <columnname=“age” type=“Integer”/> </worksheet> </spreadsheet> modules MSD,HCI F MSD,RQE E mt506 supervisor mt506 4 jd5023 SmithJane 22 jd501 232 ThompsonJoe D age C lastname B firstname A id1 Student Staff E mt506 MSD,RQE2 ThomasMatthew D teaches C lastname B firstname A id1 Module Mark
  • 22.
    22Data Types Student.allInstances-> select(s |s.age >= 18) modules MSD,HCI F MSD,RQE E mt506 supervisor mt506 4 jd5023 SmithJane 22 jd501 232 ThompsonJoe D age C lastname B firstname A id1 Student Staff E mt506 MSD,RQE2 ThomasMatthew D teaches C lastname B firstname A id1 Module Mark
  • 23.
    23References <spreadsheet> <reference source=“Mark->module” target=“Module->id” many=“false”/> </spreadsheet> modules MSD,HCI F MSD,RQE E mt506 supervisor mt506 4 jd5023 SmithJane22 jd501 232 ThompsonJoe D age C lastname B firstname A id1 Student Staff E dj5123 JacksonDaniel HCI mt506 MSD,RQE2 ThomasMatthew D teaches C lastname B firstname A id1 Student Staff Module Module Student Staff Module Human Computer Interaction Spring4 HCI D RQE3 SpringRequirements Engineering MSD2 AutumnModelling and System Design C term B title A id1 Mark Mark Mark E jd5023 74ICAR jd5012 62TPOP DC mark B module A student1 Student Staff Module Mark
  • 24.
    24References Mark.allInstances ->select(m | m.mark< 40) ->collect(m | m.module.title) ->asSet(); modules MSD,HCI F MSD,RQE E mt506 supervisor mt506 4 jd5023 SmithJane 22 jd501 232 ThompsonJoe D age C lastname B firstname A id1 Student Staff E dj5123 JacksonDaniel HCI mt506 MSD,RQE2 ThomasMatthew D teaches C lastname B firstname A id1 Student Staff Module Module Student Staff Module Human Computer Interaction Spring4 HCI D RQE3 SpringRequirements Engineering MSD2 AutumnModelling and System Design C term B title A id1 Mark Mark Mark E jd5023 74ICAR jd5012 62TPOP DC mark B module A student1 Student Staff Module Mark
  • 25.
  • 26.
  • 27.
  • 28.
    29Problems • Injection oflarge spreadsheets can be slow • Propagating changes back to the spreadsheet can be challenging • Loss of native querying capabilities
  • 29.
    30Option #2 • Developa native spreadsheets driver for Epsilon’s pluggable type system (EMC) • Pros – No intermediate artefacts – No stale data – Direct updates to the spreadsheet – Can leverage native querying capabilities
  • 30.
  • 31.
    32Query Translation • Exploitthe built-in querying capabilities of Google Spreadsheets • Example – Find all students who have a mark higher than 70 in some module modules MSD,HCI F MSD,RQE E mt506 supervisor mt506 4 jd5023 SmithJane 22 jd501 232 ThompsonJoe D age C lastname B firstname A id1 Student Staff E dj5123 JacksonDaniel HCI mt506 MSD,RQE2 ThomasMatthew D teaches C lastname B firstname A id1 Student Staff Module Module Student Staff Module Human Computer Interaction Spring4 HCI D RQE3 SpringRequirements Engineering MSD2 AutumnModelling and System Design C term B title A id1 Mark Mark Mark E jd5023 74ICAR jd5012 62TPOP DC mark B module A student1 Student Staff Module Mark
  • 32.
    33Using select() Mark.allInstances ->select(m |m.mark > 70); modules MSD,HCI F MSD,RQE E mt506 supervisor mt506 4 jd5023 SmithJane 22 jd501 232 ThompsonJoe D age C lastname B firstname A id1 Student Staff E dj5123 JacksonDaniel HCI mt506 MSD,RQE2 ThomasMatthew D teaches C lastname B firstname A id1 Student Staff Module Module Student Staff Module Human Computer Interaction Spring4 HCI D RQE3 SpringRequirements Engineering MSD2 AutumnModelling and System Design C term B title A id1 Mark Mark Mark E jd5023 74ICAR jd5012 62TPOP DC mark B module A student1 Student Staff Module Mark
  • 33.
    34Using find() S.find(m:Mark |m.mark > 70); modules MSD,HCI F MSD,RQE E mt506 supervisor mt506 4 jd5023 SmithJane 22 jd501 232 ThompsonJoe D age C lastname B firstname A id1 Student Staff E dj5123 JacksonDaniel HCI mt506 MSD,RQE2 ThomasMatthew D teaches C lastname B firstname A id1 Student Staff Module Module Student Staff Module Human Computer Interaction Spring4 HCI D RQE3 SpringRequirements Engineering MSD2 AutumnModelling and System Design C term B title A id1 Mark Mark Mark E jd5023 74ICAR jd5012 62TPOP DC mark B module A student1 Student Staff Module Mark
  • 34.
    35Query Translation • Theimplementation of find() can be overloaded by each driver • The Google Spreadsheets driver rewrites the query at runtime as – https://spreadsheets.google.com/feeds/list/tb- <mark-worksheet- guid>/od6/private/full?sq=mark>70 • Search is performed on the server and a Set(Mark)is returned – Composite queries are supported
  • 35.
  • 36.
    37Moving to EMF Mark.allInstances ->select(m| m.mark < 40) ->collect(m | m.module.title) ->asSet(); modules MSD,HCI F MSD,RQE E mt506 supervisor mt506 4 jd5023 SmithJane 22 jd501 232 ThompsonJoe D age C lastname B firstname A id1 Student Staff E dj5123 JacksonDaniel HCI mt506 MSD,RQE2 ThomasMatthew D teaches C lastname B firstname A id1 Student Staff Module Module Student Staff Module Human Computer Interaction Spring4 HCI D RQE3 SpringRequirements Engineering MSD2 AutumnModelling and System Design C term B title A id1 Mark Mark Mark E jd5023 74ICAR jd5012 62TPOP DC mark B module A student1 Student Staff Module Mark
  • 37.
    38Moving to EMF Mark.allInstances ->select(m| m.mark < 40) ->collect(m | m.module.title) ->asSet();
  • 38.
  • 39.
    40Take-home Message • Weneed to reach out to mainstream developers and embrace the types of models they are using – or risk becoming irrelevant