SlideShare a Scribd company logo
1 of 20
Université catholique de Louvain (UCL) 
Louvain Interaction Laboratory (LiLab) 
Place des Doyens, 1 
B-1348 Louvain-la-Neuve (Belgium) 
FlexClock, a Plastic Clock Written 
in Oz with the QTk toolkit 
by 
Donatien Grolaux, Peter Van Roy, & 
Jean Vanderdonckt 
Department of Computing Science and Engineering
What interface builders can do 
 Difference between « what application 
needs » and « what interface builder 
offer »
Code generators 
 From declarative specifications 
– « What » instead of « how to ». 
– Limited to UI known before the execution of 
the application. 
– Artificial gate between declaration part and 
imperative part
QTk approach 
 Mixing declarative and imperative approaches 
inside the same programming language : 
– User can choose between « what » and « how to » : 
– Where QTk offers a declarative support, e.g. at GUI 
construction. 
– As they see best fit their purpose. 
 Programming language requirement : 
– Inline declarations of arbitrary parameters ⇒ 
symbolic data structure with a dictionary structure 
(key → value)
Mozart 
 Oz records : 
label(feature1:value1 … featureX:valueX) 
 Full language support : 
– Label extraction/replacement 
– Add/remove/replace one/many feature(s) 
– Iteration on features 
– Transformation into/from list 
– … 
 Good candidates for declarative specifications 
of GUIs
QTk example (1) 
td(lr(label(text:"Enter your name") entry(handle:E)) 
button(text:"Ok" action:Ok)) 
... 
{E set(text:"Type here")} 
... 
Result={E get(text:$)}
QTk example (2) 
placeholder(handle:P) 
… 
{P set(label(text:"Hello"))} 
… 
{P set(label(text:“World"))}
FlexClock 
 What’s FlexClock? 
 Information needed to define a view : 
– UI construction declaration 
– Update procedure 
– Size information 
 17 views = 60 declarative lines + 40 imperative lines 
 View specification code sample : 
r(desc: label(handle:H1 glue:nswe bg:white) 
refresh: proc{$ T} {H1 set(text:{FmtTime T})} end 
area: 40#10)
FlexClock: different views
FlexClock: calendar widget 
 UI declared using Oz's natural data structures : records and lists ⇒ 
complete language support for creation/manipulation at runtime. 
lr(label(text:"Mo") label(text:"Tu") ... label(text:"Su") 
newline 
lrline(glue:we) lrline(glue:we) ... lrline(glue:we) 
newline 
empty label(text: "1") ... label(text: "6") 
newline 
label(bg:black fg:white text:"7") ... label(text:"13") 
newline 
label(text:"14") label(text:"15") ... label(text:"20") 
newline 
label(text:"21") label(text:"22") ... label(text:"27") 
newline 
label(text:"28") label(text:"29") label(text:"30"))
Definition of view
Software Probe for Plasticity (G. Calvary)
Probe 
 Initial purpose: 
software 
mechanism that is 
responsible to 
detect any change 
of the context of 
use 
 FlexClock: 
– No probe into the 
functional core 
– Event generated 
proc{Place} 
when size changes 
WW={QTk.wInfo width(P)} 
WH={QTk.wInfo height(P)} 
_#Handle={List.foldRInd Views 
fun{$ I W#H#Handle Max#CH} 
This=(W-WW)*(W-WW)+(H-WH)*(H-WH) 
in 
if W<WW andthen H<WH andthen 
(Max==inf orelse This<Max) 
then 
This#Handle 
else 
Max#CH 
end 
end 
inf#local (_#_#H)|_=Views in H end} 
in 
{P set(Handle)} 
end 
{P bind(event:'<Configure>' 
action:Place)}
Plasticity domain 
 Initial definition 
 FlexClock
Current and Next Contexts 
 Initial definition: they respectively 
capture the current context of use and 
the one that will be produced after some 
detection of a change 
 FlexClock: 
– No current context 
– Next context: is directly computed, but not 
stored
Selection rules 
 Initial definition: reaction to a change of 
context, selecting the most appropriate 
– Prologue 
– Reaction 
– Epilogue 
 FlexClock: 
– No prologue 
– Computation of a new layout resulting from the 
change of window size 
– No epilogue
Calculation of the reaction
Calculation of the reaction 
proc{Place} 
WW={QTk.wInfo width(P)} 
WH={QTk.wInfo height(P)} 
_#Handle={List.foldRInd Views 
fun{$ I W#H#Handle Max#CH} 
This=(W-WW)*(W-WW)+(H-WH)*(H-WH) 
in 
if W<WW andthen H<WH andthen 
(Max==inf orelse This<Max) 
then 
This#Handle 
else 
Max#CH 
end 
end 
inf#local (_#_#H)|_=Views in H end} 
in 
{P set(Handle)} 
end 
{P bind(event:'<Configure>' 
action:Place)} 
Returns the handle of the 
New layout 
Selection rule 
Code which changes 
The new layout
History mechanism 
 Initial definition: it records context 
transitions along with their migration 
costs as the user runs the system 
 FlexClock: none
Conclusion 
 FlexClock is 
– Plastic 
– Multi-platform 
– Generated at run-time 
– Uses the software probe

More Related Content

What's hot

CodeFest 2014. Axel Rauschmayer — JavaScript’s variables: scopes, environment...
CodeFest 2014. Axel Rauschmayer — JavaScript’s variables: scopes, environment...CodeFest 2014. Axel Rauschmayer — JavaScript’s variables: scopes, environment...
CodeFest 2014. Axel Rauschmayer — JavaScript’s variables: scopes, environment...
CodeFest
 
Presentation mcrl2
Presentation mcrl2Presentation mcrl2
Presentation mcrl2
matifch
 

What's hot (20)

Luis Atencio on RxJS
Luis Atencio on RxJSLuis Atencio on RxJS
Luis Atencio on RxJS
 
Towards hasktorch 1.0
Towards hasktorch 1.0Towards hasktorch 1.0
Towards hasktorch 1.0
 
NS2 Object Construction
NS2 Object ConstructionNS2 Object Construction
NS2 Object Construction
 
RxJS Evolved
RxJS EvolvedRxJS Evolved
RxJS Evolved
 
DConf 2016: Bitpacking Like a Madman by Amaury Sechet
DConf 2016: Bitpacking Like a Madman by Amaury SechetDConf 2016: Bitpacking Like a Madman by Amaury Sechet
DConf 2016: Bitpacking Like a Madman by Amaury Sechet
 
F# Presentation for SmartDevs, Hereford
F# Presentation for SmartDevs, HerefordF# Presentation for SmartDevs, Hereford
F# Presentation for SmartDevs, Hereford
 
CodeFest 2014. Axel Rauschmayer — JavaScript’s variables: scopes, environment...
CodeFest 2014. Axel Rauschmayer — JavaScript’s variables: scopes, environment...CodeFest 2014. Axel Rauschmayer — JavaScript’s variables: scopes, environment...
CodeFest 2014. Axel Rauschmayer — JavaScript’s variables: scopes, environment...
 
Programming the cloud with Skywriting
Programming the cloud with SkywritingProgramming the cloud with Skywriting
Programming the cloud with Skywriting
 
201801 CSE240 Lecture 12
201801 CSE240 Lecture 12201801 CSE240 Lecture 12
201801 CSE240 Lecture 12
 
Wcbpijwbpij new
Wcbpijwbpij newWcbpijwbpij new
Wcbpijwbpij new
 
Clojure+ClojureScript Webapps
Clojure+ClojureScript WebappsClojure+ClojureScript Webapps
Clojure+ClojureScript Webapps
 
Learn basics of Clojure/script and Reagent
Learn basics of Clojure/script and ReagentLearn basics of Clojure/script and Reagent
Learn basics of Clojure/script and Reagent
 
Vasia Kalavri – Training: Gelly School
Vasia Kalavri – Training: Gelly School Vasia Kalavri – Training: Gelly School
Vasia Kalavri – Training: Gelly School
 
vbscript-reference book
vbscript-reference bookvbscript-reference book
vbscript-reference book
 
201801 CSE240 Lecture 13
201801 CSE240 Lecture 13201801 CSE240 Lecture 13
201801 CSE240 Lecture 13
 
MCRL2
MCRL2MCRL2
MCRL2
 
Building a Tagless Final DSL for WebGL
Building a Tagless Final DSL for WebGLBuilding a Tagless Final DSL for WebGL
Building a Tagless Final DSL for WebGL
 
Presentation mcrl2
Presentation mcrl2Presentation mcrl2
Presentation mcrl2
 
Solidity
SoliditySolidity
Solidity
 
Reactive x
Reactive xReactive x
Reactive x
 

Similar to FlexClock, a Plastic Clock Written in Oz with the QTk toolkit

Maximilian Michels – Google Cloud Dataflow on Top of Apache Flink
Maximilian Michels – Google Cloud Dataflow on Top of Apache FlinkMaximilian Michels – Google Cloud Dataflow on Top of Apache Flink
Maximilian Michels – Google Cloud Dataflow on Top of Apache Flink
Flink Forward
 
Web Data Extraction Como2010
Web Data Extraction Como2010Web Data Extraction Como2010
Web Data Extraction Como2010
Giorgio Orsi
 

Similar to FlexClock, a Plastic Clock Written in Oz with the QTk toolkit (20)

Maximilian Michels – Google Cloud Dataflow on Top of Apache Flink
Maximilian Michels – Google Cloud Dataflow on Top of Apache FlinkMaximilian Michels – Google Cloud Dataflow on Top of Apache Flink
Maximilian Michels – Google Cloud Dataflow on Top of Apache Flink
 
Progscon 2017: Taming the wild fronteer - Adventures in Clojurescript
Progscon 2017: Taming the wild fronteer - Adventures in ClojurescriptProgscon 2017: Taming the wild fronteer - Adventures in Clojurescript
Progscon 2017: Taming the wild fronteer - Adventures in Clojurescript
 
Functional Programming You Already Know
Functional Programming You Already KnowFunctional Programming You Already Know
Functional Programming You Already Know
 
GDG Jakarta Meetup - Streaming Analytics With Apache Beam
GDG Jakarta Meetup - Streaming Analytics With Apache BeamGDG Jakarta Meetup - Streaming Analytics With Apache Beam
GDG Jakarta Meetup - Streaming Analytics With Apache Beam
 
Introducing BinarySortedMultiMap - A new Flink state primitive to boost your ...
Introducing BinarySortedMultiMap - A new Flink state primitive to boost your ...Introducing BinarySortedMultiMap - A new Flink state primitive to boost your ...
Introducing BinarySortedMultiMap - A new Flink state primitive to boost your ...
 
A Future for R: Parallel and Distributed Processing in R for Everyone
A Future for R: Parallel and Distributed Processing in R for EveryoneA Future for R: Parallel and Distributed Processing in R for Everyone
A Future for R: Parallel and Distributed Processing in R for Everyone
 
Web Data Extraction Como2010
Web Data Extraction Como2010Web Data Extraction Como2010
Web Data Extraction Como2010
 
ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...
ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...
ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...
 
Extending Flux to Support Other Databases and Data Stores | Adam Anthony | In...
Extending Flux to Support Other Databases and Data Stores | Adam Anthony | In...Extending Flux to Support Other Databases and Data Stores | Adam Anthony | In...
Extending Flux to Support Other Databases and Data Stores | Adam Anthony | In...
 
CQL
CQLCQL
CQL
 
CQL: declarative language for context activation
CQL: declarative language for context activationCQL: declarative language for context activation
CQL: declarative language for context activation
 
Software Language Design & Engineering
Software Language Design & EngineeringSoftware Language Design & Engineering
Software Language Design & Engineering
 
Anais Dotis-Georgiou & Faith Chikwekwe [InfluxData] | Top 10 Hurdles for Flux...
Anais Dotis-Georgiou & Faith Chikwekwe [InfluxData] | Top 10 Hurdles for Flux...Anais Dotis-Georgiou & Faith Chikwekwe [InfluxData] | Top 10 Hurdles for Flux...
Anais Dotis-Georgiou & Faith Chikwekwe [InfluxData] | Top 10 Hurdles for Flux...
 
Qt Workshop
Qt WorkshopQt Workshop
Qt Workshop
 
Reactive programming every day
Reactive programming every dayReactive programming every day
Reactive programming every day
 
Software Language Design & Engineering: Mobl & Spoofax
Software Language Design & Engineering: Mobl & SpoofaxSoftware Language Design & Engineering: Mobl & Spoofax
Software Language Design & Engineering: Mobl & Spoofax
 
Talk - Query monad
Talk - Query monad Talk - Query monad
Talk - Query monad
 
Job Queue in Golang
Job Queue in GolangJob Queue in Golang
Job Queue in Golang
 
24-TensorFlow-Clipper.pptxnjjjjnjjjjjjmm
24-TensorFlow-Clipper.pptxnjjjjnjjjjjjmm24-TensorFlow-Clipper.pptxnjjjjnjjjjjjmm
24-TensorFlow-Clipper.pptxnjjjjnjjjjjjmm
 
Introduction to Map-Reduce Programming with Hadoop
Introduction to Map-Reduce Programming with HadoopIntroduction to Map-Reduce Programming with Hadoop
Introduction to Map-Reduce Programming with Hadoop
 

More from Jean Vanderdonckt

Engineering the Transition of Interactive Collaborative Software from Cloud C...
Engineering the Transition of Interactive Collaborative Software from Cloud C...Engineering the Transition of Interactive Collaborative Software from Cloud C...
Engineering the Transition of Interactive Collaborative Software from Cloud C...
Jean Vanderdonckt
 
UsyBus: A Communication Framework among Reusable Agents integrating Eye-Track...
UsyBus: A Communication Framework among Reusable Agents integrating Eye-Track...UsyBus: A Communication Framework among Reusable Agents integrating Eye-Track...
UsyBus: A Communication Framework among Reusable Agents integrating Eye-Track...
Jean Vanderdonckt
 

More from Jean Vanderdonckt (20)

To the end of our possibilities with Adaptive User Interfaces
To the end of our possibilities with Adaptive User InterfacesTo the end of our possibilities with Adaptive User Interfaces
To the end of our possibilities with Adaptive User Interfaces
 
Engineering the Transition of Interactive Collaborative Software from Cloud C...
Engineering the Transition of Interactive Collaborative Software from Cloud C...Engineering the Transition of Interactive Collaborative Software from Cloud C...
Engineering the Transition of Interactive Collaborative Software from Cloud C...
 
UsyBus: A Communication Framework among Reusable Agents integrating Eye-Track...
UsyBus: A Communication Framework among Reusable Agents integrating Eye-Track...UsyBus: A Communication Framework among Reusable Agents integrating Eye-Track...
UsyBus: A Communication Framework among Reusable Agents integrating Eye-Track...
 
µV: An Articulation, Rotation, Scaling, and Translation Invariant (ARST) Mult...
µV: An Articulation, Rotation, Scaling, and Translation Invariant (ARST) Mult...µV: An Articulation, Rotation, Scaling, and Translation Invariant (ARST) Mult...
µV: An Articulation, Rotation, Scaling, and Translation Invariant (ARST) Mult...
 
RepliGES and GEStory: Visual Tools for Systematizing and Consolidating Knowle...
RepliGES and GEStory: Visual Tools for Systematizing and Consolidating Knowle...RepliGES and GEStory: Visual Tools for Systematizing and Consolidating Knowle...
RepliGES and GEStory: Visual Tools for Systematizing and Consolidating Knowle...
 
Gesture-based information systems: from DesignOps to DevOps
Gesture-based information systems: from DesignOps to DevOpsGesture-based information systems: from DesignOps to DevOps
Gesture-based information systems: from DesignOps to DevOps
 
Engineering Slidable User Interfaces with Slime
Engineering Slidable User Interfaces with SlimeEngineering Slidable User Interfaces with Slime
Engineering Slidable User Interfaces with Slime
 
Evaluating Gestural Interaction: Models, Methods, and Measures
Evaluating Gestural Interaction: Models, Methods, and MeasuresEvaluating Gestural Interaction: Models, Methods, and Measures
Evaluating Gestural Interaction: Models, Methods, and Measures
 
Conducting a Gesture Elicitation Study: How to Get the Best Gestures From Peo...
Conducting a Gesture Elicitation Study: How to Get the Best Gestures From Peo...Conducting a Gesture Elicitation Study: How to Get the Best Gestures From Peo...
Conducting a Gesture Elicitation Study: How to Get the Best Gestures From Peo...
 
Designing Gestural Interaction: Challenges and Pitfalls
Designing Gestural Interaction: Challenges and PitfallsDesigning Gestural Interaction: Challenges and Pitfalls
Designing Gestural Interaction: Challenges and Pitfalls
 
Fundamentals of Gestural Interaction
Fundamentals of Gestural InteractionFundamentals of Gestural Interaction
Fundamentals of Gestural Interaction
 
Gestural Interaction, Is it Really Natural?
Gestural Interaction, Is it Really Natural?Gestural Interaction, Is it Really Natural?
Gestural Interaction, Is it Really Natural?
 
User-centred Development of a Clinical Decision-support System for Breast Can...
User-centred Development of a Clinical Decision-support System for Breast Can...User-centred Development of a Clinical Decision-support System for Breast Can...
User-centred Development of a Clinical Decision-support System for Breast Can...
 
Simplifying the Development of Cross-Platform Web User Interfaces by Collabo...
Simplifying the Development of  Cross-Platform Web User Interfaces by Collabo...Simplifying the Development of  Cross-Platform Web User Interfaces by Collabo...
Simplifying the Development of Cross-Platform Web User Interfaces by Collabo...
 
Attach Me, Detach Me, Assemble Me like you Work
Attach Me, Detach Me, Assemble Me like you WorkAttach Me, Detach Me, Assemble Me like you Work
Attach Me, Detach Me, Assemble Me like you Work
 
The Impact of Comfortable Viewing Positions on Smart TV Gestures
The Impact of Comfortable Viewing Positions on Smart TV GesturesThe Impact of Comfortable Viewing Positions on Smart TV Gestures
The Impact of Comfortable Viewing Positions on Smart TV Gestures
 
Head and Shoulders Gestures: Exploring User-De fined Gestures with Upper Body
Head and Shoulders Gestures: Exploring User-Defined Gestures with Upper BodyHead and Shoulders Gestures: Exploring User-Defined Gestures with Upper Body
Head and Shoulders Gestures: Exploring User-De fined Gestures with Upper Body
 
G-Menu: A Keyword-by-Gesture based Dynamic Menu Interface for Smartphones
G-Menu: A Keyword-by-Gesture based Dynamic Menu Interface for SmartphonesG-Menu: A Keyword-by-Gesture based Dynamic Menu Interface for Smartphones
G-Menu: A Keyword-by-Gesture based Dynamic Menu Interface for Smartphones
 
Vector-based, Structure Preserving Stroke Gesture Recognition
Vector-based, Structure Preserving Stroke Gesture RecognitionVector-based, Structure Preserving Stroke Gesture Recognition
Vector-based, Structure Preserving Stroke Gesture Recognition
 
An ontology for reasoning on body-based gestures
 An ontology for reasoning on body-based gestures An ontology for reasoning on body-based gestures
An ontology for reasoning on body-based gestures
 

Recently uploaded

%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 
Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...
Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...
Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 

Recently uploaded (20)

%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...
Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...
Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
WSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - KanchanaWSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - Kanchana
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 

FlexClock, a Plastic Clock Written in Oz with the QTk toolkit

  • 1. Université catholique de Louvain (UCL) Louvain Interaction Laboratory (LiLab) Place des Doyens, 1 B-1348 Louvain-la-Neuve (Belgium) FlexClock, a Plastic Clock Written in Oz with the QTk toolkit by Donatien Grolaux, Peter Van Roy, & Jean Vanderdonckt Department of Computing Science and Engineering
  • 2. What interface builders can do  Difference between « what application needs » and « what interface builder offer »
  • 3. Code generators  From declarative specifications – « What » instead of « how to ». – Limited to UI known before the execution of the application. – Artificial gate between declaration part and imperative part
  • 4. QTk approach  Mixing declarative and imperative approaches inside the same programming language : – User can choose between « what » and « how to » : – Where QTk offers a declarative support, e.g. at GUI construction. – As they see best fit their purpose.  Programming language requirement : – Inline declarations of arbitrary parameters ⇒ symbolic data structure with a dictionary structure (key → value)
  • 5. Mozart  Oz records : label(feature1:value1 … featureX:valueX)  Full language support : – Label extraction/replacement – Add/remove/replace one/many feature(s) – Iteration on features – Transformation into/from list – …  Good candidates for declarative specifications of GUIs
  • 6. QTk example (1) td(lr(label(text:"Enter your name") entry(handle:E)) button(text:"Ok" action:Ok)) ... {E set(text:"Type here")} ... Result={E get(text:$)}
  • 7. QTk example (2) placeholder(handle:P) … {P set(label(text:"Hello"))} … {P set(label(text:“World"))}
  • 8. FlexClock  What’s FlexClock?  Information needed to define a view : – UI construction declaration – Update procedure – Size information  17 views = 60 declarative lines + 40 imperative lines  View specification code sample : r(desc: label(handle:H1 glue:nswe bg:white) refresh: proc{$ T} {H1 set(text:{FmtTime T})} end area: 40#10)
  • 10. FlexClock: calendar widget  UI declared using Oz's natural data structures : records and lists ⇒ complete language support for creation/manipulation at runtime. lr(label(text:"Mo") label(text:"Tu") ... label(text:"Su") newline lrline(glue:we) lrline(glue:we) ... lrline(glue:we) newline empty label(text: "1") ... label(text: "6") newline label(bg:black fg:white text:"7") ... label(text:"13") newline label(text:"14") label(text:"15") ... label(text:"20") newline label(text:"21") label(text:"22") ... label(text:"27") newline label(text:"28") label(text:"29") label(text:"30"))
  • 12. Software Probe for Plasticity (G. Calvary)
  • 13. Probe  Initial purpose: software mechanism that is responsible to detect any change of the context of use  FlexClock: – No probe into the functional core – Event generated proc{Place} when size changes WW={QTk.wInfo width(P)} WH={QTk.wInfo height(P)} _#Handle={List.foldRInd Views fun{$ I W#H#Handle Max#CH} This=(W-WW)*(W-WW)+(H-WH)*(H-WH) in if W<WW andthen H<WH andthen (Max==inf orelse This<Max) then This#Handle else Max#CH end end inf#local (_#_#H)|_=Views in H end} in {P set(Handle)} end {P bind(event:'<Configure>' action:Place)}
  • 14. Plasticity domain  Initial definition  FlexClock
  • 15. Current and Next Contexts  Initial definition: they respectively capture the current context of use and the one that will be produced after some detection of a change  FlexClock: – No current context – Next context: is directly computed, but not stored
  • 16. Selection rules  Initial definition: reaction to a change of context, selecting the most appropriate – Prologue – Reaction – Epilogue  FlexClock: – No prologue – Computation of a new layout resulting from the change of window size – No epilogue
  • 17. Calculation of the reaction
  • 18. Calculation of the reaction proc{Place} WW={QTk.wInfo width(P)} WH={QTk.wInfo height(P)} _#Handle={List.foldRInd Views fun{$ I W#H#Handle Max#CH} This=(W-WW)*(W-WW)+(H-WH)*(H-WH) in if W<WW andthen H<WH andthen (Max==inf orelse This<Max) then This#Handle else Max#CH end end inf#local (_#_#H)|_=Views in H end} in {P set(Handle)} end {P bind(event:'<Configure>' action:Place)} Returns the handle of the New layout Selection rule Code which changes The new layout
  • 19. History mechanism  Initial definition: it records context transitions along with their migration costs as the user runs the system  FlexClock: none
  • 20. Conclusion  FlexClock is – Plastic – Multi-platform – Generated at run-time – Uses the software probe