SlideShare a Scribd company logo
1 of 32
Download to read offline
Scl :
a Simple, Uniform and Operational Language
for Component-Oriented Programming
in Smalltalk
Luc Fabresse Christophe Dony Marianne Huchard
LIRMM
Universit´e Montpellier 2
France
September 3, 2006
Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 1 / 32
Outline
1 Context
2 A Short Overview of Scl
3 The Connection Mechanism
4 AOP Support Using Connectors
5 Publish/Subscribe Support Using Properties
6 Conclusions
Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 2 / 32
Outline
1 Context
2 A Short Overview of Scl
3 The Connection Mechanism
4 AOP Support Using Connectors
5 Publish/Subscribe Support Using Properties
6 Conclusions
Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 3 / 32
The High-Level View of CBSD
Component
Component Library
Application
Programmer Architect
creates
stored used
D
A
D
creates
B
A C
D
Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 4 / 32
Current Issues in CBSD
Fundamental Questions
What is a component? [Szyperski, 1996]
Component structure?
Component composition?
Practical Needs
Models
Languages
Tools
Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 5 / 32
Outline
1 Context
2 A Short Overview of Scl
3 The Connection Mechanism
4 AOP Support Using Connectors
5 Publish/Subscribe Support Using Properties
6 Conclusions
Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 6 / 32
Simple Component Language (Scl)
What is Scl?
A component-oriented programming language
Main purposes of Scl
Simple, few and only fundamental entities
Uniform, not an asymmetric extension of an object-oriented language
Enables unanticipated composition of independently developed
components
Synthesis of existing component-oriented languages ideas
Operationnal, implemented in Smalltalk
Extensible to experiment new ideas
Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 7 / 32
Basic Entities (1/2)
Component
Black box
Ports decribed by interfaces
Provides and requires services
Port
Interaction point
Plug
Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 8 / 32
Basic Entities (1/2)
Service
Functionnality
Like a method or a set of methods
Interface
Describes the valid uses of a port
Service signatures sets, protocols, contracts, ...
Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 9 / 32
Example : a chatclient component
Chatting
ChatClient
Interface
Orientation
Port
Caption:
Networking
connect:
disconnect
sendData:
receiveData
join:
leave
send:
Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 10 / 32
1 Context
2 A Short Overview of Scl
3 The Connection Mechanism
4 AOP Support Using Connectors
5 Publish/Subscribe Support Using Properties
6 Conclusions
Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 11 / 32
The Connector entity
Connector = Reification of Connection
Better separation
Non-fixed connection semantics
Solves adaptation problems
Possible creation of a reusable library of connectors
The General Connector Structure
Sources, a set of ports
Targets, a set of ports
Glue code
Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 12 / 32
A Graphical View of a Connector
<<SclConnector>>
Required Provided
Ports
glue code
Sources Targets
Ports
Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 13 / 32
Example: Connection of two matching components
<<SclBinaryConnector>>
Chatting
Source
ConnectionManager
Target
ChatClient
Networking Networking
SclBinaryConnector new
source: ( chatClient port: #Networking )
target: ( connectionManager port: #Networking ) ;
connect
Similar to:
bindings in Fractal
connect primitive in Archjava
Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 14 / 32
Example: Connection of two Components with Adaptation
ChatClient
Networking Networking
<<SclBinaryConnector>>
Code glue
Chatting
Source
ConnectionManager
Target
connect:
disconnect
sendData:
receiveData
closeConnection
openConnectionTo:
send:
receive:
Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 15 / 32
Example: Connection of two Components with Adaptation
receive
sendData:
closeConnection
openConnectionTo:
Target
send:
disconnect
connect:
ChatClient
Networking Networking
<<SclBinaryConnector>>
Code glue
Chatting
Source
ConnectionManager
receiveData:
SclBinaryConnector new
source: ( chatClient port: #Networking )
target: ( connectionManager port: #Networking )
glue: [ :source :target :message |
(message selector = #connect:) ifTrue: [
^ target openConnectionTo: (message arguments)
]
... "some more stuff"
] ; connect.
Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 16 / 32
1 Context
2 A Short Overview of Scl
3 The Connection Mechanism
4 AOP Support Using Connectors
5 Publish/Subscribe Support Using Properties
6 Conclusions
Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 17 / 32
Mixing AOP and Component Appoaches
Why?
Encapsulate the scaterred code of specific concerns (Log, Transaction,...)
How?
Asymmetric approaches
Symmetric approaches
Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 18 / 32
Limited AOP support in Scl
Joint Points on Ports
before/after/around service invocation
before/after/around connection/disconnection
Special Connectors
Source ports are coupled with a keyword (beforeServiceInvocation, ...)
Weaving
Regular connection/disconnection mechanism
Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 19 / 32
Example: A Logger component
LoggerChatClient
Networking Chatting
log:
<<beforeSI>>
Logging
glue code
<<SclFlowConnector>>
SclFlowBinaryConnector new
source: ( (chatClient port: #Chatting) beforeServiceInvocation )
target: ( logger port: #Logging )
glue: [ :source :target :message |
target log: (message selector asString)
] ; connect.
Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 20 / 32
1 Context
2 A Short Overview of Scl
3 The Connection Mechanism
4 AOP Support Using Connectors
5 Publish/Subscribe Support Using Properties
6 Conclusions
Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 21 / 32
Motivating Example (1/2)
How to connect a chatclient component with a GUI component ?
Chatting
Accessing
chatText
chatText:
displayText
displayText:
ChatClient
Networking
TextArea
Accessing
Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 22 / 32
Motivating Example (2/2)
How to connect a chatclient component with a GUI component ?
ChatClient
Networking
Notifying
TextArea
Accessing
chatTextChanged:
Chatting
Accessing
chatText
chatText:
displayText
displayText:
Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 23 / 32
The limitations with components
Publisher side limitations
Event signaling (Archjava, CCM, ...)
Subscribers management (Javabeans, ...)
Subscriber side limitations
Receivable events (CCM, ...)
Subscriber reaction
Goal
Extract the application dependent code from components
Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 24 / 32
The Scl Solution Based on Properties
Property
External state of a component (Javabeans)
Automatically notifies its value changes if needed
Only declared by the component programmer
Property Structure:
A name
An access port provides getter and setter services
A notification port to invoke notifying services
Notifying services
Notify Before Change, nbc:value:oldValue:
Notify After Change, nac:value:oldValue:
...
Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 25 / 32
Example: The chat client component with a ChatText
property
SCLCOM PON E N TBU I LDE R create: # ChatClient
properties: ’ c h a tT e x t nickName ’.
outPorts: ’ Networking ’ inPorts: ’ Chatting ’.
CH ATCL IEN T>>init ” p r e s e n t e d in Figure 3”
CH ATCL IEN T>>primitivechatText
” i n t e r n a l component accessor d e f i n e d by the
programmer and used by the generated c h a t T e x t
p r o p e r t y accessor ”
chatText ifNil: [ chatText := ’ ’ ].
ˆchatText
CH ATCL IEN T>>primitivechatText: newV
chatText := newV
CH ATCL IEN T>>primitivenickName
nickName ifNil: [ nickName := ’ anonymous ’ ].
ˆnickName
nbc:value:oldValue:
chatText:
nac:value:oldValue:
ChatClient
Chatting
ChatText
Networking
chatText
Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 26 / 32
States changes connections
Standard connections
Based on connectors (ports + glue code)
Source ports are notifying ports of properties
Features
Uniformity
Extensibility
Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 27 / 32
Example: The whole chat client application
P
P
ChatClient
Networking
Chatting
ChatText
NickName
ChatClientGui
Networking
NetworkManager
<<SclBinaryNacConnector>>
Displaying
Sending
<<SclBinaryNacConnector>>
SclBinaryNacConnector new
source: ( chatClient notifyPortOf: #ChatText )
target: ( chatClientGui port: #Displaying )
glue: [ :source :gui :anInvocation |
gui displayText: anInvocation arguments second
] ; connect.
Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 28 / 32
Implementation of Scl
Advantages of Smalltalk
Prototyping is easier and faster than in statically typed languages
The meta-level enables message interceptions, addition of new entities
(Component, Connector, ...), ...
Block can be used for representing glue code
A step to investigate what could be a dynamic component oriented
language
Difficulty(ies) with Smalltalk
Encapsulation
Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 29 / 32
Outline
1 Context
2 A Short Overview of Scl
3 The Connection Mechanism
4 AOP Support Using Connectors
5 Publish/Subscribe Support Using Properties
6 Conclusions
Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 30 / 32
Conclusions
Scl
A component-oriented language
Only one entity of reuse: Component
Component Composition
Connections based on Connectors
AOP support using Connectors
Component Properties
Prototyped in Smalltalk
Current Work
Larger case studies
Investigate dynamicity
Improve the prototype
Tools
Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 31 / 32
Thanks...
Questions?
Suggestions?
Comments?
Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 32 / 32

More Related Content

What's hot

What's hot (20)

Select and poll functions
Select and poll functionsSelect and poll functions
Select and poll functions
 
Network Sockets
Network SocketsNetwork Sockets
Network Sockets
 
Juniper policy based filter based forwarding
Juniper policy based filter based forwardingJuniper policy based filter based forwarding
Juniper policy based filter based forwarding
 
Socket programming
Socket programmingSocket programming
Socket programming
 
Programming TCP/IP with Sockets
Programming TCP/IP with SocketsProgramming TCP/IP with Sockets
Programming TCP/IP with Sockets
 
Sockets
SocketsSockets
Sockets
 
Networks lab manual ecp62
Networks lab manual ecp62Networks lab manual ecp62
Networks lab manual ecp62
 
Basic socket programming
Basic socket programmingBasic socket programming
Basic socket programming
 
Socket Programming Tutorial
Socket Programming TutorialSocket Programming Tutorial
Socket Programming Tutorial
 
Sockets
Sockets Sockets
Sockets
 
Np unit1
Np unit1Np unit1
Np unit1
 
Sockets in unix
Sockets in unixSockets in unix
Sockets in unix
 
Socket programming
Socket programmingSocket programming
Socket programming
 
Lecture10
Lecture10Lecture10
Lecture10
 
Socket programming in c
Socket programming in cSocket programming in c
Socket programming in c
 
Networking Fundamentals: Local Networks
Networking Fundamentals: Local NetworksNetworking Fundamentals: Local Networks
Networking Fundamentals: Local Networks
 
CCNA 200-120 Exam Quick Notes
CCNA 200-120 Exam Quick NotesCCNA 200-120 Exam Quick Notes
CCNA 200-120 Exam Quick Notes
 
Np unit iii
Np unit iiiNp unit iii
Np unit iii
 
Socket programming
Socket programming Socket programming
Socket programming
 
Application Layer and Socket Programming
Application Layer and Socket ProgrammingApplication Layer and Socket Programming
Application Layer and Socket Programming
 

Viewers also liked

Modular ObjectLens
Modular ObjectLensModular ObjectLens
Modular ObjectLensESUG
 
News from Squeak
News from SqueakNews from Squeak
News from SqueakESUG
 
The Reflectivity
The ReflectivityThe Reflectivity
The ReflectivityESUG
 
TypePlug -- Practical, Pluggable Types
TypePlug -- Practical, Pluggable TypesTypePlug -- Practical, Pluggable Types
TypePlug -- Practical, Pluggable TypesESUG
 
Starting fresh every morning
Starting fresh every morningStarting fresh every morning
Starting fresh every morningESUG
 
Glass
GlassGlass
GlassESUG
 
Stateful Traits
Stateful TraitsStateful Traits
Stateful TraitsESUG
 
Gstreamer
GstreamerGstreamer
GstreamerESUG
 
Spyware-ridden software development
Spyware-ridden software developmentSpyware-ridden software development
Spyware-ridden software developmentESUG
 

Viewers also liked (9)

Modular ObjectLens
Modular ObjectLensModular ObjectLens
Modular ObjectLens
 
News from Squeak
News from SqueakNews from Squeak
News from Squeak
 
The Reflectivity
The ReflectivityThe Reflectivity
The Reflectivity
 
TypePlug -- Practical, Pluggable Types
TypePlug -- Practical, Pluggable TypesTypePlug -- Practical, Pluggable Types
TypePlug -- Practical, Pluggable Types
 
Starting fresh every morning
Starting fresh every morningStarting fresh every morning
Starting fresh every morning
 
Glass
GlassGlass
Glass
 
Stateful Traits
Stateful TraitsStateful Traits
Stateful Traits
 
Gstreamer
GstreamerGstreamer
Gstreamer
 
Spyware-ridden software development
Spyware-ridden software developmentSpyware-ridden software development
Spyware-ridden software development
 

Similar to SCL

PLUG : Presentation Layer Universal Generator
 PLUG : Presentation Layer Universal Generator PLUG : Presentation Layer Universal Generator
PLUG : Presentation Layer Universal GeneratorEmmanuel Fuchs
 
103 Basic network concepts
103 Basic network concepts103 Basic network concepts
103 Basic network conceptsSsendiSamuel
 
Digital design with Systemc
Digital design with SystemcDigital design with Systemc
Digital design with SystemcMarc Engels
 
Preparing to program Aurora at Exascale - Early experiences and future direct...
Preparing to program Aurora at Exascale - Early experiences and future direct...Preparing to program Aurora at Exascale - Early experiences and future direct...
Preparing to program Aurora at Exascale - Early experiences and future direct...inside-BigData.com
 
Emergency Service Provide by Mobile
Emergency Service Provide by MobileEmergency Service Provide by Mobile
Emergency Service Provide by MobileSamiul Hoque
 
Gce sip-components-configuration
Gce sip-components-configurationGce sip-components-configuration
Gce sip-components-configurationTelcon Bilişim
 
End to End Convergence
End to End ConvergenceEnd to End Convergence
End to End ConvergenceSkillFactory
 
Melp codec optimization using DSP kit
Melp codec optimization using DSP kitMelp codec optimization using DSP kit
Melp codec optimization using DSP kitsohaibaslam207
 
RDMA, Scalable MPI-3 RMA, and Next-Generation Post-RDMA Interconnects
RDMA, Scalable MPI-3 RMA, and Next-Generation Post-RDMA InterconnectsRDMA, Scalable MPI-3 RMA, and Next-Generation Post-RDMA Interconnects
RDMA, Scalable MPI-3 RMA, and Next-Generation Post-RDMA Interconnectsinside-BigData.com
 
Symbian OS - Communication And Messaging
Symbian OS - Communication And MessagingSymbian OS - Communication And Messaging
Symbian OS - Communication And MessagingAndreas Jakl
 
How to Use GSM/3G/4G in Embedded Linux Systems
How to Use GSM/3G/4G in Embedded Linux SystemsHow to Use GSM/3G/4G in Embedded Linux Systems
How to Use GSM/3G/4G in Embedded Linux SystemsToradex
 
Question 1.1. (TCO 1) _____ is a type of license for software for .docx
Question 1.1. (TCO 1) _____ is a type of license for software for .docxQuestion 1.1. (TCO 1) _____ is a type of license for software for .docx
Question 1.1. (TCO 1) _____ is a type of license for software for .docxIRESH3
 
Krzysztof Mazepa - Netflow/cflow - ulubionym narzędziem operatorów SP
Krzysztof Mazepa - Netflow/cflow - ulubionym narzędziem operatorów SPKrzysztof Mazepa - Netflow/cflow - ulubionym narzędziem operatorów SP
Krzysztof Mazepa - Netflow/cflow - ulubionym narzędziem operatorów SPPROIDEA
 
Directive-based approach to Heterogeneous Computing
Directive-based approach to Heterogeneous ComputingDirective-based approach to Heterogeneous Computing
Directive-based approach to Heterogeneous ComputingRuymán Reyes
 
Operating System Fingerprinting Prevention
Operating System Fingerprinting PreventionOperating System Fingerprinting Prevention
Operating System Fingerprinting Preventiondcalhoun1984
 
Autoware vs. Computer Performance @ ROS Japan UG #43 組み込み勉強会
Autoware vs. Computer Performance @ ROS Japan UG #43 組み込み勉強会Autoware vs. Computer Performance @ ROS Japan UG #43 組み込み勉強会
Autoware vs. Computer Performance @ ROS Japan UG #43 組み込み勉強会kfunaoka
 

Similar to SCL (20)

PLUG : Presentation Layer Universal Generator
 PLUG : Presentation Layer Universal Generator PLUG : Presentation Layer Universal Generator
PLUG : Presentation Layer Universal Generator
 
103 Basic network concepts
103 Basic network concepts103 Basic network concepts
103 Basic network concepts
 
Digital design with Systemc
Digital design with SystemcDigital design with Systemc
Digital design with Systemc
 
Preparing to program Aurora at Exascale - Early experiences and future direct...
Preparing to program Aurora at Exascale - Early experiences and future direct...Preparing to program Aurora at Exascale - Early experiences and future direct...
Preparing to program Aurora at Exascale - Early experiences and future direct...
 
ECI OpenFlow 2.0 the Future of SDN
ECI OpenFlow 2.0 the Future of SDN ECI OpenFlow 2.0 the Future of SDN
ECI OpenFlow 2.0 the Future of SDN
 
Emergency Service Provide by Mobile
Emergency Service Provide by MobileEmergency Service Provide by Mobile
Emergency Service Provide by Mobile
 
Gce sip-components-configuration
Gce sip-components-configurationGce sip-components-configuration
Gce sip-components-configuration
 
Mina2
Mina2Mina2
Mina2
 
End to End Convergence
End to End ConvergenceEnd to End Convergence
End to End Convergence
 
Melp codec optimization using DSP kit
Melp codec optimization using DSP kitMelp codec optimization using DSP kit
Melp codec optimization using DSP kit
 
RDMA, Scalable MPI-3 RMA, and Next-Generation Post-RDMA Interconnects
RDMA, Scalable MPI-3 RMA, and Next-Generation Post-RDMA InterconnectsRDMA, Scalable MPI-3 RMA, and Next-Generation Post-RDMA Interconnects
RDMA, Scalable MPI-3 RMA, and Next-Generation Post-RDMA Interconnects
 
Cloud RPI4 tomcat ARM64
Cloud RPI4 tomcat ARM64Cloud RPI4 tomcat ARM64
Cloud RPI4 tomcat ARM64
 
Symbian OS - Communication And Messaging
Symbian OS - Communication And MessagingSymbian OS - Communication And Messaging
Symbian OS - Communication And Messaging
 
How to Use GSM/3G/4G in Embedded Linux Systems
How to Use GSM/3G/4G in Embedded Linux SystemsHow to Use GSM/3G/4G in Embedded Linux Systems
How to Use GSM/3G/4G in Embedded Linux Systems
 
Question 1.1. (TCO 1) _____ is a type of license for software for .docx
Question 1.1. (TCO 1) _____ is a type of license for software for .docxQuestion 1.1. (TCO 1) _____ is a type of license for software for .docx
Question 1.1. (TCO 1) _____ is a type of license for software for .docx
 
Krzysztof Mazepa - Netflow/cflow - ulubionym narzędziem operatorów SP
Krzysztof Mazepa - Netflow/cflow - ulubionym narzędziem operatorów SPKrzysztof Mazepa - Netflow/cflow - ulubionym narzędziem operatorów SP
Krzysztof Mazepa - Netflow/cflow - ulubionym narzędziem operatorów SP
 
Directive-based approach to Heterogeneous Computing
Directive-based approach to Heterogeneous ComputingDirective-based approach to Heterogeneous Computing
Directive-based approach to Heterogeneous Computing
 
Operating System Fingerprinting Prevention
Operating System Fingerprinting PreventionOperating System Fingerprinting Prevention
Operating System Fingerprinting Prevention
 
Poster_example
Poster_examplePoster_example
Poster_example
 
Autoware vs. Computer Performance @ ROS Japan UG #43 組み込み勉強会
Autoware vs. Computer Performance @ ROS Japan UG #43 組み込み勉強会Autoware vs. Computer Performance @ ROS Japan UG #43 組み込み勉強会
Autoware vs. Computer Performance @ ROS Japan UG #43 組み込み勉強会
 

More from ESUG

Workshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingWorkshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingESUG
 
Technical documentation support in Pharo
Technical documentation support in PharoTechnical documentation support in Pharo
Technical documentation support in PharoESUG
 
The Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapThe Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapESUG
 
Sequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoSequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoESUG
 
Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...ESUG
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsESUG
 
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6ESUG
 
A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationESUG
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingESUG
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesESUG
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportESUG
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsESUG
 
Garbage Collector Tuning
Garbage Collector TuningGarbage Collector Tuning
Garbage Collector TuningESUG
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseESUG
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FutureESUG
 
thisContext in the Debugger
thisContext in the DebuggerthisContext in the Debugger
thisContext in the DebuggerESUG
 
Websockets for Fencing Score
Websockets for Fencing ScoreWebsockets for Fencing Score
Websockets for Fencing ScoreESUG
 
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptESUG
 
Advanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocAdvanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocESUG
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsESUG
 

More from ESUG (20)

Workshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingWorkshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programming
 
Technical documentation support in Pharo
Technical documentation support in PharoTechnical documentation support in Pharo
Technical documentation support in Pharo
 
The Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapThe Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and Roadmap
 
Sequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoSequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in Pharo
 
Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early results
 
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
 
A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test Generation
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic Programming
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience Report
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIs
 
Garbage Collector Tuning
Garbage Collector TuningGarbage Collector Tuning
Garbage Collector Tuning
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and Future
 
thisContext in the Debugger
thisContext in the DebuggerthisContext in the Debugger
thisContext in the Debugger
 
Websockets for Fencing Score
Websockets for Fencing ScoreWebsockets for Fencing Score
Websockets for Fencing Score
 
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
 
Advanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocAdvanced Object- Oriented Design Mooc
Advanced Object- Oriented Design Mooc
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and Transformations
 

Recently uploaded

SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
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
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
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
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

SCL

  • 1. Scl : a Simple, Uniform and Operational Language for Component-Oriented Programming in Smalltalk Luc Fabresse Christophe Dony Marianne Huchard LIRMM Universit´e Montpellier 2 France September 3, 2006 Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 1 / 32
  • 2. Outline 1 Context 2 A Short Overview of Scl 3 The Connection Mechanism 4 AOP Support Using Connectors 5 Publish/Subscribe Support Using Properties 6 Conclusions Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 2 / 32
  • 3. Outline 1 Context 2 A Short Overview of Scl 3 The Connection Mechanism 4 AOP Support Using Connectors 5 Publish/Subscribe Support Using Properties 6 Conclusions Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 3 / 32
  • 4. The High-Level View of CBSD Component Component Library Application Programmer Architect creates stored used D A D creates B A C D Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 4 / 32
  • 5. Current Issues in CBSD Fundamental Questions What is a component? [Szyperski, 1996] Component structure? Component composition? Practical Needs Models Languages Tools Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 5 / 32
  • 6. Outline 1 Context 2 A Short Overview of Scl 3 The Connection Mechanism 4 AOP Support Using Connectors 5 Publish/Subscribe Support Using Properties 6 Conclusions Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 6 / 32
  • 7. Simple Component Language (Scl) What is Scl? A component-oriented programming language Main purposes of Scl Simple, few and only fundamental entities Uniform, not an asymmetric extension of an object-oriented language Enables unanticipated composition of independently developed components Synthesis of existing component-oriented languages ideas Operationnal, implemented in Smalltalk Extensible to experiment new ideas Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 7 / 32
  • 8. Basic Entities (1/2) Component Black box Ports decribed by interfaces Provides and requires services Port Interaction point Plug Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 8 / 32
  • 9. Basic Entities (1/2) Service Functionnality Like a method or a set of methods Interface Describes the valid uses of a port Service signatures sets, protocols, contracts, ... Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 9 / 32
  • 10. Example : a chatclient component Chatting ChatClient Interface Orientation Port Caption: Networking connect: disconnect sendData: receiveData join: leave send: Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 10 / 32
  • 11. 1 Context 2 A Short Overview of Scl 3 The Connection Mechanism 4 AOP Support Using Connectors 5 Publish/Subscribe Support Using Properties 6 Conclusions Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 11 / 32
  • 12. The Connector entity Connector = Reification of Connection Better separation Non-fixed connection semantics Solves adaptation problems Possible creation of a reusable library of connectors The General Connector Structure Sources, a set of ports Targets, a set of ports Glue code Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 12 / 32
  • 13. A Graphical View of a Connector <<SclConnector>> Required Provided Ports glue code Sources Targets Ports Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 13 / 32
  • 14. Example: Connection of two matching components <<SclBinaryConnector>> Chatting Source ConnectionManager Target ChatClient Networking Networking SclBinaryConnector new source: ( chatClient port: #Networking ) target: ( connectionManager port: #Networking ) ; connect Similar to: bindings in Fractal connect primitive in Archjava Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 14 / 32
  • 15. Example: Connection of two Components with Adaptation ChatClient Networking Networking <<SclBinaryConnector>> Code glue Chatting Source ConnectionManager Target connect: disconnect sendData: receiveData closeConnection openConnectionTo: send: receive: Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 15 / 32
  • 16. Example: Connection of two Components with Adaptation receive sendData: closeConnection openConnectionTo: Target send: disconnect connect: ChatClient Networking Networking <<SclBinaryConnector>> Code glue Chatting Source ConnectionManager receiveData: SclBinaryConnector new source: ( chatClient port: #Networking ) target: ( connectionManager port: #Networking ) glue: [ :source :target :message | (message selector = #connect:) ifTrue: [ ^ target openConnectionTo: (message arguments) ] ... "some more stuff" ] ; connect. Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 16 / 32
  • 17. 1 Context 2 A Short Overview of Scl 3 The Connection Mechanism 4 AOP Support Using Connectors 5 Publish/Subscribe Support Using Properties 6 Conclusions Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 17 / 32
  • 18. Mixing AOP and Component Appoaches Why? Encapsulate the scaterred code of specific concerns (Log, Transaction,...) How? Asymmetric approaches Symmetric approaches Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 18 / 32
  • 19. Limited AOP support in Scl Joint Points on Ports before/after/around service invocation before/after/around connection/disconnection Special Connectors Source ports are coupled with a keyword (beforeServiceInvocation, ...) Weaving Regular connection/disconnection mechanism Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 19 / 32
  • 20. Example: A Logger component LoggerChatClient Networking Chatting log: <<beforeSI>> Logging glue code <<SclFlowConnector>> SclFlowBinaryConnector new source: ( (chatClient port: #Chatting) beforeServiceInvocation ) target: ( logger port: #Logging ) glue: [ :source :target :message | target log: (message selector asString) ] ; connect. Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 20 / 32
  • 21. 1 Context 2 A Short Overview of Scl 3 The Connection Mechanism 4 AOP Support Using Connectors 5 Publish/Subscribe Support Using Properties 6 Conclusions Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 21 / 32
  • 22. Motivating Example (1/2) How to connect a chatclient component with a GUI component ? Chatting Accessing chatText chatText: displayText displayText: ChatClient Networking TextArea Accessing Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 22 / 32
  • 23. Motivating Example (2/2) How to connect a chatclient component with a GUI component ? ChatClient Networking Notifying TextArea Accessing chatTextChanged: Chatting Accessing chatText chatText: displayText displayText: Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 23 / 32
  • 24. The limitations with components Publisher side limitations Event signaling (Archjava, CCM, ...) Subscribers management (Javabeans, ...) Subscriber side limitations Receivable events (CCM, ...) Subscriber reaction Goal Extract the application dependent code from components Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 24 / 32
  • 25. The Scl Solution Based on Properties Property External state of a component (Javabeans) Automatically notifies its value changes if needed Only declared by the component programmer Property Structure: A name An access port provides getter and setter services A notification port to invoke notifying services Notifying services Notify Before Change, nbc:value:oldValue: Notify After Change, nac:value:oldValue: ... Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 25 / 32
  • 26. Example: The chat client component with a ChatText property SCLCOM PON E N TBU I LDE R create: # ChatClient properties: ’ c h a tT e x t nickName ’. outPorts: ’ Networking ’ inPorts: ’ Chatting ’. CH ATCL IEN T>>init ” p r e s e n t e d in Figure 3” CH ATCL IEN T>>primitivechatText ” i n t e r n a l component accessor d e f i n e d by the programmer and used by the generated c h a t T e x t p r o p e r t y accessor ” chatText ifNil: [ chatText := ’ ’ ]. ˆchatText CH ATCL IEN T>>primitivechatText: newV chatText := newV CH ATCL IEN T>>primitivenickName nickName ifNil: [ nickName := ’ anonymous ’ ]. ˆnickName nbc:value:oldValue: chatText: nac:value:oldValue: ChatClient Chatting ChatText Networking chatText Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 26 / 32
  • 27. States changes connections Standard connections Based on connectors (ports + glue code) Source ports are notifying ports of properties Features Uniformity Extensibility Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 27 / 32
  • 28. Example: The whole chat client application P P ChatClient Networking Chatting ChatText NickName ChatClientGui Networking NetworkManager <<SclBinaryNacConnector>> Displaying Sending <<SclBinaryNacConnector>> SclBinaryNacConnector new source: ( chatClient notifyPortOf: #ChatText ) target: ( chatClientGui port: #Displaying ) glue: [ :source :gui :anInvocation | gui displayText: anInvocation arguments second ] ; connect. Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 28 / 32
  • 29. Implementation of Scl Advantages of Smalltalk Prototyping is easier and faster than in statically typed languages The meta-level enables message interceptions, addition of new entities (Component, Connector, ...), ... Block can be used for representing glue code A step to investigate what could be a dynamic component oriented language Difficulty(ies) with Smalltalk Encapsulation Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 29 / 32
  • 30. Outline 1 Context 2 A Short Overview of Scl 3 The Connection Mechanism 4 AOP Support Using Connectors 5 Publish/Subscribe Support Using Properties 6 Conclusions Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 30 / 32
  • 31. Conclusions Scl A component-oriented language Only one entity of reuse: Component Component Composition Connections based on Connectors AOP support using Connectors Component Properties Prototyped in Smalltalk Current Work Larger case studies Investigate dynamicity Improve the prototype Tools Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 31 / 32
  • 32. Thanks... Questions? Suggestions? Comments? Fabresse, Dony, Huchard (Lirmm/UM2) Component-Oriented Programming ESUG 2006 32 / 32