Design For Change PDF
Design For Change PDF
Sylvia Stuurman
Sylvia Stuurman studied Biology and
graduated in Computer Science.
She works as assistant professor at the
Open University of the Netherlands.
door
Sylvia Stuurman
Co-promotoren
Dr. B.J. (Bastiaan) Heeren, Open Universiteit
Dr. ir. H.J.M. (Harrie) Passier, Open Universiteit
Contents 1
1 Introduction 5
1.1 Software evolution and change in software . . . . . . . . . . . . . . . . . 6
1.2 Software design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3 Design for change in education . . . . . . . . . . . . . . . . . . . . . . . . 13
1.4 Design for change strategies . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.5 Variation points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.6 Enhance changeability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.7 Origin of chapters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
I Variation points 27
1
2 CONTENTS
Samenvatting 185
Dankwoord 189
References 195
3
1
Introduction
5
1. INTRODUCTION
in Section 1.6. In these two sections, we relate the chapters of this thesis to these
two strategies. We conclude this introduction with a description of the origin of the
chapters of this thesis in Section 1.7.
6
1.2. Software design
paced Altavista, which was the main search engine for a couple of years. Since then,
many search engines have tried to win terrain, with Microsoft’s Bing probably one of
the most successful ones [Singhal 2004]. Such a war or race is carried out by apply-
ing changes to the software, almost constantly, both with respect to the presentation
of the results to the user as with respect to the software forming the results. The
user is the ‘natural selector’ who determines whether a search engine is successful
or not.
The changes that are applied are not created at random, but on purpose. Within a
development team, there may be team members who analyze how users interact with
the product, team members who predict what users might want, team members who
formulate new requirements, and team members who translate those requirements
into a software design and implement the design. All those activities play a role in
software evolution.
1.1.2 Change
In this thesis, we are not interested in deriving requirements or in deciding which
changes should be applied; we are only interested in the ease with which changes can
be applied to the software. Therefore, we use the term ‘change’ instead of evolution.
We will use the term ‘changeability’ for the degree of ‘easiness’ of applying changes
to software in such a way that the software will not age, while being aware that this
is not a precise definition. For the purpose of this thesis, this definition is sufficient.
The need for change in software is inevitable, because as the world changes, there
will be a growing mismatch between the current capabilities of the software and the
requirements from the environment. Protocols and standards for communication
with other systems might have changed, for instance. This fact, of the inevitable
need for change of software, is known as the first law of software evolution [Lehman,
Perry et al. 1998].
Changes in software can be categorized along different criteria such as the cause
of the change (for instance, a bug or new requirements), the type of change (per-
fective, corrective, adaptive or preventive), the location of the change, the size of the
code modification or the potential impact of the change [Williams and Carver 2010].
In this thesis, those criteria are not important. We are interested in the possibilities
to support the future implementation of changes, whatever those changes may be.
Because we think it is important to teach our students how to prepare for change in
their software design, we are interested in the educational aspect of software change
as well.
Design with the intention to optimize changeability is what we mean by the title
of our thesis, Design for Change.
7
1. INTRODUCTION
Figure 1.1 might suggest a specific development process, but we do not imply that
a specific development process is used, such as the Waterfall model [Royce 1987] or
Agile development [Beck, Beedle et al. 2001]. In this thesis, we do not examine the
influence of the software development process on the ease to apply changes, even
though some of these processes have the explicit goal to ‘embrace change’ [Beck and
Andres 2004].
The word ‘design’ in the middle might suggest that this is the only activity or
product that we are interested in, in this thesis. However, we use the word ‘design’
in a broader sense. Design in a broader sense, as an activity, means ‘to plan and make
decisions about something that is being built or created: to create the plans, draw-
ings, etc., that show how something will be made’ [Merriam-Webster 2004]. Design
in that sense takes place in drafting an architecture, in refining the architecture into
a design, and in programming.
The notions of architecture, design and programming usually denote products
or activities at different levels of abstraction. However, the boundaries between
these activities or products are vague. Also, the words used to discern these levels of
abstraction differ: sometimes coding is distinguished from programming; sometimes
both are called implementation; sometimes implementation is distinguished from
programming (like we do in Figure 1.1). Sometimes design is divided into design
and detailed design.
In this thesis, what we mean by ‘design’, is formed by software architecture,
design and programming in Figure 1.1. With implementation, we mean the process
in which code is transformed into a running system: compiling, building, installing,
configuring.
Maybe the confusion around the meaning of the word ‘design’ is a result of the
evolution of the concept of software design over the years. We present a short over-
view of this evolution to illustrate the fact that design is involved within each of
these levels of abstraction. We only discuss design at different levels of abstraction,
and do not discuss (emerging) aspects of design like model-driven development,
domain-specific languages, privacy or security by design, and so forth.
8
1.2. Software design
9
1. INTRODUCTION
While modular programming has its focus on the functions in the modules, object-
orientation shifted the focus onto the data. Objects were introduced: data bundled
with the operations to manipulate the data. One of the early examples is Sketch-
pad [Johnson 1963].
The notion of classes, introduced in Simula [Dahl and Nygaard 1966], was in-
fluenced by Hoare’s record classes [Hoare 1965]. object-oriented programming lan-
guages led to the introduction of (graphical) design languages such as Class Respons-
ibility Collaboration cards [Wilkinson 1998], the Object Modeling Technique [Rum-
baugh, Blaha et al. 1990], object-oriented Design [Booch 1982] and the Unified
Modeling Language [Rumbaugh, Jacobson et al. 2004]. The driving force of object-
orientation was reuse of code.
10
1.2. Software design
Figure 1.2 shows the meaning of ‘design’ that we use in this thesis. With the re-
quirements as a starting point, there is always a design (implicit or explicit). Design
includes all descriptions of the system-to-be in which decisions have been made
about the composition of that system. Requirements are excluded: design will, in
the end, deliver something that meets the requirements (or, more precisely, it is the
purpose of the designer that the resulting software will meet the requirements). The
design is refined until one may implement the system from the code (which may be
compiled into an executable or can be interpreted).
What is called ‘design’ in this thesis, is also called ‘software construction’ [McCon-
nell 2004]. We prefer the term ‘design’ in this context: when one buys a box of Lego
and follows the instructions, one may construct a car, while the designer of the car
is somebody else (the person who created the building plan, and has the job almost
every girl or boy dreams about). It is the design we are interested in.
11
1. INTRODUCTION
12
1.3. Design for change in education
dependency is taken away completely or is made less severe, thus making it easier
to implement changes.
In programming constructs or design patterns that aim for changeability, one
often sees decoupling. Polymorphism, for instance, means that implementation is
decoupled from its interface, and the same applies for the Layers architectural pat-
tern [Shaw 1996] where each layer uses the underlying layer as an abstract machine.
The Broker architectural pattern decouples a name from specific components. The
Pipe and Filter architectural pattern [Shaw 1996], where each filter does a compu-
tation on its input which comes in a stream, and outputs the result in the form of
a stream, decouples filters (components) from a configuration (with the result that
binding time is deferred). The same kind of decoupling takes place in web services.
Decoupling, thus, plays an important role in design for change.
Another important technique for design for change is abstraction, which is, by
some, regarded as the key to computing [Kramer 2007]. For instance, the protocol
that is the basis of the web, HTTP, abstracts from the type of the content that is sent
in response to a request. This abstraction has made it possible to develop plugins for
browsers that are able to represent data in new file formats (Flash is an example).
Data in new file formats may be sent without any adjustments to the protocol. Ab-
straction from the content in this example has as a result that the web is open with
respect to new file formats and tools interpreting those file formats. Abstraction
too may be expressed as a form of decoupling. Abstraction means that something
specific (for instance, the content type in HTTP) is decoupled from something more
general (for instance, the connection in HTTP).
13
1. INTRODUCTION
14
1.5. Variation points
When a design decision is delayed until the moment that the system is started,
or even until run-time, such a variation point allows for a change in the system after
the system has been built.
Part I of this thesis is dedicated to variations points.
15
1. INTRODUCTION
TaskList Sorter
sort()
The essence of this pattern is that TaskList never knows the exact class of its
sorter; it only knows that this sorter implements the Sorter interface. The creation
of Sorter-objects is done elsewhere, in a factory-class. The Strategy pattern thus is a
variation point: the design decision about the specific class of the Sorter is delayed
until a Sorter object is created. When one would like to add another sorter, the only
place one has to change is the factory class. The extension point is, in this case, the
factory class. By encapsulating variations, design patterns make it easier to apply
changes to software.
We see here how loose coupling and abstraction are used to create a variation
point. The coupling between TaskList and the class of the Sorter is loose, which
makes it easy to add other kinds of Sorters. The loose coupling is implemented
using abstraction: Sorter is an abstract class or interface.
The problem is that one cannot just loosen every connection and make everything
abstract: in the end, there must be places where connections are fixed, because at
one point, communication between two objects needs to be established. Also, every
variation point adds complexity. The class diagram in Figure 1.3 would be a lot
simpler if TaskList would just have one method to sort its items. There is always a
trade-off.
16
1.5. Variation points
Creating variation points by using loose coupling and abstraction thus means that
one finds places where the current problem shows variability, and tries to predict
places where changes will have to be made in the future. Design patterns help to do
that: they form general solutions for general problems with respect to variability.
Therefore, a good way to teach students to design for change, is to teach them
how and why to use design patterns. They not only guide students in finding vari-
ation in a problem and in creating variation points that allow for easy change after-
wards, but they also train students in creating software that is flexible with respect to
future changes. The problem thereby is that software design is typically something
that is learned by doing, by practicing. To experience the advantages that design
patterns offer with respect to changeability, one needs to practice with a fairly large
system. It is, of course, difficult to offer such practice to students within the con-
straints of a university curriculum, and this problem is even greater within a distance
university.
In Chapter 3, we describe our solution for this problem, using a situation that
resembles the software architecture studio proposed by Hazzan [Hazzan 2002].
17
1. INTRODUCTION
Static linking
build-time Build files
Compile file
File system Internet
Binding time can be seen as variability in time [Capilla and Bosch 2013]. Binding
time may occur at design time, compilation time, build time, configuration time, start
time or at run-time (in Figure 1.4, we only show a subset). A statically linked library
is bound at build time. A dynamically linked library is bound at start time. Delayed
binding time is based on loose coupling: when an element is bound after build time,
there is no direct coupling from this element with other elements.
Binding time at a later stage increases the ease of applying a change. A change
in a statically linked library can only be applied by building the system again, as a
whole. A change in a dynamically linked library is apparent in the system as soon
as the system is started. The implementation of a web service may be changed at
any time: executing systems using such a web service will receive the new service
whenever they place a request.
Using the late binding properties of Java, we developed a library with the possib-
ility to ‘inject’ an executing process with a new version of a class, and to force that
process to use that new class instead of the older version. Those classes form the
variation points.
That possibility raises new questions. In a system of distributed processes, one has
the choice of applying a change either by replacing a single process, or by injecting
a new class in such a process. The question is: does this choice have implications
on the software architecture in use? What are the consequences of choosing for a
replacement of a class versus a replacement of a process?
We explore this question in a case study for a control system for unmanned vehi-
cles, in Chapter 4.
18
1.6. Enhance changeability
One step further is to create an Embedded Domain Specific Language (EDSL) with
which one may declare the changeable parts of the system [van Deursen et al. 2000].
In Chapter 5, we describe a system for automated feedback on exercises. The
feedback engine has been developed in Haskell (a functional programming lan-
guage) to minimize side-effects, thus enhancing changeability [Jeuring et al. 2007].
In the feedback engine, abstraction is used to make it possible to generate feedback
independently from the domain in use (such as proposition logic or linear algebra)
and from strategies to solve classes of exercises. Rules for the domain, exercises,
and strategies to solve exercises are specified in an EDSL, and the feedback engine is
able to use these specifications to generate semantically rich feedback on arbitrary
exercises within such a domain. Changes in the domain and in strategies are thus
declared outside the main body of the software. The front end, developed by the
candidate, uses the same abstraction mechanism to provide a user interface that is
geared to the domain of the exercises.
This is an example of using abstraction to make it easier to apply changes: the
software abstracts from the specific instances of the variation.
Chapter 5 also describes how we created the possibility to add an infinite number
of front ends by offering the feedback engine as a series of web services, thus de-
coupling the front end from the feedback engine. Both decoupling and abstraction
thus are used to create flexibility with respect to changes.
Exercise assistants based on the framework proved helpful to students [Lodder,
Passier et al. 2008].
Another example in which specific instances of variation points are isolated, is our
JavaScript library for form validation. We developed this library to show how the
procedural guidelines that we give our students, lead to elegant code. The starting
point is a form validation application for one specific form, and one of the steps that
guide students in refactoring their code is to think about possible changes in the
future. An obvious change is, in this case, a different form. Instead of having to
specify, in JavaScript, which validation function should be used for each input field
of a form in the script, one may specifiy everything that is needed to decide which
validation function should be used, in HTML. Thus, variations are declared outside
the JavaScript code, in HTML.
Chapter 6 describes the set of guidelines, and shows how these guidelines may
help to derive elegant code. To declare instances of variation points outside the
software is one of the results.
Trying to predict changes, or at least trying to predict where changes will be needed,
is one strategy; optimizing the ease of applying a change is another strategy.
The subject of part II is enhancing changeability.
19
1. INTRODUCTION
20
1.6. Enhance changeability
Design in automated code generation One may have the impression that choices
are absent in automatic programming, but this is not the case. When one expresses
the requirements of a system in a formal language, one makes choices, for instance
in deciding which concepts one uses or in deciding how to express those concepts.
Other kinds of choices are the decisions that have been made in the framework itself:
the choice for the formal language used to express the requirements and the choice
for the formal language used to specify the desired behavior. A choice has been
made for the programming language, and thus for the programming paradigm. And
at last, the software for the translation has been designed: choices have been made
there.
The problem is that the results or influences of these decisions on the design are
not made explicit (or are even not known). The (architectural) design of a system
has an impact on its non-functional properties.
In Chapter 7, we show that the choice for the modeling language for the descrip-
tion of the desired behavior has implications on the design. We describe two software
architectures for a railroad controller, with different non-functional properties. We
also describe two languages to specify the desired behavior of the railroad system,
and show that the choice for one of these languages has implications on the software
architecture.
In Chapter 8, we show how we use an explicit architectural style in a framework
for distributed control systems with a real-time aspect. The architectural style has
known effects on non-functional properties.
These two chapters illustrate the fact that it is better to make implicit design de-
cisions (for instance in a framework for automated code generation) explicit, because
these decisions may influence certain properties of the system.
21
1. INTRODUCTION
JavaScript has many functional features [Crockford 2008] that are gaining attention
from software developers.
There is a problem, however: most professional programmers have experience in
procedural or object-oriented programming, and the shift toward a functional style is
a difficult one. A key to this shift could be the programming language Scala [Odersky
et al. 2010], which is both an object-oriented language and a functional language.
Scala is fairly easy to learn for programmers who are familiar with Java or C#, and
it advocates the use of functional style programming. Scala thus, could ease the shift
between object-oriented and functional programming.
As an aid to an adoption of the use of functional programming, it is therefore
desirable for an institution as the Open University of the Netherlands, with a mission
around life-long learning, to offer a course about Scala, introducing both the object-
oriented and the functional aspects of the language, and teaching how the functional
style helps to prevent side-effects.
In Chapter 9, we describe why it is difficult to adopt such a course within the
curriculum, and how we succeeded to produce the course in the form of Open Edu-
cational Resources. Our method to do so is an example of enhancing changeability
outside the scope of software: we enhanced the changeability of our curriculum by
producing the course.
22
1.7. Origin of chapters
23
1. INTRODUCTION
with the architecture, while the architecture would have to be adapted for the other
mechanism.
24
1.7. Origin of chapters
25
1. INTRODUCTION
Design Education
26
Part I
Variation points
27
2
1
Modeling techniques for mobile apps
29
2. THE DESIGN OF MOBILE APPS
Abstract
Mobile applications (or mobile apps or apps for short) gain importance, and
will, as is our expectation, find a place in the curricula of Computer Science and
Software Engineering. In books, courses and tutorials, not much attention has
been given to the design of mobile applications.
In this paper, we describe the anatomy of mobile apps, using Android as an
example. Based on this anatomy, we offer an inventarization of modeling tech-
niques that can be applied to adequately design mobile apps. Some of these mod-
eling techniques are already taught in most curricula, albeit in different courses.
A modeling technique that is useful for several aspects of mobile apps is the In-
teraction Flow Modeling Language (IFML). This modeling technique would have
to be introduced when one would like to teach students how to design apps.
Mobile apps form a context for various concepts within the subject of Com-
puter Science. There are four models for context-based learning [Gilbert 2006].
We discuss advantages and disadvantages of these approaches.
2.1 Introduction
In courses on Software Design, the domain that is often (implicitly) presumed, is
the domain of business applications, running on a server. This is reflected in the
examples that are used in textbooks [Evans 2004; Larman 2012].
The omnipresence of mobile applications (or apps for short) shows that the dom-
inance of server-side applications is decreasing. More and more, apps are introduced
in Computer Science curricula. Though universities teach knowledge that is as inde-
pendent of specific technologies as possible, it is inevitable to use specific technolo-
gies to teach certain subjects. Both teachers and students prefer recent technology.
Because of these reasons, we foresee a shift from the implicit domain of business
applications in Computer Science curricula to the domain of mobile applications.
Other reasons are the fact that the user interface of mobile apps has more possib-
ilities than input through the keyboard or the mouse, that mobile applications are
often part of a client-server or a peer-to-peer application, that there is hardware in-
volved with multiple sensors, that there is limited memory and there are restrictions
30
2.1. Introduction
with respect to power usage, that data handling is different than the traditional file-
system-model, that interaction between mobile applications is common, and that
there are programming issues such as the life cycle of applications, designing for
multiple platforms, or security and privacy [Gordon 2013]. In short, mobile applic-
ations are rich and complex, and thus suitable to teach many aspects of Computer
Science.
There are more reasons. Because of the competitive market it is extremely im-
portant in mobile applications to optimize for changeability and adaptability, and
therefore mobile applications lend themselves to show the importance of this qual-
ity aspect to students. Mobile applications are event-driven, in contrast to server-side
applications as they are taught. And, not the least important, learning to program
mobile applications motivates students.
The implicitly presumed domain of applications not only influences the examples
that will be used, but also the modeling techniques that will be taught. Teaching
suitable modeling techniques for the design of mobile applications is important be-
cause of the aspects we mentioned before, such as the importance of designing for
changeability.
We pose two questions. The first question is: which modeling techniques does
one need to design mobile applications? The second question is: if one would like
to integrate mobile applications into the curriculum, two strategies may be used to
do so. On the one hand, one may use apps as examples in existing courses; on the
other hand, apps might become the focus point, to teach concepts and modeling
techniques necessary to design apps. What are the advantages and disadvantages of
both approaches?
With respect to the first question, we describe the anatomy of mobile apps, us-
ing Android as an example. Based on these concepts, we make an inventarization
of modeling techniques. Our contribution is a proposal for a set of existing mod-
eling techniques that are suitable to model different aspects of a modern mobile
application. We do not restrict ourselves to UML, but also take other approaches into
account. Knowing these techniques, a student could model the different aspects of
a mobile application.
With respect to the second question, we observe that mobile apps form a con-
text for concepts. We discuss models of context-based learning, taking the fact into
account that designing apps may be seen as a complex task, which integrates know-
ledge from several areas and asks for several skills. We check existing curriculum
guidelines for Computer Science and Software Engineering with respect to the mod-
els for context-based learning, and discuss advantages and disadvantages.
This paper is organized as follows: in Section 2.2, we describe related work, and
show the difference with our work. In Section 2.3, we describe the anatomy of a mo-
bile application. We will use Android apps as an example. Section 2.4 shows which
current modeling techniques might be used to model the aspects of apps that we
described in Section 2.3. In Section 2.5, we describe advantages and disadvantages
of models for context-based learning to integrate modeling apps in the curriculum.
We summarize our conclusions in Section 2.6.
31
2. THE DESIGN OF MOBILE APPS
Research on mobile systems, pertinent to this subject, has been carried out in three
areas: research on design methods (often with associated tools) for mobile apps,
research on the concepts within mobile apps, and research on how to teach engin-
eering mobile apps.
An example of research on design methods for mobile apps is the work of Parada
and de Brisolara on a model-driven approach for the development of Android applic-
ations [Parada and de Brisolara 2012]. Here, class diagrams and sequence diagrams
of standard UML are proposed to model Android applications. Heitkötter and Maj-
chrzak propose a domain-specific language to model a mobile application [Heitkötter
and Majchrzak 2013]. Ko et al. offer an approach in which standard UML is exten-
ded using stereotypes, tagged values and constraint meta-classes to model Android
applications [Ko et al. 2012]. Kraemer et al. have a different approach. Here, the
focus is on the responsive nature of mobile apps; the proposal is to design them us-
ing UML Activity diagrams, augmented with State Machines, for which they supply
building blocks representing different Android concepts [Kraemer 2011].
What these approaches have in common is that they offer a specific method to
design mobile applications, often by using UML. Our focus is different: we try to
discern the various aspects of mobile apps and explore which modeling techniques
might be useful for those concepts, with the purpose of providing a set of modeling
techniques that might prepare students for the design of mobile apps; not by pre-
scribing one method, but by providing students with different possibilities. As far as
we know, we are the first to explore the design of mobile apps in this way.
Gordon discusses concepts that are relevant for mobile apps: user interface design
and usability, device cooperation, hardware issues, data handling, application inter-
action and programming issues [Gordon 2013]. His focus is on the knowledge that
students need, in different knowledge areas, to be able to create mobile apps, while
our focus is on the design techniques they should be taught. Our study complements
Gordons research.
Altayeb and Damevski argue that one should teach a model-first approach in
developing mobile apps [Altayeb and Damevski 2013]. They use the Prolemy II en-
vironment [Davis-II et al. 1999], which offers modeling techniques for Communic-
ating sequential processes (CSP), continuous-time modeling, discrete-event systems,
discrete-time, process networks, Petri Nets, synchronous dataflow, synchronous/re-
active, and graphics and 3D animations. This is a choice for the first of our strate-
gies to introduce mobile apps in the curriculum: using them as a subject, bundled
with the necessary knowledge and techniques. Riley describes how he uses Android
programming to teach Java and advanced programming skills [Riley 2012]. String-
fellow and Mule describe the use of an Android project in a course on Software
engineering [Stringfellow and Mule 2013]. These researchers have in common that
they describe how they use Android or mobile applications in general to teach certain
areas of computer science. Our focus is on those modeling techniques that should
be taught to students for the domain of mobile applications.
32
2.3. The anatomy of Android apps
2.3.1 Elements
Android apps consist of four types of building blocks:
2.3.2 Communication
Activities, services and broadcast receivers are activated through an intent. An intent
is an asynchronously handled message carrying a characterization of the action to
perform (for instance ‘start’, or ‘view’, or ‘send’), and it may carry a URI or data to
act upon. Intents may be anonymous, in which case the operating system searches
for an activity or service or broadcast receiver in an app that is able to perform the
action, or it may be direct, which means that it is directed to a specific activity, service
or broadcast receiver. A result of an intent is delivered in the form of a callback.
Figure 2.1 shows the four types of components. Content providers are the only
components that should fetch or save data. Activities, services and broadcast receiv-
ers may communicate with content providers through ‘ordinary’ associations (depic-
ted as solid arrows). Activities, services and broadcast receivers may communicate
2
Android Developer Guides, Design and Documentation.https://developer.android.com/
33
2. THE DESIGN OF MOBILE APPS
Service
component
Activity Broadcast
association
receiver
intent
Content
provider
Data
with each other through intents (depicted as dashed arrows). The system may con-
tact broadcast receivers (for notices) and activities (for instance to start an applica-
tion, or to ask it to show a video), through intents. Intents may be both directed or
anonymous (we have no way to show that in the figure). Intents may be used within
one app or between apps. Activities and services may thus send intents to the system
or to other activities and services within the app; broadcast receivers and activities
may receive intents from the system.
2.3.4 Threads
Each app runs in a single process and by default all components run in a single
thread. However, additional threads may be created, and one may reserve a separate
thread for each component of an app. Because the responsiveness of mobile apps
is important, separate threads are often needed to avoid a ‘freezing’ user interface.
Services run, by default, in the main thread. Often, one would create new threads
34
2.4. Modeling Android apps
Shutdown
launch
Created
start
run
Running
pause resume
restart Paused
stop
Stopped
within a service. The same applies for content providers that store data through the
internet.
35
2. THE DESIGN OF MOBILE APPS
grams and sequence diagrams. But mobile applications are often significantly differ-
ent from standard object-oriented programs. For example, mobile applications are
event-driven, mobile applications as embedded software should use limited device
resources efficiently, and the development of mobile applications demands addi-
tional worries about the short time-to-market. These issues need special attention
and the use of specialized design techniques [Kraemer 2011; Parada and de Brisolara
2012; Stringfellow and Mule 2013].
This means that a course about designing and implementing Android Apps re-
quires, among other things, proficiency in the concepts of object-orientation, event-
driven programming, and the Android architecture [Riley 2012]. Here, we do not
focus on the concepts but rather on modeling techniques. First, we describe the res-
ults of interviews we had with app developers about their modeling activities (or
absence thereof), then we discuss how to model the anatomy of Androids apps, and
finally, we discuss modeling other aspects of Android apps.
2.4.1 In practice
For evaluation purposes we contacted a small number of former students to get in-
formation about their experience in developing mobile applications. Although it was
by no means intended as an extensive and/or formal survey, a number of interesting
patterns emerged. All of them indicated that the user interface (look and feel, to the
level of details) is the most important aspect of an app. By using user stories and
later on storyboards, they quickly get an idea of what an app should be like. Some
use paper prototyping at a regular basis to get the first results. They continue with
agile development of the mobile app, and using rapid prototyping methods and A/B
testing combined with regular contact with their customers, ensures customer satis-
faction. Some indicated that they start with the part of the application that has the
highest risk, and continue with reassessing the risk associated with the remaining
parts after each step in the development process. In this regard, business decisions
are leading in the process.
When asked specifically about their application design, they were at a loss. Their
first reaction was to claim that other aspects were more important, i.e. the user in-
terface, the business process, agile development process, and customer satisfaction.
As they talked more, keywords as declarative methods, facades, mediators, services,
frameworks (for instance, AngularJS or Famo.us) arose, and associated design pat-
terns, the unsuitability of model-view-controller, and the usefulness of the model-
view-presenter design pattern. They indicated that although they design an app in
their mind, they did not have the proper design techniques to design an application
on paper, as they lacked the necessary graphical and semantic representations of
important aspects of their application design.
36
2.4. Modeling Android apps
View Component: An element of the interface that displays content or accepts in-
put, for instance a button.
Event: An occurrence that affects the state of the application, for instance a user
pressing a button.
Navigation Flow: An input-output dependency. The source of the link has some
output that is associated with the input of the target of the link, for instance
the link from a row in a list of artists to a View Component showing information
about that artist.
3
OMG Unified Modeling Language (OMG UML),Superstructure, version 2.2, http://www.omg.org/
spec/UML/2.2/Superstructure/PDF/
4
http://www.ifml.org
37
2. THE DESIGN OF MOBILE APPS
Person
Person
CS
Submit
Read
{length, weight}
{length, weight}
SS
BMI result Compute
OK
{BMI, error}
{BMI} CS
Process
Error
!OK
38
2.4. Modeling Android apps
There is a UML profile for IFML, which means that it can be adopted by general
UML tools; at this moment there is only one dedicated IFML tool available5 .
Services
The functionality of services may be modeled in the same way as the functionality
of activities, using UML class diagrams and sequence diagrams. It is not possible,
however, to indicate that they run in the background. Often, one would like to be
able to model when services perform a certain action (for instance at certain events),
and how they use threads to run in the background. Modeling events and threads is
discussed below.
Content providers
For the functionality of content providers, the same applies as to services. One could
model the type of storage using UML classes.
Broadcast receivers
To model the broadcast receiver, one would like to be able to model which kind of no-
tifications may be received, and which activity or service will handle the notification.
As we have seen, IFML could be used for that purpose.
For broadcast receivers, the same applies as to services: one needs to model
events and threads.
Communication
As can be seen in Figure 2.1 (where we used ‘fantasy’ arrows with custom semantics),
it is not straightforward how to model communication through intents. One would
like to specify whether an intent is directed or anonymous, and what action and
which data are associated with an intent. Also, one would like to be able to specify
for each activity and service what actions they can perform (for anonymous intents
that are associated with actions).
The only research we are aware of, on this subject, uses custom-made building
blocks in UML Activity diagrams [Kraemer 2011]. The most obvious choice seems
to be an association in a UML class diagram with a classifier specifying that it is an
intent, and specifying whether the intent is directed or anonymous. One could also
use an association class, to specify the data that are sent with the intent. The arrows
in an IFML diagram are very similar to directed intents, as they may carry data. The
only restriction is that the arrows in an IFML diagram are bound to events.
At the moment of writing, there is no standard way to model intents. The same
applies to message passing in general: it is unclear how to model anonymous mes-
sage passing, for example.
5
http://www.webratio.com/portal/content/en/ifml-standard
39
2. THE DESIGN OF MOBILE APPS
Life cycle
As can be seen in Figure 2.2, it is easy to model the lifecycle of an activity using a UML
state diagram. What is desirable, however, is a means to model the desired actions
at each event connected with the life cycle. This might be done by specifying the
state the activity has to reach after such an event, but that is difficult. For instance,
in a mobile app, there is no guarantee that an event handler is executed when an
app stops. One would like to be able to specify what one would like to try to achieve
at a certain event.
The life cycle of Android apps and the fact that an app may receive broadcast
messages are specific cases of the fact that Android apps are event-driven. There are
two aspects of events that one would like to model:
• A specification of the state transition that is triggered by an event: the state be-
fore the event has taken place, and the state after execution of what is triggered
by the event. This is a declarative specification of event handling, focusing on
what should be achieved.
With respect to the first issue, the main difficulty is that the state may have been
altered between two related events, for instance between the event that an Ajax-
call has been made and the event that the response is received. For these issues,
Finite State Machines (a graphical notation with a corresponding algebraic notation
that lends itself for analyzing [Magee and Kramer 2006]) are a usable modeling
technique [Marchetto et al. 2008; Altayeb and Damevski 2013]. Instead of Finite
State Machines, one may use UML State-charts, which can be translated into Finite
State Machines for analysis purposes [Drusinsky 2011]. Another possibility is the
use of Petri Nets [Benveniste et al. 2003]. One has to bear in mind that there is no
guarantee, on the Android platform, that the next state is reached after a certain
event.
With respect to the second issue, one could use activity diagrams, and – again –
IFML . With IFML , it is possible to specify which action is triggered by which event, and
one may specify which data are transmitted as well. Handling broadcast messages,
for instance, can be modeled in detail using IFML, by specifying the data of a message
and the action or service to trigger. The same applies to life cycle events and events
triggered by sensors of the device (either detecting user input or a change in the
surroundings).
Threads
Because responsiveness is important, one would like to model which functionality is
processed in a separate thread. Of course, possible problems with threads and state
should be prevented by modeling threads and state, and analyzing those models.
40
2.4. Modeling Android apps
Threads are necessary in event-based systems that must be responsive. The main
thread of an Android application is the one that processes UI events, and this thread
should not perform heavy computations or long blocking operations in response to
user events [Yang et al. 2013]. Threads are notoriously difficult to ‘get right’, because
they are inherently non-deterministic [Liu et al. 2011]. To prevent state-related prob-
lems with threads, one may use Finite State Machines, but this can easily lead to a
state explosion.
Threads are not only hard to use; it is also difficult to teach concepts around
threads, like concurrency and synchronization, in such a way that students really un-
derstand these concepts. There have been explicit attempts to focus on these aspects.
Li et al., for instance, describe a course on concurrency in which they teach how to
use state and sequence diagrams to model concurrent systems. They also show the
well-defined transformation from state diagrams to threads-based implementations
of monitor constructs and condition variables, and a corresponding transformation
to a message-passing implementation [Li and Kraemer 2013].
Because the hard part of using threads lies in the different states that the program
may be in, the modeling techniques for threads are essentially the same as for events.
User interaction
The user interface of mobile apps is very important. It must be intuitive and clear,
and should be adequate for devices that may differ in the properties of the screen
and in sensors for user input. One aspect of user interaction is the visual design,
which falls beside the scope of this article; another aspect is the question which kind
of inputs each screen should offer, and how these possibilities are associated with
the possible flow of activities: this is the question of the functionality of the user
interface.
Use Case diagrams
UML use case diagrams are a means for specifying required usages of a system. As
such, they may be used to specify which features a user might expect from an app,
but use case diagrams cannot be used to model more detailed user interaction.
Sequence diagrams
UML sequence diagrams may model what happens after a user has taken a certain
action. As such, they are geared to the specification of a specific interaction of ob-
jects, to fulfill a certain use case, but they cannot be used to model more detailed
user interaction.
41
2. THE DESIGN OF MOBILE APPS
Distribution of functionality
The functionality of a mobile app may be divided between the client and the server.
Some functionality may be implemented on both sides, with a different purpose
(for instance, in the case of form validation). The question of how to divide the
functionality between client and server is, in essence, an architectural issue. The
usual modeling technique to describe these decisions is a UML deployment diagram.
In the case of mobile apps, IFML can also be used to model the division of func-
tionality between client and server. Each action is, by default, placed on the server.
An action can be provided with a label [Client] or [CS] (client-side) to show that
it is performed on the client.
Apps may be seen as distributed processes: in general, they have a client process
and a server process, and in some cases, there may be a peer-to-peer aspect. This
aspect of distributed processes may also be seen in terms of events: a message from
the server, from a peer or from another app can be modeled as an event.
42
2.5. How to teach
stance, have a new (elective) knowledge area ‘Platform-based development’ for mo-
bile applications [Joint-Taskforce 2013], and the word ‘mobile’ occurs in various
other knowledge areas.
To model Android apps, one has to combine modeling techniques that are associ-
ated with different knowledge areas. The Curriculum guidelines for graduate degree
programs in Software Engineering [Joint-Taskforce 2009a] mentions Finite State Ma-
chines and Petri Nets in the knowledge area of Formal methods, while UML class and
sequence diagrams fall under the knowledge area of object-oriented design. The
same applies to the curriculum guidelines for undergraduate degree programs [Joint-
Taskforce 2013]. When one would have to place IFML in one of the knowledge areas,
designing user interaction would be the most appropriate. The design of an Android
app thus combines modeling techniques from different knowledge areas. This is in
line with our expectation, because mobile apps show concepts from different know-
ledge areas [Gordon 2013]. Mobile apps form a context for those concepts.
Context-based education is one of the major trends in science curriculum devel-
opment in the last three decades [Bennett et al. 2007]. The purpose of the use of
context is, for instance, to stimulate the transfer of knowledge to other contexts,
to be capable of solving problems in various contexts, or to understand the relev-
ance of the concepts with respect to real-life problems [Gilbert 2006]. Another goal
of context-based learning is to enhance the attracttion of a subject [Whitelegg and
Parry 1999].
There are four models for context-based learning [Gilbert 2006]:
Context as the direct application of concepts: In this model, concepts are cent-
ral. Concepts are explained as abstractions, and context is used to present
examples of those concepts.
Context as the social circumstances: In this model, the teacher and the students
work together on a task within a certain context. The task involves problems
that ask for important concepts.
43
2. THE DESIGN OF MOBILE APPS
responding to changing technology without being caught in the trap of simply train-
ing the latest technology. A key to this is organizing the curriculum around endur-
ing principles and planning to change the example technologies regularly” [Joint-
Taskforce 2009a]. This makes sense, because the knowledge areas will stay the same
during time (while their content will evolve slowly), while application areas or do-
mains will evolve much quicker.
Context as the direct application of concepts translates to the use of mobile apps
as examples in courses that are organized around concepts. A clear advantage of
this model is that courses within a curriculum may be stable: only the examples will
have to be changed from time to time, when new contexts become relevant.
But there are disadvantages as well: “students are not introduced to the social,
spatial, temporal framework of a community of practice that is overtly relevant to
them; the treatment of the application is usually so sketchy as not to constitute a
high-quality learning task; the treatment is not conducted in such a way and for
such a time as to allow students to explore the meaning of concepts in the situ-
ation presented to them; and what is done does not usually relate to their general
background knowledge, beyond that of the concepts that are under immediate con-
sideration” [Gilbert et al. 2011].
44
2.6. Conclusion and discussion
45
2. THE DESIGN OF MOBILE APPS
Language is a ‘fit’ for several aspects of Android apps, while it is not covered in most
curricula (we could not find any curriculum that covered this modeling technique).
This means that, when one would like to teach students how to design mobile apps,
IFML should belong to the standard set of modeling techniques that are taught to
students in Computer Science and Software Engineering. It would be worthwhile to
adopt IFML in such curricula.
Other aspects of mobile apps may be modeled using modeling techniques that
are, in general, taught within, for instance, courses on object-oriented design and
on distributed systems or on formal methods. The IFML could be taught in courses
on, for instance, user interface design. While most modeling techniques already have
a place in most curricula, the fact that these modeling techniques are spread over
such different courses, brings us to the second question.
We have described that modeling Android apps can be seen as a complex task,
and should therefore, preferably, be taught as a complex task: using authentic tasks,
with support on the concepts and the modeling techniques, and with guidance on
how to proceed while designing an app. This is in line with the fourth model of
context-based learning: the use of context within a community of practice, to solve
problems within that context.
Such an approach is one of three models to teach students modeling techniques
for the context of mobile apps (the model in which the student performs the mental
activity of applying concepts to a context is irrelevant with respect to the design of
a curriculum):
• Teach the different modeling techniques in different courses, along the lines
of the above-mentioned knowledge areas: state-related modeling techniques
in a course on formal methods, UML in a course on object-oriented design, and
IFML in a course on user interaction design.
• Use mobile apps as a vehicle to teach concepts. Focus on designing and build-
ing mobile apps from the start, introducing the different modeling techniques
and concepts, and gradually make it more complicated.
• Use mobile apps as a context for problem solving, and teach relevant concepts
on a need-to-know basis. Provide both knowledge on concepts and guidance
on how to proceed while solving the problem.
The first approach is in line with the Curriculum guidelines for graduate degree
programs in Software Engineering [Joint-Taskforce 2009a]. All techniques could be
integrated in a lab project around an app.
The second approach tends to change into the first appraoch [Gilbert et al. 2011],
but has, with respect to the design of a curriculum, the same disadvantages as the
third approach.
The third approach is in line with what is needed for complex learning, and is in
line with the Curriculum guidelines for undergraduate degree programs in Software
Engineering [Joint-Taskforce 2009b]. Adhering to this third approach would mean
that the curriculum, in most cases, would have to be overhauled completely. Often,
that is impossible.
46
2.6. Conclusion and discussion
47
3
1
Experiences with teaching design patterns
1
This article originally appeared in the the SIGCSE Bulletin, volume 36, number 3, pages 151-155, 2004,
and in the Proceedings of the 9th Annual SIGCSE Conference on Innovation and Technology in Computer
Science Education (ITiCSE), 2004.
49
3. EXPERIENCES WITH TEACHING DESIGN PATTERNS
3.1 Introduction
The courses of the Open University in the Netherlands are meant to be studied at
home, without extensive help from teachers. In particular during courses at the
masters level, we expect students to be able to study independently.
One such a masters-level course focuses on Design patterns. The average student
should be able to finish this course within 100 hours. Students are supposed to have
a broad knowledge of and experience with Java, to have experience with object-
oriented design using UML, and to be able to work with an IDE such as Eclipse and a
UML tool such as Argo UML .
The targeted audience of this course is diverse: on the one hand, we offer a
course for students who follow the masters program of Computer Science. On the
other hand, Open University students often have a job in the field of their study, so
their interest is professional as well in many cases. Therefore, the course should be
suitable for software designers who want to gain insight and become better design-
ers: the course should offer professionals usable knowledge and experience.
The course is based on the book Design patterns explained [Shalloway and Trott
2005]. Students read this textbook using an accompanying workbook [Stuurman,
Wester et al. 2002] with exercises, background information and explanations. Fur-
thermore, students receive the ‘classic’ book on Design patterns [Gamma et al. 1994]
on cd.
In designing the course, we used several principles and had to meet several chal-
lenges.
First, while designing the course and writing the workbook, we held the principle
that design patterns are not only learned by reading about them and drawing class
diagrams, but by implementing them as well [Beck, Crocker et al. 1996].
Our claim is that this principle of learning by using design patterns helps the aca-
demic student to gain insight in the how and why of design patterns, and helps the
professional to learn to use them instead of only knowing that they exist. We imple-
mented this principle by providing design and implementation exercises throughout
the workbook.
50
3.2. Related work
Goldfedder and Rising observed that exposure to a variety of systems was more
critical for being able to learn to use design patterns than the number of years of
experience [Goldfedder and Rising 1996]. Therefore, we tried to pick examples and
exercises from varying domains.
However, this is not enough for both academic students and professionals. Apart
from learning individual patterns and the principles behind them, they should learn
how to understand and apply patterns they have not seen before, how to integrate
different patterns, and how to use this knowledge in real-life situations.
Furthermore, design patterns are not learned by reading and doing small exer-
cises. In small exercises, the task of discerning which problems are present and
which patterns could help to solve these problems is a trivial one because of the size
of the exercise. Students should train such a competence by working with a fairly
large computer program. The same applies to the ability to combine patterns: this is
a trivial task in small exercises, and can only be trained truly using a larger program.
Another problem with designing the right exercises stems from the fact that teach-
ing design patterns means teaching advanced object-oriented design. Design can
only be learned by thinking about alternatives, and the advantages and disadvant-
ages of these alternatives. This is a difficult task for a student studying at home: a
classroom where one can discuss matters with teachers or other students is a much
easier environment to train this competence.
Section 3.2 contains some remarks about related work. In Section 3.3, we de-
scribe the general idea of our final assignment, which forms a solution for the prob-
lems sketched above. In Section 3.4, we describe some details of the program that
we use as a base for this assignment. Details about the procedure of the final assign-
ment are given in Section 3.5. In Section 3.6, we summarize the observations we
made, while we give conclusions in Section 3.7.
51
3. EXPERIENCES WITH TEACHING DESIGN PATTERNS
52
3.5. The change scenarios
presentation, and then displays the presentation in a window, with keyboard and
menu controls to nagivate the presentation.
The core concept in Jabberpoint is a Presentation. A Presentation consists
of a sequence of Slides, each of which is built up of SlideItems. Various types of
SlideItems are already available, ranging from text to images. Within each Slide,
the items have a level associated with them, indicating the indentation and (font)
style properties that should be used in displaying the items.
The display of a Presentation is handled in a user interface class that extends
javax.swing.JComponent. It links to the Presentation and keeps track of the cur-
rent Slide in the Presentation using the Observer pattern. It retrieves items from
the current Slide, determines the position for each of them and delegates the ac-
tual drawing of the items to the objects of the specific SlideItem classes. The user
interface is set up fairly implicitly, using Controllers (for keyboard and menu) to
navigate through the Presentation or to load another one.
For the loading and saving of Presentations, Jabberpoint contains a number of
Accessors. Formats supported include XML, HTML and plain text.
Jabberpoint meets most of our criteria. It is both small and big enough, it is
written in Java and it provides basic functionality that most of the students will
understand. Furthermore, even occasional usage of a presentation program suggests
several functional enhancements.
In order to make Jabberpoint usable as the basis for our final assignment, several
changes were needed. While considering exercises and (pattern-based) solutions
for them, we refactored and simplified the code in some areas. For instance, some
classes were renamed (such as Presentation instead of Model, Slide instead of M),
interfaces were introduced, the Accessors were simplified, and the Observer pattern
that was already contained in the original code, was written out of it. The task of
bringing the Observer pattern back into the program was turned into an introductory
exercise for students as a way to get to know the ins and outs of the program.
53
3. EXPERIENCES WITH TEACHING DESIGN PATTERNS
• It should be possible to define more than one presentation using one set of
slides. The order of the slides may change, slides may be left out, or may be
used more than once.
3.6 Observations
At the moment of writing, 38 students have finished the course. The first 18 students
who took the course were asked to fill in evaluation forms. We also had a meeting
with these students, during which the teams held a presentation about their solution,
and told us what they liked and disliked about the course.
54
3.6. Observations
Two students did work individually for different reasons; all other students did
work in a team. Students discussed several solutions with each other, and commen-
ted on having learned from having to give arguments, and being confronted with
the ideas of someone else.
One of the students lived in California, one in Germany, eight in Belgium, and the
others in the Netherlands. Obstacles for cooperation were time-related (one member
of the team studying during weekends, the other one at workdays; one member of
the team studying at night; the other one during the day), and not related to the
impossibility of personal contact.
The workload was equally divided in all teams, according to the students. In
some cases, both students worked out a design, discussed it and chose a final one,
then divided the classes to implement and the parts of the report to write; in some
cases the work was divided by having one student make the design, having the other
comment it, and working the other way around for the implementation.
We tried to avoid the situation that one student does all the work and the other
receives a ‘free’ grade, by asking them to state how the work had been divided, and
having to agree about that statement.
55
3. EXPERIENCES WITH TEACHING DESIGN PATTERNS
3.6.5 Support
We did not offer special support for working within a team, so students relied on
e-mail and telephone to communicate. Providing a versioning server (e.g. CVS)
for cooperation was considered, but declined because of the troubles getting clients
to work on different platforms, and because of the effort for at least some of the
students to learn to work with it. The only support we gave students was a proposal
on how to divide the work, and tips on how to find a suitable teammate.
Our support proved to be sufficient: working together has worked out very well
for all teams.
Another form of support consists of a website for the course, where we have
collected links to more information about the topics of the textbook and workbook.
The website was used by students during the course, but they almost exclusively
used the cd containing the book ‘Design patterns’ [Gamma et al. 1994] to look for
useable patterns for the final assignment.
Students did not use the discussion group that we provided for the course to
discuss problems with their assignments with other students. They did use the dis-
cussion group during the rest of the course, so the explanation is probably that they
believe in an implicit rule that assignments should not be discussed. We will consider
the consequences of telling students explicitly that assignments may be discussed in
this discussion group.
Teams were also supported by allowing them to send in a draft design to the
examinator, who commented on it. We chose for this procedure to help students
avoid spending much time in dead alleys. This form of support was highly valued,
especially the fact that the comments were given within a day or two after sending
in the draft.
56
3.7. Conclusions and discussion
Cooperation within teams had the form of contact by e-mail and telephone, with-
out personal contact, in all cases. The limited support for cooperation proved to be
sufficient for all students.
Some considerations when using this approach are:
• Working out a scenario often both consists of refactoring the original program
(restructuring without changing the functionality), and adding functionality.
In principle, it would be better to separate these two activities. We are afraid
that the assignment would cost students more than 28 hours if we would ask
them to explicitly separate these activities, but it would be worthwhile to ex-
periment with refactoring before designing extra features.
• Students would experience the benefits of design patterns even more than in
the current assignment if they would have to integrate two solutions for two
different scenarios. That would show how patterns really enhance flexibil-
ity. We cannot take this approach because of the time constraint, but we are
considering these type of assignments in courses building on the knowledge
learned in this course.
• The two students working alone sent in poorer results than all students work-
ing in a team. Of course, the numbers are not high enough to make statistically
sound conclusions, but the prediction that working in a team, and therefore
being forced to discuss solutions with each other benefits the learning process
at least seems to hold. It is strongly recommended to have students work in
teams.
57
4
59
4. CHANGES AT RUN -TIME , AT THE SOFTWARE ARCHITECTURAL LEVEL
which makes it easier to apply changes without breaking the architectural style [Stuur-
man 1997].
The – maybe counterintuitive – outcome of the experiments is that in this case,
changing the system by replacing components is only possible by breaking the archi-
tectural style, while applying a change by forcing processes to use a new Java class
instead of the original one is possible while adhering to the architectural style.
Relevance today
Dynamic code evolution, the technique to update programs at run-time, is still not
possible in statically typed languages like Java without providing supplemental tech-
niques. Techniques for exchanging a class with a new version at run-time are still
being developed regularly [Pina and Hicks 2013; Würthinger et al. 2010; Gregersen
and Jørgensen 2009]. We did not find other research than ours on the implications
of this type of change at run-time on the software architecture.
Software architectures that allow for dynamic updating in general often use a
choreographer, a central component with connections to every component that may
be updated dynamically [Cîmpan et al. 2005]. More in line with our dynamic soft-
ware updating using new versions of classes is a framework that makes use of ex-
isting possibilities of ‘hot deployment’ such as found in J2EE, and assures that the
result still adheres to the software architectural style [Song et al. 2011]. In contrast,
our technique of injecting new versions of a class assures adherence to the software
architectural style without the need to check such adherence at run-time.
We do not know other studies in which different techniques for dynamic soft-
ware updating are compared with respect to the software architectural styles these
techniques adhere to. Most studies focus on the problem of changes that have an im-
pact on the software architecture: evolving software architectures [Stuurman 1997;
Barais et al. 2008].
Abstract
60
4.1. Introduction
4.1 Introduction
61
4. CHANGES AT RUN -TIME , AT THE SOFTWARE ARCHITECTURAL LEVEL
development run-time
view view
software software
architecture architecture
structures structures
execute
executable executing
system
62
4.2. A control system for the Maasvlakte
The two different mechanisms for change at run-time that are available in our
solution for the control system are discussed in Section 4.3. One of the mechanisms is
associated with the decoupling of processes as a result of the choice for subscription-
based communication. The other mechanism is based on the late binding properties
of Java. We show implications of both mechanisms on the software architecture.
Related work is discussed in Section 4.4. In Section 4.5 we discuss implications
of what we have found, come up with advantages and disadvantages of both mech-
anisms for change at run-time, and show some loose ends. With Section 4.6, we end
with concluding remarks, and express wishes for future research.
• Control is distributed. Each vehicle has its own controller dictating its beha-
vior. The main reason for this decision is that a distributed model conceptually
fits perfectly to the situation of unmanned vehicles moving around. In prac-
tice, we will have to evaluate performance before deciding whether central or
distributed control is more effective.
• Communication between the vehicle controllers and other processes is modeled
according to the ‘subscription model’, which is explained below.
An analogy to this form of communication is the way usenet users talk to each
other through newsgroups. Someone may send messages to newsgroups. One sub-
scribes to the newsgroups one is interested in, and reads messages appearing in
63
4. CHANGES AT RUN -TIME , AT THE SOFTWARE ARCHITECTURAL LEVEL
those groups. Users have no need for direct connections, and may, in principle, stay
anonymous.
In a system of distributed processes communicating according to the subscription
model, direct connections between processes are avoided. However, one must keep
in mind the restrictions of this form of communication:
• The order in which the data are sent is not necessarily the same order at which
they are received.
• There is no way to ensure that data are not lost, other then sending some
precious data twice or more times. The typical use of subscription-based com-
munication is where the same kind of data is sent over and over again, every
time slightly different [Boasson 1998]. In such a case, the loss of one message
is no disaster: the receiving processes temporarily use information slightly
older than it should be.
• A seperate planner system provides each vehicle with a plan: the place where it
should receive a container from a crane, and the place where it should deliver
the container. Places are represented by their coordinates.
• Each vehicle process knows the position (in terms of coordinates), the velocity
and the characteristics of the vehicle it controls.
Vehicles send their short-term plans (the part of the detailed plan that should be
followed in the immediate future) regularly through a channel. They listen to the
short-term plans of other vehicles and evaluate possible collisions. In the case of a
possible collision, traffic rules determine which vehicle should wait for the other.
To avoid scalability problems, we divided the whole area in so-called regions: a
grid of for instance 10 by 10 coordinated points. Each region is associated with one
channel. Each vehicle sends its short-term plan through the channel associated with
the region it is positioned in; it listens to the same region channel and to the channels
of the eight regions surrounding this region.
Figure 4.2 shows two vehicles in two different regions. Each vehicle sends (solid
arrow) to the channel associated with the region it is positioned in. Each vehicle
listens (dashed arrow) to the same channel, and to the channels belonging to the
64
4.2. A control system for the Maasvlakte
channel
region channel
vehicle
listens to
eight regions around it. Note that it is possible that more than one vehicle drives
within one region.
One region process is associated with each region (those processes are not in-
cluded in the figure). It collects the data of the vehicles driving in the region and
creates a summary which is sent through an ‘image channel’ (not in the figure), for
the visualization system. The visualizer can also be used to zoom in to one region
by telling it to listen to the associated channel. The short-term plans of the vehicles
in that region may then be inspected.
Traffic rules are included in each vehicle process. Every vehicle process listens to
a ‘rules channel’ (not in the figure) which is used to send a new version of the traffic
rules. To avoid version conflicts, vehicles send the version number of the rules they
use together with their short-term plan. In case of a version conflict, a default rule
is used by both parties.
65
4. CHANGES AT RUN -TIME , AT THE SOFTWARE ARCHITECTURAL LEVEL
sends to
rules inject visual
listens to
A region process summarizes the data going through its region channel, and sends
the summary to the image channel. The visualizer process may either listen to the
image channel and receive the summaries of all regions, or listen to one region to
receive detailed information. Every vehicle process listens to the rules channel which
is, from time to time, provided with new rules by the rules injector.
4.2.4 Implementation
The system is implemented in Java. At this moment, we have a simulation of the
system running on the computer network of our research group. We are currently
evaluating the possibilities of a ‘transport lab’ with real miniature vehicles commu-
nicating through radio transmission.
Communication according to the subscription model is implemented in the ‘chan-
nel library’ developed within our research group [de Rooij 1998]. This library offers
a set of classes with facilities to send and receive objects in the form of (unthreaded)
Transmitter classes and (threaded) Receiver classes. One subclass of the Receiver
class is meant for class definitions. It transforms a received class definition into a Java
class and instantiates the class into an object. This class makes use of the late binding
properties of Java. However, in Java, new class definitions are ‘pulled’ by the class
needing it; in this case, we had to ‘push’ new class definitions into the system and
force processes to instantiate them.
Figure 4.4 shows the internal view of a vehicle process. In this figure, active
(threaded) objects are represented by a rounded box, while sharp-edged boxes de-
note unthreaded objects.
The vehicle object performs a loop:
• It asks the VehicleState object for the speed and position of the vehicle, the
short-term plan and the current version of the traffic rules, and adds its identity
to construct the current Vehiclelnfo.
66
4.3. Change at run-time at the Software Architecture Level
Receiver active
active object
VehicleState ReceiverManager
passive
passive object
Prioritydecider Vehicle Transmitter
67
4. CHANGES AT RUN -TIME , AT THE SOFTWARE ARCHITECTURAL LEVEL
A B C D E F G
H I J K L M N
for a listens-to connection. Processes never have a direct connection to other pro-
cesses, and are anonymous. Channels are named, so processes need to know the
name and the type of data of the channels to which they send or from which they
receive data.
When a process is removed, no other process has to be informed. The same ap-
plies for the creation of a new process. Channels can be added too, without affecting
other channels, or any of the existing processes.
What is needed however, to change a software system communicating according
to the subscription model, is an ‘all-knowing’ entity, that should be added to the
system. This ‘all-knowing’ entity has a direct connection to all processes, to be able
to delete them. Moreover, it knows the names and the datatypes of every channel.
Making use of process creation and removal to induce change at run-time in a
subscription-based system, means that one deviates from the model, and allows one
process to have direct connections to every process and every connection within the
system.
A B C D E F G
H I J K L M N
Figure 4.6 shows this need for direct connections. The ‘changer’ in this figure
may stand for a human, for a seperate process, or for one or more of the processes
within the actual system. The type of connections needed for such a system are:
68
4.3. Change at run-time at the Software Architecture Level
A B C D E F G
H I J K L M N changer
Figure 4.7 shows that in this case, the connections available in the subscription
model are sufficient.
Processes should all listen to a channel reserved for class definitions. Upon ar-
rival, the class definition is instantiated into an object, which should connect itself
to objects in the process. In the case study, this change mechanism is only used for
the traffic rules, but in principle every class used in the processes of a system may
be changed using this mechanism.
69
4. CHANGES AT RUN -TIME , AT THE SOFTWARE ARCHITECTURAL LEVEL
the control system itself. The control system is wired according to the subscription
model, while the change management system maintains direct connections to the
processes of the control system.
When changing the system by sending a new class definition, the processes that
are affected are anonymous too: processes that listen to the Class channel and that
use the communicated class will change their behavior. The sender of the new class
does not need to know which processes receive a new class definition.
This mechanism for change at run-time is more in line with the nature of dis-
tributed systems: there is no central control, not even for implementing changes.
This feature opens the possibility of implementing systems that are able to change
themselves, from within: one of the processes might notice the need for change of a
certain class. This process, within the system, may send a class definition for such a
new class, and thus induce a change in every process using that same class. Such a
scenario is not possible when using change at run-time on the process-level, because
the initiator of a change should know which processes are involved, and should have
direct connections to those processes.
Change at run-time at the process level thus is most suitable for situations where
the initiative for a change lies outside the actual system. A change management
system is added to the control system, which can be used to check the validity of
proposed changes, maintain consistency, etcetera. This change management system
should maintain direct connections with the processes of the actual control system.
Changes at the process level may be used within the control system itself as well,
but in this case, direct connections are needed within the control system, which is
not obvious for a system based on anonymous communication.
Changes at the class level on the other hand, may be induced by every process
within the control system, without any need for a change of the used subscription-
based architecture. Of course, changes at the class level may be initiated from the
outside as well.
70
4.5. Discussion
have the form of creation or removal of processes. The software architecture they
implicitly assume is one with direct connections between the processes. A change
management system is used to make certain that changes that have an effect on cer-
tain processes are only applied at moments when these processes are not involved
in a communication transaction. This notion of a ‘safe state’ is elaborated upon by
Goudarzi and Kramer [Goudarzi and Kramer 1996].
By using the subscription model, we avoid the problem of having to check for a
safe state: because communication takes place through channels, no harm is done
when a process is killed while sending or receiving data.
Magee and Kramer describe a specification language for software architectures,
‘Darwin’ [Magee and Kramer 1996]. Using Darwin, it is possible to specify the cre-
ation or removal of processes and the associated connections. Darwin might be a
good candidate as an ADL for subscription-based software architectures.
Oreizy et al. define run-time architectural change in terms of components: they
discern addition, removal and replacement of components, and reconfiguration [Or-
eizy et al. 1998]. The focus is on one architectural style, C2 [Taylor et al. 1996].
Tool-support for change at run-time in C2-based systems is proposed. Change at
run-time at the component level is, again, associated with direct connections be-
tween components.
Segal and Frieder describe a scheme for procedure replacement [Segal and Frieder
1988]. Our class-level mechanism is, like this scheme, a change at source code level.
We use the decoupling aspects of the software architecture, together with the late
binding properties of Java, to enable the use of source code changes at the architec-
tural level.
4.5 Discussion
Change at run-time, at the architectural level, is a rather new research area. The ap-
proaches that we have seen until now aim at the creation and removal of components
in an architecture with direct connections.
Because we use a subscription-based model, the problem of having to apply
changes at the right moment is non-existent. Another reason why we do not have
to worry about lost messages is the nature of subscription-based communication. It
should be used for information that is sent over and over again, every time slightly
different. In such a case, it is no problem when some of the data are lost during the
removal or the creation of a process.
On the other hand, we make use of the same connections for the distribution
of class definitions. As has been said, the only way to handle precious information
in the subscription model, is to send it more than once. Within the subscription
model, there is no mechanism to ensure that eventually every process will receive a
new class definition, and it is impossible to know whether or not every process did
receive a new class definition.
This fact has implications on the internals of the processes involved: one must
always take the possibility into account that two processes might have different ver-
sions of the same class. In our Maasvlakte case, where we send new traffic rules
71
4. CHANGES AT RUN -TIME , AT THE SOFTWARE ARCHITECTURAL LEVEL
in the form of class definitions, we handle this inconsistency problem by having the
vehicle processes send the version of the traffic rules they use, together with their
short-term plan and other information. In the case of a version conflict, every process
involved uses one general default rule.
Change at run-time by creation and removal of processes is not new. New pro-
cesses may get connections to existing channels, or new channels may be created.
When using this kind of change at run-time in a subscription-based software archi-
tecture, one avoids connection-related problems on the one hand, but on the other
hand, one needs to violate the software architecture to enable the removal of pro-
cesses.
Change at run-time by the distribution of new class definitions is new. This mech-
anism is facilitated by the late binding properties of Java, but on the other hand, we
had to find a way to enforce receiving processes to use a received class: normally,
new versions of Java-classes are communicated on a pull-base, while we needed
communication of class definition on a push-base.
In fact, ‘precious’ information should be sent through direct connections. This
enables one to use protocols to check whether the information is really received, or
to take action in the case of failing processes or failing connections.
A wish for future research is to explore combinations of direct connections and
anonymous communication.
Changes at the class level can be implemented by removal and creation of a pro-
cess, provided that one has the means to save the state of a process. The same ap-
plies for the other way around. So, the choice for process level or class level changes
should be based on other considerations than the implementation. One such a con-
sideration is the question wether the initiative for changes comes from within or
from outside. Another consideration could be the fact that direct connections from
outside the system might necessary anyway because the user wants to have direct
control.
4.6 Conclusion
We have presented two mechanisms for change at run-time in a control system con-
sisting of distributed processes, communicating according to the subscription model.
One mechanism is to remove and create processes. As a result of the used com-
munication model, problems of finding a safe state do not exist. On the other hand,
one needs direct connections to the processes involved.
The other mechanism makes optimal use of the anonymous connections, sending
new class definitions through channels. The problem in this case is that the applic-
ation should be able to handle version conflicts.
We already mentioned that a wish for future research is to explore the advantages
and disadvantages of combining direct and anonymous connections.
For the future, we would like to explore both mechanisms for change at run-time.
We would like to build a change management system, and elaborate on the different
kind of consistency checks that might be done by such a system.
72
4.6. Conclusion
73
5
1
Flexible feedback services for exercise assistants
1
This article is based on two publications: ‘Feedback Services for Exercise Assistants’ in the Proceed-
ings of the7th European Conference on e-Learning, pages 402-410, 2008, and on ’A Generic Framework
for Developing Exercise Assistants’ in the Proceedings of the 8th International Conference on Information
Technology Based Higher Education and Training, ITHET, 2007
75
5. FLEXIBLE FEEDBACK SERVICES FOR EXERCISE ASSISTANTS
weight web services. Thus, various front-ends may use the same web services to
create various exercise assistants.
The candidate was involved in creating one such a front-end and in testing an
exercise assistant with students [Lodder, Passier et al. 2008]. Since the publication
of this article, the feedback engine has been extended [Heeren and Jeuring 2014].
Abstract
76
5.1. Introduction
5.1 Introduction
Receving feedback is essential for a student’s learning process. In a classroom set-
ting, feedback is given by a teacher. When a student goes astray, a teacher may
give feedback to a student on how to get back on the right track. However, giving
feedback to a number of students is labour-intensive.
Many electronic exercise assistants have been developed to support a teacher in
this regard. Exercise assistants in many domains, such as logic, algebra, calculus,
etcetera, support a student to practice skills. These exercise assistants usually offer
a rich user interface and various kinds of feedback. Exercise assistants may support
a large number of students.
Another advantage of an exercise assistant is that feedback may be given imme-
diately, which is nearly impossible for a teacher when the number of students grows.
Research has shown that during exercises, under certain circumstances, immediate
feedback improves the performance of a student [Hattie and Timperley 2007; Mory
2003; Morrison et al. 1995]. In Rules of the Mind, Anderson discusses the effect-
iveness of feedback in intelligent tutoring systems and observes no positive effects
in learning with deferred feedback, and even observes a decline in learning rate in-
stead [Anderson 1993]. Erev et al. also claim that immediate feedback is often to
be preferred [Erev et al. 2006].
Providing feedback is of fundamental importance for the acceptance and usability
of exercise assistants.
There are many exercise assistants [Beeson 1998; Chaachoua et al. 2004; Cohen
et al. 2003; Goguadze et al. 2005], but the feedback they offer is usually limited, or
labourious to specify. Some exercise assistants are limited to one domain, whereas
others are not able to generate exercises, so exercises have to be listed by hand. To
our knowledge none of the exercise assistants available today can generate feedback
on the strategy (or procedural) level.
We have a feedback engine that provides various types of feedback, listed in Sec-
tion 5.2, and can derive sematically rich feedback within several domains, automatic-
ally. We have made our feedback functionality available to other exercise assistants.
Exercise assistants can extend their functionality with the feedback we offer.
The contributions of this paper are:
The document is structured as follows. Section 5.2 lists the types of feedback
we provide. We describe the web services that are to be used to access our feedback
functionality in Section 5.3. Section 5.4 describes the interface details and illustrates
the use of our services with an example application. Finally we describe related and
future work and draw our conclusions in Section 5.5.
77
5. FLEXIBLE FEEDBACK SERVICES FOR EXERCISE ASSISTANTS
5.2 Feedback
Ideally a tool gives various kinds of detailed feedback. For example, when a student
rewrites 12 + 13 into 36 + 2, our feedback engine will signal that there is a missing
denominator.
If 12 + 13 is rewritten into 25 , the feedback engine will signal that an error has
been made when applying the rule of adding fractions: correct application of this
definition would give 56 .
Finally, if the student rewrites 25 + 53 into 10
4
+ 53 , it will tell that the fractions
already have a common denominator and according to the strategy, the numerators
should be added.
The first kind of error is a syntax error, and we are able to detect them because
good error-repairing parsers, which suggest corrections to formulas with syntax er-
rors, exist [Swierstra and Alcocer 1999]. The second kind of error is a rewriting
error: the student rewrites an expression using a so called ‘buggy’ rule. There are
interesting techniques available to find the most likely error in the case that a stu-
dent rewrites an expression incorrectly [Bouwers 2007]. The third kind of error is
an error on the level of the procedural skill or strategy to solve this kind of exercise.
Only very few tools give feedback at intermediate steps, other than in the form
of correct/incorrect answers. Although correct/incorrect feedback at intermediate
steps is valuable, it is unfortunate that the full possibilities of e-learning tools are
not used. The main reasons probably are that the support of detailed feedback for
each exercise is very labourious and that providing a comprehensive set of possible
bugs within a particular domain requires a lot of research [Hennecke 1999]. Also,
automatically calculating feedback for a given exercise, strategy, and student input
is very difficult.
The following list gives an overview of the possible types of feedback:
78
5.3. Feedback services
79
5. FLEXIBLE FEEDBACK SERVICES FOR EXERCISE ASSISTANTS
5.3.1 Domains
To be able to derive feedback automatically, our feedback engine needs a description
of a domain (like logic or arithmetic), a set of domain-specific rules (such as the
De Morgan rules for the logic domain), and a strategy (such as: rewrite until the
expression is in disjunctive normal form). Rules are specified as a set of rewrite steps.
Strategies are specified in an embedded domain-specific language in Haskell [Peyton
Jones 2003].
Our approach to specify strategies for exercises is generic and not limited to a
particular exercise domain. We have developed a strategy language in which we can
specify strategies (‘first do this’, ‘repeat this’ etcetera) [Heeren and Jeuring 2009].
From this specification we can create something that looks like a context-free gram-
mar. The sentences of this grammar are sequences of rewrite steps (applications of
rules). We can check whether or not a student follows a strategy by parsing the se-
quence of transformation steps, and checking that the sequence of transformation
steps is a prefix of a correct sentence of this context-free grammar.
Besides providing feedback, our feedback engine can generate exercises for every
domain that can be described using a domain description. We use the domain de-
scription for a tool named QuickCheck [Claessen and Hughes 2011], an automatic
testing tool for Haskell, with which our feedback engine is able to generate random
exercises. In the near future, we would like to automate this process, by making use
of generic programming [Backhouse et al. 1999]. The difficulty of an exercise is may
be specified as a parameter.
Our feedback engine is equipped with several domains, and we keep adding more
domains. At the time of writing our feedback engine offers the following domains
(and exercises):
Let us consider an example from the arithmetic domain: the problem of adding
two fractions, for example, 12 + 13 .
The set of rules consist of:
add: ( ac + b
c = a+b
c )
multiply: ( ab × c
d = a×c
b×d )
rename: ( ab = a×c
b×c )
a buggy rule: ( ab + c
d = a+c
b+d )
80
5.3. Feedback services
A possible strategy to solve this type of exercise is the following: find the least
common denominator (LCD) of the fractions, rename the fractions such that LCD
is the denominator, add the fractions by adding the numerators. Here, we show
the various types of feedback we may encounter when a student tries to solve the
exercise.
Correct-incorrect statements: If the student submits 56 as the final answer, the
feedback engine will indicate that the exercise has finished. If the student
submits a wrong answer, and no buggy rule can be recognized, our feedback
engine indicates that the submission was incorrect. Another possibility is that
the following expression is submitted: 36 + 62 . Our feedback engine will recog-
nise that the final solution has not been reached and will report that another
step can be made. It can even tell which step the student has to take next.
Distance to the solution: When the student starts solving the exercise, the feed-
back engine can indicate the (minimum) number of steps it takes to solve the
exercise. An exercise assistant can use this information to display a progress
bar.
This information is useful in another way as well. Suppose that a student has
rewritten the fractions in such a way that they have a common denominator
(applied the rename rule). Instead of taking the next logical step (adding the
numerators), the student now renames the fractions again. Although this re-
writing may be valid, it is not the most efficient way to solve the exercise. The
rewriting does not shorten the distance to the solution. An exercise assistant
may convert this information into an appropriate feedback message.
Rule-based feedback: Whenever a student gets stuck during an exercise, the feed-
back engine may help. The feedback engine knows where a student resides
in the strategy and can deduce the applicable rule(s) from the strategy. This
information can be returned to the student in the form of a hint, for instance,
‘Try to apply the rename rule’. If a student still remains stuck, the feedback
engine can apply the rule itself, and show the student the resulting rewriting.
Buggy Rules: If a student makes an error, the feedback engine checks if a buggy
rule (a common mistake) can be matched. If that is the case, the buggy rule
is reported to the exercise assistant. An example of a buggy rule is to add the
numerators and denominators( 12 + 31 = 52 ). An exercise assistant can tell the
student what error he or she has made, and give a hint, using the rule-based
feedback, about which rule he or she should have applied.
Strategy feedback: The feedback given in the previous examples often is already
related to a strategy. A strategy defines the route towards the result. If a
student deviates from the route, there are two possibilities: the student has
made an error, and the feedback engine gives appropriate feedback, or the
student performed a valid rewriting that is not part of the strategy. This is
what we call a detour; it is up to the exercise assistant to decide which action
to take, either to force a student to remain within the strategy, or to let him or
her carry on, along a less efficient or unknown route.
81
5. FLEXIBLE FEEDBACK SERVICES FOR EXERCISE ASSISTANTS
Our feedback engine can be easily extended with additional domains. Instanti-
ation of a particular domain is a labour-intensive process, but less labour-intensive
than having to specify feedback by hand. Once the domain, rules and strategies are
specified, we can calculate feedback automatically. It is no longer necessary to con-
struct feedback by hand, which is an error-prone process. Our feedback services even
include feedback on the strategy level, which is, to our knowledge, unprecedented.
In this subsection, we described the feedback that our services provide; the next
subsection describes how the services themselves.
Note that the URL needs to be escaped from illegal characters (such as spaces
and curly braces), but for clarity reasons we use a representation without escape
characters. The CGI binary has one parameter called input. The example service
call results in the following result reply:
{
" result ": [
" Rename " , " [ ] " ,
[
4
http://ideas.cs.uu.nl/trac
82
5.4. Service specification
In the next section, we explain the syntax and semantics of the service call and
its result in more detail. We will also show how to embed the service calls through
JSON - RPC in a web application.
An interesting feature of the protocol is that it is stateless. When necessary, the
state is passed through in the form of a parameter. We represent the state as a four-
tuple, containing (we append the values from the previous result of the example
between parentheses):
• a location parameter that holds the place in a strategy. A strategy can be ex-
pressed as a sequence of rewritings. The location parameter is encoded as a
list of integers. The integers in the list encode which rewritings of the possible
sets of rewritings have been used. If these rewritings form, together, a prefix
of a complete strategy, we are in the middle of a derivation to the end solu-
tion, in line with a certain strategy. The location is such a prefix of a strategy:
([0, 2, 2, 1, 0, 1]);
Because of the fact that the protocol is stateless, the state parameter should be
saved when someone would like to continue the exercise at a later point in time.
This mechanism offers exercises assistants the opportunity to save a student’s work.
The general structure of the JSON input parameter, which should be supplied in
the URL, is:
83
5. FLEXIBLE FEEDBACK SERVICES FOR EXERCISE ASSISTANTS
{
" method " : <s e r v i c e name>,
" params " : < l i s t o f parameters >,
" i d " : <i d o f t h e e x e r c i s e >
}
The result of a generate service call is a new state, containing a fresh exercise:
{
" r e s u l t " : [ " S i m p l i f y i n g f r a c t i o n s " , " [ ] " , "2/3 + 4 / 5 " , " [ ] ; " ] ,
" error " : null ,
" i d " : 42
}
In addition to the new state, the result value contains an error value, indicating
whether there were any errors, and an identifier value.
derivation: The derivation service takes a state parameter as input:
{
" method " : " d e r i v a t i o n " ,
" params " : [ [ " S i m p l i f y i n g f r a c t i o n s " , " [ ] " , "1/2 + 1 / 3 " , " [ ] ; " ] ] ,
" i d " : 42
}
It returns a path to the end solution, in the form of a list of three tuples,
containing the rule identifier, the location and the resulting expression:
{
" result ": [
[ " Rename " , [ ] , " ( ( 3 / 6 ) + ( 2 / 6 ) ) " ] ,
[ " Add " , [ ] , " ( ( 3 + 2 ) / 6 ) " ] ,
[ " AddConst " , [ 0 ] , " ( 5 / 6 ) " ]
],
" error " : null ,
" i d " : 42
}
allfirsts: The allfirsts service takes a state value as a single input parameter, and
returns a list of three arrays, containing a rule identifier, a location and a new
state value that would be the result of applying the rule. The list represents all
valid steps a student might take from this location in the strategy. The head
of the list is a rule that leads to a path to the end solution.
84
5.4. Service specification
onefirst: The onefirst service is just the head of the list returned by allfirsts. This
service is redundant; it is in the interface for convenience reasons.
applicable: The service applicable takes a location and a state as input parameter,
and returns a list of all rule identifiers that are applicable to the current ex-
pression. The list also includes rules that are not within the strategy.
apply: The service apply takes a rule identifier, a location and a state as input, ap-
plies the given rule to the current expression, and returns a new state.
ready: The service ready determines whether an expression in a state input para-
meter, is the final solution. This service returns a boolean value.
stepsremaining: The service stepsremaining returns an integer denoting the num-
ber of steps towards the end solution, given the state.
submit: The service submit takes the current state and the student input in the form
of an expression:
{
" method " : " submit " ,
" params " : [
[ " Simplifying f r a c t i o n s " , " [ ] " , "(1/2) + (1/3)" , " " ] ,
"(3/6) + (2/6)"
],
" i d " : 42
}
It returns one of the following result codes, together with values, depending
on the result code:
SyntaxError: A syntax error occurred.
Buggy: One or more buggy rules could be matched; a list with their identifiers
is returned.
NotEquivalent: The student has made a mistake.
Ok: The submitted expression is equivalent, and one or more rules have been
applied that are in line with the strategy. A list of applied rule identifiers
and a new state are returned.
Detour: The submitted expression is equivalent, but one or more of the ap-
plied rules do not correspond to the strategy. A list of rule identifiers and
a new state are returned.
Unknown: The submitted expression is equivalent, but none of the known
rules matches.
In JSON , the result reply has the following form:
{
" result ": {
" r e s u l t " : " Ok " ,
" r u l e s " : [ " Rename " ] ,
" state ": [
85
5. FLEXIBLE FEEDBACK SERVICES FOR EXERCISE ASSISTANTS
Every type of feedback that we described out in Section 5.2 can be constructed
using the set of services introduced in this section. For example, the ‘distance to the
solution’ type of feedback is enabled by the stepsremaining service. The ‘buggy rules’
type of feedback is delivered by the submit service.
Note that this code uses the well known jQuery JavaScript library, which provides
a clean interface to make AJAX requests. The function genExercise declares a vari-
86
5.5. Conclusions, related work, future work
able exercise that points to an HTML element with identifier ‘exercise’. A successful
service call updates the HTML element with the result value.
The following HTML fragment shows how to display a button that invokes the
function genExercise, and a field, with identifier ‘exercise’, which will contain the
result value after a service call.
<html>
<body>
...
<div a l i g n =" c e n t e r ">
<button id =" g e n e r a t e "> Generate e x e r c i s e </button>
<h2>Generated e x e r c i s e :</h2>
<pre id =" e x e r c i s e " >... </ pre>
</div>
</body>
</html>
This small example shows that semantic rich feedback can be obtained, in a client,
with a relatively small effort. The expressions in this HTML example are encoded in
plain ASCII. To improve the usability, a better representation can be given by also
using non-ASCII characters. However, these improvements are domain-specific and
are not trivial to automate.
Related work: There are many exercise assistants that offer students an environ-
ment in which they can practise skills by solving exercises, such as MathDox [Cohen
et al. 2003], Aplusix [Chaachoua et al. 2004], the Autotool project [Rahn and Wald-
mann 2002], ActiveMath [Goguadze et al. 2005] and MathPert [Beeson 1998], to
mention just a few. They usually offer a rich user interface and immediate feedback
to the student. However, most of them are limited to correct/incorrect feedback,
because it is often difficult and labourious in these systems to catch and analyse
mistakes.
87
5. FLEXIBLE FEEDBACK SERVICES FOR EXERCISE ASSISTANTS
The ActiveMath project also provides services [Libbrecht and Winterstein 2005].
These services operate on a different level, and offer functionality to create a whole
course. Our services focus at the level of exercises.
Future work: We continue our research and try to improve our feedback engine
and services, by adding more domains and more protocols, to increase the number
of exercise assistants that can use our feedback services.
A topic that needs further research is how to allow others, for example teachers
or domain experts, to specify exercises, strategies and feedback messages.
88
6
1
This article originally appeared in the Proceedings of the Computer Science Education Research Con-
ference CSERC, 2014.
89
6. HOW TO GUIDE STUDENTS TO CREATE GOOD AND ELEGANT CODE
Abstract
6.1 Introduction
Unfortunately, students are often not able to program after having followed intro-
ductionary programming courses. For instance, a great majority of these students
are not able to perform the following steps: 1. Abstract the problem from its de-
scription, 2. Generate sub-problems, 3. Transform sub-problems into sub-solutions,
4. Re-compose the sub-solutions into a working program, and 5. Evaluate and iter-
ate. [McCracken et al. 2001]. Another study reveals that students are, in general,
not able to ‘provide a summary of what the code does in terms of the purpose of the
90
6.1. Introduction
91
6. HOW TO GUIDE STUDENTS TO CREATE GOOD AND ELEGANT CODE
By using our guidelines, students should be able to write elegant code. By ‘elegant
code’, we mean code that adheres to the design principles that we will introduce later
in this article.
As a first step in the validation of our guidelines, we have followed them ourselves,
creating a module for form validation. We show that one can start with a program
that is correct but does not comply with the software engineering design principles,
and derive, step by step, code that is easily extendible, and conforms to the design
principles of software engineering.
In this article, we describe the rules we give our students to recognize an accept-
able solution, and we show the guidance for the process toward a solution. We will
show how adhering to these guidelines leads to elegant code, by presenting a generic
module for form validation as example. Even though there are several existing lib-
raries for form validation, form validation is a fruitful subject when teaching students
to apply design principles as abstraction, modularity, extendability and information
hiding to JavaScript code.
6.1.1 Contributions
We offer a set of guidelines to derive programming code that adheres to the design
principles of software engineering. We show how these guidelines may lead to el-
egant code by applying them to an example problem: client-side form validation in
JavaScript.
Some of the guidance is specific for form validation or for JavaScript, but most
of the guidance is applicable to other programming languages.
The resulting module and the process followed form an excellent illustration of
how to follow our guidelines, and of the fact that these guidelines may indeed lead to
elegant code. What needs to be done, however, is to validate whether the guidelines
really help students in practice.
Supportive information: The information may be related to the domain of the task,
or describes how students may recognize that a solution is acceptable. In
Section 6.4, we describe both the specific rules to which a solution for a form
validation module must adhere, and general design principles that must hold
for any program.
92
6.2. Related work
In Section 6.6, we show that following our guidelines indeed leads to code that
adheres to the design principles of Section 6.4. Finally, in Section 6.7, we discuss
our work, draw our conclusions and define future work.
93
6. HOW TO GUIDE STUDENTS TO CREATE GOOD AND ELEGANT CODE
and a plan is ‘a fragment of code that performs actions to achieve a goal.’, has a pos-
itive influence on the students’ understanding of programs [Hu et al. 2012]. This ap-
proach offers students a form of procedural knowledge. Compared to our guidelines,
the procedural knowledge is less detailed, and it is geared to novice programmers,
while our guidelines are for more advanced students. Another study showed that
providing students with explicit ‘strategies’ to use goals and plans resulted in better
grades [De Raadt et al. 2009].
As far as we know, there are no other studies than ours on the role of procedural
information for the complex task of programming web applications and event-driven
programming or for advanced programmers.
94
6.4. Supportive information
that all data are correct with respect to their specification. Correctness only needs
to be checked if a field is complete (either has a value or is optional).
Browsers that support form features of HTML5 already validate user input accor-
ding to the type attribute (such as date). There are even some browsers that validate
user input according to the value of the pattern attribute. In these browsers, valida-
tion using JavaScript is not really necessary, but it is still advisable, because feedback
given by browsers is often confusing. Furthermore, browsers are not able to validate
related input fields such as a street name, a house number, a city name, and zip code.
Client-side form validation in JavaScript thus is still necessary, and will be necessary
at least in the near future.
• The text has the right format. Form data are received, by the script, in the
form of a string. Such a string should be parsed to check whether the input
has the expected format (according to the robustness principle). For example,
a (Dutch) zip code is formed by a sequence of four numbers, an optional space,
and two letters.
• Tha value is within a specific range defined by a minimal and maximal value.
For example, the age of a person should be between eighteen and hundred
and twenty.
• The combination of data is correct. For example, the street name, house num-
ber, zip code and city name entered should be a valid combination.
Combinations of type and range will often occur, for example, an integer within
a certain range or a string value out of an enumeration of strings. A variation of the
second property is to require only a minimum or maximum value (for example, a
person should be 18 years or older). Of course, there is always a default minimum
and maximum: the minimum and maximum supported by JavaScript.
The third property (combination) is often validated on the server, because one
needs to look up data in a database, which will, in general, not be available at the
client-side. Therefore, the third property falls outside the scope of this task.
95
6. HOW TO GUIDE STUDENTS TO CREATE GOOD AND ELEGANT CODE
96
6.4. Supportive information
Server-side validation is mandatory: All data must be validated on the server, be-
cause client-side validation can easily be bypassed and/or a user can have
switched off the Javascript engine. The server is responsible for security, and
for guarding the integrity of the stored data. Client-side form validation has a
different purpose: usability, and user experience.
Enough is enough: Only those validation functions should be performed that 1) do
not need secure information from the server, and 2) support the user. The first
restriction means that, for example, validation of authorization information
should not be performed at the client-side. The second restriction means that
the focus of client-side form validation should be on user experience: clear
information about the completeness and correctness and about the way a form
should be filled in.
Robustness principle: The robustness principle [Postel 1981] says ’Be conservative
in what you do, be liberal in what you accept from others’. A form is an inter-
face with two faces: one to the application software and one to the user. Both
faces have different requirements. For example, a software function might
need a parameter of type integer, where a user might think in terms of 1, 1.00
or even ‘one’; the form should – preferably – allow the user to enter 1, 1.00 or
‘one’, and the validation program should translate this input into an integer.
An interface satisfies the robustness principle if 1) no rigid demands on the
user input exist, 2) automatic translation to internal representations occurs
in those cases where the data entered is of a type that is unsuitable for the
processing software, 3) the requirements on the data to enter are clear for the
user, and 4) clear feedback is presented in cases of invalid as well as valid data
(for example by showing a green check sign near the input field). Feedback
should be presented after pressing the submit button.
Guide the user: A user should be guided implicitly as well as explicitly. Impli-
cit guidance means using clear labels (specifying what should be entered),
placeholders (presenting an example of what should be entered), fieldsets
with legends (grouping related fields together), and, for example, radio but-
tons or drop-down lists when one item, or a limited number of items, should
be chosen from an enumeration (limiting the number of possible values to
enter) [Bargas-Avila et al. 2010].
Explicit guidance means that a user should be informed immediately after sub-
mitting the form about the completeness and correctness of the form.
Aim for reusability: Reusability means that software elements may serve for the
construction of many different applications [Meyer 1997]; reusability is an
obvious principle in case of form validation, because forms often ask the same
data, for example, name, address, zip code, city, and phone number. As a
result, often, the same validation has to be performed.
Aim for extensibility: Because variations in input data exist, the programming code
should be easily extendible (new validation functions can easily be added) as
well as adaptable (existing functions can easily be changed).
97
6. HOW TO GUIDE STUDENTS TO CREATE GOOD AND ELEGANT CODE
• In many cases, valid input values are limited to an enumeration. If this is the
case, specify this enumeration.
• In all other cases there are no requirements on correctness, which means that
the format is ‘free-form’ text, for example, a text field to write an opinion about
a certain product.
98
6.5. Procedural information
• Place a span element right to each input field. This element will be used to
display feedback.
• Provide each input element with a title attribute containing the user guid-
ance that you have specified in the data model.
• Use the example value for the placeholder attribute.
• Use the name for the item for the label.
• Give each input element a unique id.
• Give the input element an attribute required unless it is optional.
• Finally, in cases of requirements on structure or of integer values that should
be within a range, specify the corresponding values for the pattern attribute
(a regular expression) or the min and/or max attribute.
• Furthermore, group items together in fieldsets and take care of clear legends.
99
6. HOW TO GUIDE STUDENTS TO CREATE GOOD AND ELEGANT CODE
100
6.6. Applying the procedural information, first attempt
3. Check for cohesion within functions. Also, review the code with respect to
sufficiency, completeness and primitiveness. If a function has more than one
responsibility, split it in several functions.
4. Review the code with respect to separation of concerns. Separate the code
that interacts with the DOM (this can be seen as the controller) from the code
that contains the program logic.
5. Create modules for the controller and the program logic.
6. Review the modules with respect to encapsulation/information hiding and
separation of interface and implementation. Only the functions that are needed
outside the module should be exported; nothing else.
7. Review the code with respect to coupling. The model, for instance, should not
need to call functions from the controller; only the other way around.
8. Check the code with a style checker tool such as JSH int.
9. Test the code with the same test set as was used for the original application.
101
6. HOW TO GUIDE STUDENTS TO CREATE GOOD AND ELEGANT CODE
For the input field representing the number of years without accident, the type
of data is integer. Assuming a minimum value of 0 and a maximum value of 100
years, we specify this field as type integer with a minimum and maximum value.
102
6.6. Applying the procedural information, first attempt
Notice that each input element contains all information needed for validation:
the value to validate and the specifications for completeness and of correctness, rep-
resented by the values of the attributes pattern, min and max. The responsibility of
the script is to validate whether input of the user satisfies the restrictions specified
in HTML; the responsibility of HTML is to specify which kind of input is asked for.
Note that the expression in line 9 exactly represents the definition of complete-
ness: if a field is required, a value should be present.
To check the correctness of the zip code, we create a function that returns true if
the value conforms to the regular expression specified by the pattern, or if there is no
value. The function returns false if the value does not conform to the specification.
const OK = "✓" ,
PATTERN = "pattern" ,
TITLE = "title" ,
ZIPCODE = "#zipcode" ;
function zipCodeIsCorrect () {
var i s C o r r e c t = true ,
element = $ ( ZIPCODE ) ,
fbField = element . n e x t (CLASS_FEEDBACK ) ,
value = element . v a l ( ) ,
pattern = element . a t t r (PATTERN ) ,
regex = new RegExp ( p a t t e r n ) ,
title = element . a t t r ( TITLE ) ;
103
6. HOW TO GUIDE STUDENTS TO CREATE GOOD AND ELEGANT CODE
i f ( v a l u e . l e n g t h > 0) {
i s C o r r e c t = regex . t e s t ( value ) ;
if ( isCorrect ) {
f b F i e l d . removeClass ( INVALID ) . a d d C l a s s ( VALID ) . html (OK ) ;
}
else {
f b F i e l d . removeClass ( VALID ) . a d d C l a s s ( INVALID ) . html ( t i t l e ) ;
}
}
return i s C o r r e c t ;
}
Because of the specification of the HTML input elements, the code of other event
handlers for validating correctness against a pattern is almost the same. Most of the
code could be copied and only the id would have to be changed (which means we
already see a reason to refactor later).
The implementation of the event handler validating the number of years without
an accident could be as follows:
const MAX = "max" ,
MIN = "min" ,
YEARSWITHOUT = "#yearsWithoutAccident" ;
function yearsWithoutAccidentIsCorrect () {
var i s C o r r e c t = true ,
element = $ (YEARSWITHOUT) ,
fbField = element . n e x t (CLASS_FEEDBACK ) ,
value = p a r s e I n t ( element . v a l ( ) ) ,
min = element . a t t r (MIN) || Number . MIN_VALUE ,
max = element . a t t r (MAX) || Number . MAX_VALUE ,
t i t l e = element . a t t r ( TITLE ) ;
i f ( v a l u e . l e n g t h > 0) {
i s C o r r e c t = v a l u e >= min && v a l u e <= max ;
if ( isCorrect ) {
f b F i e l d . removeClass ( INVALID ) . a d d C l a s s ( VALID ) . html (OK ) ;
} else {
f b F i e l d . removeClass ( VALID ) . a d d C l a s s ( INVALID ) . html ( t i t l e ) ;
}
}
return i s C o r r e c t ;
}
At last, we create an event handler for the submit button, that prevents the
browser from submitting the form, and checks whether the input is complete and
correct. The application is now complete (apart from the fact that we do not include
the code for the Ajax call to the server in the case when the input is complete and
correct).
const CLICK = "click" ,
SUBMIT = "#submit" ;
$ ( document ) . ready ( f u n c t i o n ( ) {
$ (SUBMIT ) . on ( CLICK , i s S u b m i t t a b l e ) ;
});
104
6.6. Applying the procedural information, first attempt
event . preventDefault ( ) ;
return complete && c o r r e c t ;
}
105
6. HOW TO GUIDE STUDENTS TO CREATE GOOD AND ELEGANT CODE
37 i f ( value ) {
38 i s C o r r e c t = regex . t e s t ( value ) ;
39 createMessage ( i s C o r r e c t , fbField , t i t l e ) ;
40 }
41 return i s C o r r e c t ;
42 }
43 function yearsWithoutAccidentIsCorrect () {
44 var i s C o r r e c t = true ,
45 element = $ (YEARSWITHOUT) ,
46 fbField = element . n e x t (CLASS_FEEDBACK ) ,
47 value = p a r s e I n t ( element . v a l ( ) ) ,
48 min = element . a t t r (MIN) || Number . MIN_VALUE ,
49 max = element . a t t r (MAX) || Number . MAX_VALUE ,
50 title = element . a t t r ( TITLE ) ;
51 i f ( value ) {
52 i s C o r r e c t = v a l u e >= min && v a l u e <= max ;
53 createeMessage ( i s C o r r e c t , fbField , t i t l e ) ;
54 }
55 return i s C o r r e c t ;
56 }
In lines 25 and 39, we now see a call to the function createMessage instead of
two similar pieces of code that change the feedback field directly.
f u n c t i o n isValidNumber ( element ) {
var i s C o r r e c t = true ,
fbField = element . n e x t (CLASS_FEEDBACK ) ,
value = p a r s e I n t ( element . v a l ( ) ) ,
min = element . a t t r (MIN) || Number . MIN_VALUE ,
max = element . a t t r (MAX) || Number . MAX_VALUE ,
title = element . a t t r ( TITLE ) ;
i f ( value ) {
i s C o r r e c t = i s V a l i d = v a l u e >= min && v a l u e <= max ;
createMessage ( i s C o r r e c t , fbField , t i t l e ) ;
}
return i s C o r r e c t ;
106
6.6. Applying the procedural information, first attempt
We would like to rewrite isSubmittable in such a way that we can call one and
the same function for each input. Note that, here, isComplete and isCorrect have
side-effects to show feedback, and that the side-effect of isCorrect is only needed
when the input is complete.
const INPUTS = "input:not(#sumbit)" ;
107
6. HOW TO GUIDE STUDENTS TO CREATE GOOD AND ELEGANT CODE
c o r r e c t = true ;
event . preventDefault ( ) ;
$ ( INPUTS ) . each ( f u n c t i o n ( index , element ) {
var e l = $ ( element ) ,
f e e d b a c k E l = e l . ne x t (CLASS_FEEDBACK ) ;
i f ( ! isComplete ( e l )) {
complete = f a l s e ;
c r e a t e M e s s a g e ( complete , f e e d b a c k E l , MISSING ) ;
}
else {
i f ( ! i s C o r r e c t ( $ ( element ) ) ) {
correct = false ;
}
c r e a t e M e s s a g e ( c o r r e c t , f e e d b a c k E l , e l . a t t r ( TITLE ) ) ;
}
});
return complete && c o r r e c t ;
}
f u n c t i o n i s V a l i d A g a i n s t R e g e x ( element ) {
var i s C o r r e c t = true ,
value = element . v a l ( ) ,
p a t t e r n = element . a t t r (PATTERN ) ,
regex = new RegExp ( p a t t e r n ) ;
i f ( value ) {
i s C o r r e c t = regex . t e s t ( value ) ;
}
return i s C o r r e c t ;
}
f u n c t i o n isValidNumber ( element ) {
var i s C o r r e c t = true ,
value = p a r s e I n t ( element . v a l ( ) ) ,
min = element . a t t r (MIN) || Number . MIN_VALUE ,
max = element . a t t r (MAX) || Number . MAX_VALUE ;
i f ( value ) {
i s C o r r e c t = i s V a l i d = v a l u e >= min && v a l u e <= max ;
}
return i s C o r r e c t ;
}
function isComplete ( e l ) {
return ! e l . prop (REQUIRED) || e l . v a l ( ) ;
}
The validating functions now have no side-effects; the only function with a side-
effect is isSubmittable, and the only purpose of that function is to have side-effects:
to give feedback to the user, and, if the form is complete and correct, to send the form
to the server. We might decide for a different name for this function, to show that it
has side-effects, but for now, we leave the name as it is. As a bonus, we now do not
need the constructor for Message objects anymore.
For now, the application seems to be sufficient and complete with respect to vari-
ous form items. One exception is that we assumed that every item with type range
involves integers, which means that the attribute step has the default value of 1.
That attribute may also have a value of, for instance, 0.5 or 0.1. In that case, we
would need another validating function, and isCorrect would have to be adapted.
We will leave this for now, but remark that the set of guidelines help us in observing
such an extension, which would make the validation module more generally usable.
108
6.6. Applying the procedural information, first attempt
function isComplete ( e l ) . . .
f u n c t i o n i s C o r r e c t ( element ) . . . .
f u n c t i o n i s V a l i d A g a i n s t R e g e x ( element ) . . .
If, in the future, more validating functions are required, the only function that
will require a change is the function isCorrect. An alternative is to specify the kind
of validation that is required in HTML.
The file controller.js is as follows:
const . . . ;
$ ( document ) . ready ( f u n c t i o n ( ) {
$ (SUBMIT ) . on ( CLICK , i s S u b m i t t a b l e ) ;
});
f u n c t i o n c r e a t e M e s s a g e ( v a l i d , f i e l d , message ) . . .
f u n c t i o n writeMessage ( f i e l d , message ) . . .
f u n c t i o n Message ( v a l i d , f e e d b a c k ) . . .
5. Create modules
Now, it is easy to create modules. The only functions that the controller needs of the
validator are isComplete and isCorrect. The public API thus only consists of those
functions.
var v a l i d a t o r = ( f u n c t i o n ( ) {
// p r i v a t e
const . . . ;
var i s C o m p l e t e = f u n c t i o n ( e l ) {
return complete = ! e l . prop (REQUIRED) || e l . v a l ( ) ;
},
109
6. HOW TO GUIDE STUDENTS TO CREATE GOOD AND ELEGANT CODE
i s C o r r e c t = f u n c t i o n ( element ) {
var c o r r e c t = true ;
switch ( element . a t t r ( TYPE ) ) {
case RANGE :
case NUMBER : {
c o r r e c t = isValidNumber ( element ) ;
break ;
}
default : {
i f ( element . a t t r (PATTERN ) ) {
c o r r e c t = i s V a l i d A g a i n s t R e g e x ( element ) ;
}
break ;
}
}
return c o r r e c t ;
},
i s V a l i d A g a i n s t R e g e x = f u n c t i o n ( element ) {
var i s V a l i d = true ,
value = element . v a l ( ) ,
p a t t e r n = element . a t t r (PATTERN ) ,
regex = new RegExp ( p a t t e r n ) ;
i f ( value ) {
i s V a l i d = regex . t e s t ( value ) ;
}
return i s V a l i d ;
},
isValidNumber = f u n c t i o n ( element ) {
var i s V a l i d = true ,
value = p a r s e I n t ( element . v a l ( ) ) ,
min = element . a t t r (MIN) || Number . MIN_VALUE ,
max = element . a t t r (MAX) || Number . MAX_VALUE ;
i f ( value ) {
i s V a l i d= v a l u e >= min && v a l u e <= max ;
}
return i s V a l i d ;
}
// p u b l i c API
return {
i s C o m p l e t e : isComplete ,
isCorrect : isCorrect
}
}());
The controller may also be changed into a module, and does not have to reveal
a public API.
var c o n t r o l l e r = ( f u n c t i o n ( ) {
// p r i v a t e
const . . . ;
var i s S u b m i t t a b l e = f u n c t i o n ( e v e n t ) {
event . preventDefault ( ) ;
$ ( INPUTS ) . each ( f u n c t i o n ( index , element ) {
var e l = $ ( element ) ,
f e e d b a c k E l = e l . ne x t (CLASS_FEEDBACK ) ;
i f ( ! v a l i d a t o r . isComplete ( e l )) {
writeMessage ( f a l s e , f e e d b a c k E l , MISSING ) ;
}
else {
i f ( validator . isCorrect ( el )) {
110
6.6. Applying the procedural information, first attempt
writeMessage ( true , f e e d b a c k E l , OK ) ;
// send form t o s e r v e r
}
else {
writeMessage ( f a l s e , f e e d b a c k E l , e l . a t t r ( TITLE ) ) ;
}
}
});
},
writeMessage = f u n c t i o n ( v a l i d , f i e l d , message ) {
if ( valid ) {
f i e l d . removeClass ( INVALID ) . a d d C l a s s ( VALID ) . html ( message ) ;
}
else {
f i e l d . removeClass ( VALID ) . a d d C l a s s ( INVALID ) . html ( message ) ;
}
}
$ ( document ) . ready ( f u n c t i o n ( ) {
$ (SUBMIT ) . on ( CLICK , i s S u b m i t t a b l e ) ;
});
}());
Abstraction: The validator exports two abstract functions, and the controller does
not refer to individual form items. The level of abstraction is high.
Coupling and cohesion: The level of coupling is low: the controller uses two func-
tions of the public API of the validator, and that is all coupling there is between
the JavaScript files. There is coupling between the HTML and the script: the
script relies on the type, min, max, required, and pattern attributes in the
HTML . However, this is all within the HTML standard.
The level of cohesion of the validator is high: the validating functions only
validate, and do not have side-effects.
Decomposition and modularization: The level of decomposition and modulariza-
tion is high.
111
6. HOW TO GUIDE STUDENTS TO CREATE GOOD AND ELEGANT CODE
112
6.7. Discussion, conclusion and future work
these guidelines. In a situation of distance learning, we might use the Think aloud
method in a session in our electronic learning environment, which allows us to re-
cord what the students does and says.
In the far future, we would like to work on tools to check automatically if a solu-
tion is good enough. Our guidelines could be used to provide meaningful feedback
when a solution is not yet acceptable.
113
Part II
Enhancing changeability
115
7
1
Software architecture and non-functional properties
1
This article originally appeared under the title of ‘Evaluation of Software Architectures for a Control
System: A case study’ in Coordination Languages and Models, the Proceedings of the Second International
Conference COORDINATION, pages 157–171, 1997.
117
7. SOFTWARE ARCHITECTURE AND NON - FUNCTIONAL PROPERTIES
Relevance today
Nowadays, it is common knowledge that influence of the software architectural style
on non-functional properties exists: several researches, including ours, have demon-
strated this influence.
The emphasis within the field of software architecture was, at that time, on the
structure of a system. Later on, the behavior of a system became one of the aspects
that are described by a software architectural document, but in these early days, the
sole emphasis was on structure.
Even though a description of the behavior of a system has become part of its ar-
chitecture, the observation that the modeling technique for the behavior of a system
influences the structural style, is not often made today.
With respect to the non-functional properties that we check, we observe that
today, security would certainly be one of them.
Abstract
In this paper, we give our view on the software architecture phase in the de-
velopment process. During this phase, we distinguish modeling and structuring
activities. A system is modeled according to a certain approach, and this model
is used to instantiate a certain architectural style. In general, the activities are
intertwined.
The choice for a specific software architecture has implications on the non-
functional properties of the system. We illustrate our view with a case study of
a software controller for a (toy) railroad system that we have available in our
software lab. Several models of this system, expressed in formal specification
languages, were made in the past, so we are able to produce a software architec-
ture for the system while carrying out both activities separately.
The resulting software architectures are evaluated with respect to timing as-
pects, scalability, fault-tolerance, and extendibility. Extendibility of a software
system is especially important for domains where changes should be applicable
at run-time. Design for change should start at the software architectural level.
7.1 Introduction
In this article, we illustrate our view of the software architecture phase in the devel-
opment process and the implications of the choice for an architectural style within
that phase, with a case study of a railroad system. The essence of our view is that
118
7.1. Introduction
we distinguish modeling and structuring activities. The choice for a specific soft-
ware architecture has an impact on the non-functional requirements of the system.
Therefore, when evaluating different architectures for a certain system, one should
take into account the non-functional properties that are relevant. Roughly said, one
addresses the functional requirements during the modeling activities, and the non-
functional requirements during the structuring activities.
A software architecture-driven development process consists of a Requirements
Analysis phase, a Software Architecture phase, a Construction phase, and a Main-
tenance and Change phase. During the Software Architecture phase, one models the
system, chooses a software architectural style, instantiates this style, and refines the
instantiation either by adding detail or by decomposing components or connections
(again going through modeling, choosing a style, instantiation and refinement). This
process should result in an architecture that is defined with so much detail that either
reusable components and connections can be fitted, or components and connections
can be designed and implemented. Note that this view does support a sequential as
well as an iterative or an incremental development process, and that in general, the
modeling and structuring activities are intertwined.
model
choose
style
technique
apply choose
architecture refine
119
7. SOFTWARE ARCHITECTURE AND NON - FUNCTIONAL PROPERTIES
120
7.2. Data-centered approach: a global state architecture
In our opinion, design for change should start at the architectural level. When
evaluating an architecture, one should bear in mind that the first mechanism
should be applicable in the changes one can think of.
The two architectures are proposed and discussed in Section 7.2 and 7.3 The final
section contains conclusions and suggestions for future research.
121
7. SOFTWARE ARCHITECTURE AND NON - FUNCTIONAL PROPERTIES
EM CONST
DEC
HALT, CONST, ACC or DEC desired speed > actual speed ACC
HALT or DEC desired speed = actual speed = 0 HALT
ACC, CONST or DEC desired speed = actual speed CONST
ACC, CONST or DEC desired speed < actual speed DEC
ACC, CONST or DEC state of train is ERROR EM
EM actual speed = 0 HALT
‘after’ column the state after the transition; the ‘event’ column describes the event
that triggers the transition.
Another finite state machine is used to model the overall behavior of a train (Fig-
ure 7.3).
Five states are discerned: in the STAT state, a train is situated at a station; in state
START, the route to the next station is (being) determined; in state GO, the train is
driving; in state WAIT, the train is stopped somewhere along the route; state ERR is
used for cases of failures. We have assumed that in the initial state, a train is always
positioned at a station. The transitions are shown in Table 7.2.
Data such as the desired speed is set as a side-effect of state transitions. Table 7.3
shows a simple way of setting the desired speed. Other side-effects consist of de-
termining the route to be taken, and the setting of switches in the railway network.
Figure 7.4 shows an architecture based on this model. A central data store com-
ponent contains the relevant data and sends events, representing changes in the state
or time, to components acting upon these events. These components are able to read
and write the data. The proposed architecture can be seen as an instantiation of the
blackboard style [Shaw and Garlan 1996].
122
7.2. Data-centered approach: a global state architecture
START GO WAIT
start STAT
ERR
123
7. SOFTWARE ARCHITECTURE AND NON - FUNCTIONAL PROPERTIES
The Global Data Store is used to store the global state. Essential in this archi-
tecture is the fact that all data are stored globally. As a result, all data needed by
components are found in the global data store.
Information kept in the global data store consists of the state of the behavior and
speed of each train, of the actual information (about speed and position) of each
train, the parameters of the trains, the schedules, the derived routes and desired
speed, the topology of the railway, the switch settings, and the time.
Certain transitions in the global state represent events.
The Train Behavior Controller carries the responsibility of maintaining the
finite state machine representation of the behavior of the trains, according to the
rules described in Table 7.2. The information it needs consists of the train behavior
states, the schedules, time, the positions, speed and directions of other trains, and
the train parameters. The component modifies the train behavior states, the desired
speed, and the switch settings.
The Route Planner is responsible for determining the route to be taken to the
next station mentioned in the schedule of the train. One may implement a dead-
lock avoiding route planner, or one that does less planning ahead. In the last case,
a second task of the route planner is deadlock detection (and, as a consequence,
determine new routes).
Information needed by the route planner consists of the schedules, the railway
topology, and of the positions, speed and direction of the trains.
The Train Speed Controller is responsible for maintaining the desired speed
in a comfortable way, according to the rules in Table 7.1. Another task of this com-
ponent is to update information about the actual position, speed and direction of the
trains.
Changes in the desired speed of a train and the transition to behavior state ERR
form events of interest for the train speed controller.
The Switch Controller has the task of updating information about the state of
the switches and setting them.
Multiplicity of components: The architecture as it is proposed here does not state
anything about the multiplicity of the components. Obviously, there is only one
124
7.2. Data-centered approach: a global state architecture
data store. On the other hand, each train might have its own behavior and speed
controller, and route planner. Multiplicity of the switch controller is a possibility
as well. Multiplicity of the behavior controller, speed controller, route planner and
switch controller is an open design decision in this architecture.
Scalability
In the case that routes for the trains are generated decentrally, on the fly, the possibil-
ity of deadlocks is present. With an increasing number of trains driving on a railway
network, deadlocks will occur more frequently. The introduction of deadlock avoid-
ance may become necessary, though this will have implications on the timing aspect.
However, whether deadlock avoidance is chosen or not, the architecture as we have
presented it here suits both solutions. Because the global state contains the data of
all trains, a deadlock avoiding algorithm can be introduced very easily.
For scalability reasons, it should be possible to parallelize the computation. As
we have seen, the train behavior and train speed controller can be parallelized (one
for each train). The train speed controller can be split into a component maintaining
the speed, and a component polling the train for actual speed, position and direction
information.
The route planner might be parallelized as well, but in that case, deadlock avoid-
ance is better performed by a separate component. In both cases, computation time
increases with an increase of the complexity of the railway network.
Another possible bottleneck is formed by the access of the global data store. In-
troduction of (parallel) agents detecting changes in parts of the state, with the pos-
sibility to read and write data, might be needed with an increase of the railroad
system.
Extendibility
Changes in the topology of the network are introduced as changes in the data of
the global state. A component, responsible for deriving new schedules, might be
introduced. In this case, the timing issue (components should not make use of the
new data too soon or too late) is rather trivial: a physical change in the railway
network topology will always take place with trains at a safe distance, so the new
125
7. SOFTWARE ARCHITECTURE AND NON - FUNCTIONAL PROPERTIES
situation will be read by the controller components by the time that a train has
reached a new situation.
Changes in the parameters of trains are to be introduced in the same way, by
changing the data in the global data store. When the changes are applied when the
train is in state STAT at a station, the new parameters will be used in time.
The same applies for changes in the schedules of trains: the schedule is read by
the route planner component when the train is going to leave the station, so the new
data will be used in time.
In general, the conclusion is that the proposed architecture is an easily extendible
architecture. Data can be changed fairly easy, and an extension of the functional-
ity can be done by adding or changing components, and adding or changing data
in the global data store. No big changes in the architecture are needed, because
components never communicate directly.
Prerequisites are that changes in the global data store can be applied from outside,
and that components and new data and datatypes can be added at run-time.
Fault-tolerance
A failing train should result in an emergency stop. In our model, this will be effectu-
ated when the event ERR occurs in the global data state (Table 7.2). Error-detection
might be an extra task of the train speed controller (actual speed differs too much
from the expected speed), or may be performed by a new component.
Incident handling requires an overall view of the system. In the global state
architecture, each component conceptually has such an overview. As a result, one
can add components with intelligent incident handling capacities fairly easily.
A failing communication network is another source of problems. We can discern
different type of data in the data store: information that is updated frequently, such
as the actual position, speed and direction of the trains, and information representing
a state, where each change is a major difference with the old data.
The loss of messages containing the first type of data is not really a problem: as
long as the time restrictions are not too tight, a decision based on information that
is slightly older than it should be will do no harm.
Messages containing information about an event or a state transition should not
get lost. A solution to prevent such loss might be to handle this kind of information
in the same way as continually updated information: instead of waiting for an event,
components poll the data in the global data store. Each time when they poll, they
update the state information (or data changed as a side-effect) in the global data
store.
To make the system fault-tolerant, the global data store should be duplicated
and/or distributed on different hardware. In the case that all information is stored
in the global data store, setting an extra processor with one or more components at
work when another fails is easy, because local data do not exist.
126
7.3. Function-centered approach: a data flow architecture
Routeplanner
route
Actual Desired
position deadlock info position
computer computer
127
7. SOFTWARE ARCHITECTURE AND NON - FUNCTIONAL PROPERTIES
The Comparator compares the actual and desired position. To simplify compar-
ison, positions are attributed with an indication of time. A difference between the
actual and the desired position at a same time indicates the need for control, to be
executed in the form of speed and direction commands for the train, and sometimes
commands to set a switch.
Information needed by the Comparator consists of the position and speed of a
train and the state of the switches in the railway network.
The Actual position computer polls the trains and derives <time, position,
speed> for the trains.
The Desired position computer derives the desired position for each train
from the route, sent by the route planner.
The Switch controller keeps track of the state of the switches in the railroad,
and sets them according to the messages of the Comparator.
Multiplicity of components: Both position computers and the comparator in this ar-
chitecture can have multiple instances, i.e. one for each train. For the route planner,
this is less obvious. Introducing deadlock avoidance in a system with one route plan-
ner for each train will be difficult, and will require severe communication between
the different components. In a system where the routes for all trains are computed
by one component, the information needed to avoid deadlocks is available at the
right place.
Scalability
As we have seen, parallelization can be introduced for both position computers and
for the comparator. Inherent to this solution is that the computation time of the com-
parator increases with an increase of the number of trains: to determine whether a
train is able to go on or should stop, the comparator needs information about the
speed and position of all trains. An extra component, filtering the relevant informa-
tion for the comparator, might be needed when upscaling the system.
128
7.3. Function-centered approach: a data flow architecture
The same applies for the route planner: its computation time increases with an
increase of the complexity of the railway system.
Extendibility
A change in the railway topology network should be applied to data in all compon-
ents. Changes in the parameters of a train should be applied in the comparator for
the train. New schedules are to be added in the route planner.
In general, because data and computation are intertwined in this architecture
as opposed to the previous one, one should, for each change in data, determine
which of the components make use of the information. In the case of an extension
of the functionality, one should determine which information is needed for an added
component, and from which components this information can be derived.
Therefore, changes are inherently harder to apply than in the previous architec-
ture.
Fault-tolerance
129
7. SOFTWARE ARCHITECTURE AND NON - FUNCTIONAL PROPERTIES
7.4.1 Conclusions
Software architecture in the sevelopment proces
In this article, we illustrated our view on the software architecture phase in the de-
velopment process, sketched in Figure 7.1, with a case study of a railroad controller
in software. Concerning the development process, we make the following remarks:
• In this case study, the software architecture phase was carried out sequentially:
modeling the system took place first, and then a style was chosen and instan-
tiated. The reason for this order was that several models of the system were
already available.
In general, system modeling and the choice and instantiation of an architec-
tural style are carried out at the same time.
• The case study clearly shows the existence of relations between the activities
within the software architecture phase. The choice of a model influences the
choice of an architectural style, and vice-versa. The adequacy of different
approaches toward system modeling for different architectural styles should
be added to taxonomies of styles.
• Architectural styles differ more in the degree with which they satisfy the non-
functional requirements than the functional requirements.
Timing : Whether temporal constraints can be met or not can only be determined in
a fully implemented system. In both architectures, we were able to reason un-
der which conditions timing analysis would be possible, and we could reason
about possible bottlenecks. At the level of abstraction of both proposed ar-
chitectures, differences between the solutions with respect to timing issues
cannot be found.
130
7.4. Conclusions and future work
Fault-tolerance : Introducing incident handling requires on the one hand the pos-
sibility for a component to run in a separate thread, and on the other hand
the possibility to gather information about the global state of the system. In
the global state architecture, this requires a decision for multiple threads. In
the dataflow architecture, multiple threads are part of the style. On the other
hand, extending the functionality in this architecture is more difficult, because
components communicate directly (so one has to determine where the neces-
sary information should be obtained).
Failing hardware is handled more easily in the global state architecture, be-
cause the state is always available. The global state itself, however, should be
duplicated.
Extendibility : Changes of data (topology of the railroad network, parameters of
the trains, schedules) are very easy to apply in the global data store architec-
ture. In the dataflow architecture, one should always determine which of the
components store such information locally.
In general, changes to the functionality of the system are much easier to apply
in the global data store architecture, because there is no need to analyze where
the information, needed for each component, is to be obtained. A requirement
for the possibility of changes at run-time is that it should be possible to add
components, data and data-types at run-time.
131
8
1
A framework around the radio broadcast paradigm
1
This article originally appeared under the title of ’Software Development and Verification of Dynamic
Real-Time Distributed Systems Based on the Radio Broadcast Paradigm’ in Parallel and Distributed Comput-
ing Practices, pages 105–126, 2001.
133
8. A FRAMEWORK AROUND THE RADIO BROADCAST PARADIGM
Abstract
8.1 Introduction
The continuously increasing power of cheap computers and the integration between
computer systems and communication mechanisms both have an enormous impact
on applications. Applications become more and more distributed, obviously in the
areas of business computing, but also in technical and control domains.
From our perspective, measurement and control applications are interesting since
they depend, perhaps stronger than other kinds of applications, on the notion of time
and on the reliability of the underlying networked systems. In distributed environ-
ments, these notions are hard to control, which influences design and implementa-
tion of distributed control applications considerably.
Part of the additional care to be given to the design of distributed control applica-
tions is based on the uncertainty in the stability of the environment: message passing
in a network may not take a constant amount of time, networks may break down
or be altered dynamically. Development of an application therefore should take into
account an accurate characterization of the execution attributes of the underlying
134
8.1. Introduction
requirements
input for
system
135
8. A FRAMEWORK AROUND THE RADIO BROADCAST PARADIGM
Analysis and verification can be addressed in two ways. The classical way is that
testing and analysis of implementations provide data on execution characteristics,
after which the application is analyzed using these data. For many distributed ap-
plications this approach is not appropriate, simply because the application runs on
different underlying systems with different characteristics. An approach in which
constraints on the architectural support mechanisms are derived, is desirable. In
such an approach, analysis of the application leads to a characterization of essential
constraints in the underlying system that, when met, guarantee the application to
operate correctly.
One of the key issues in our research is therefore to build models for both applica-
tions and underlying frameworks with which a qualitative and quantitative analysis
of execution parameters and attributes in distributed real-time control systems is
possible. To limit the scope of our research we use Java as our language of choice,
and we use a radio broadcast model for interprocess communication.
For the latter, we developed a standardized implementation and a number of spe-
cification and analysis tools. Part of the research then focuses on the characterization
of the radio broadcast model implementation with respect to applications running
on it.
In this article, we describe some elements of our development approach and dis-
cuss a (simplified) example of the analysis we pursue. The architecture we have
chosen is the Radio Broadcast Paradigm (RBP), while the analysis technique used is
parametric model checking. In Section 8.2 we describe the RBP and briefly discuss
its implementation in Java. In Section 8.3 we describe a case study, a distributed
control application. In Section 8.4 we describe our analysis approach and the res-
ults of the application to a simplified model of the distributed control application.
Finally, in Section 8.5, we summarize our results and describe our current work.
136
8.2. The radio broadcast paradigm and its implementations
cesses can be added, removed, and/or replaced without disturbing the information
flow. The subscription paradigm thus provides a mechanism for very late binding.
Splice
SPLICE (Subscription Paradigm for the Logical Interconnection of Concurrent En-
gines) is an implementation of the paradigm developed by Boasson [Boasson 1996]
of Hollandse Signaal Apparaten. The main application area is embedded systems for
command and control systems.
SPLICE extends the basic subscription-based communication model as described
above, by providing a conceptual global data space. This data space is partitioned
into data sorts (channels). Data sorts are typed; the structure of data elements (their
fields and field types) must be specified before the data sort is used. In addition, it
is possible to mark fields of the data sort as key fields. The global data space is a
virtual one; it does not physically exist.
Each of the processes in the space is extended with an agent, responsible for the
communication with other processes. When a process subscribes to a data sort, the
agent creates a local database, specific to that process. Whenever data is received
from the network, it is stored in the local database. If a data item with the same
values for the key fields as the newly arrived data item, is already present in the
database, it will be overwritten. The process can use the local database as a ‘mirror’
of the global data space. The process can subsequently access the local database at
any time for data matching a query.
SPLICE provides a rich query mechanism, so applications can retrieve exactly the
data they are interested in. In addition to queries, processes can put a filter on a
local database. Whereas queries operate on the information already present in the
local database, a filter is used to decide whether a newly received data item is stored
in the database. Filters enable a process to specify a more fine-grained selection of
the information it wishes to process, and reduces the size of the local database.
In most cases, in particular when dealing with an information stream from the
environment, starting with an empty local database is no problem. It will gradu-
ally be filled with information over time. In other cases, the local database must
be brought up-to-date with information that was communicated before the process
subscribed to a channel. SPLICE provides facilities to handle both cases.
SPLICE does not provide an operation to remove a data item from the global data
space. Processes are allowed to remove items from their own local databases if they
do not need the specific data item anymore, but a global remove-operation is not
available.
137
8. A FRAMEWORK AROUND THE RADIO BROADCAST PARADIGM
JavaSpaces
JavaSpaces is a package of Java classes and interfaces, developed by Sun Microsys-
tems very recently [Microsystems 1998]. The package is meant to support the design
of distributed applications using Java. At the moment of writing, only a beta version
is available.
The two main concepts of JavaSpaces are ‘space’ and ‘entry’. The term ‘space’ is
used for the implementation of a JavaSpaces server. A space holds entries: typed
groups of objects, expressed in a Java class. Three (atomic) operations are possible
on entries:
• An entry may be written into a space. The result of this operation is a copy of
the entry object, created in the space.
• An entry may be read, after which the space still holds the entry.
• An entry may be taken, after which the space no longer holds the entry.
With respect to the read and the take operations, JavaSpaces offers the possibility
of matching against a template: entries in the space may be matched against an
object that has some or all of its fields set to specific values (the template). The
remaining fields act as wild-cards.
JavaSpaces offers still another kind of connection between clients of a space (or
JavaSpaces server) and the space: clients may request a server to notify them,
when an entry matching a specific template is written. Notification is done using
a distributed event mechanism. This notify operation makes it possible to use the
JavaSpaces package as an implementation of the subscription-based communication
model.
Notifications may arrive in different orders on different clients, or may not arrive
at all. The JavaSpaces server will make a ‘best effort’ attempt to deliver the notific-
ation. The server will retry at least until the notifications request ‘lease’ is expired.
This ‘lease’ is an amount of time, negotiated between the server and the client, dur-
ing the request for notification. This concept of a lease is added to the JavaSpaces
package to obtain more robustness, in case of failure of parts of a distributed applic-
ation.
Other implementations
A real-time publisher/subscriber model [Rajkumar and Gagliardi 1996] was de-
veloped at Carnegie-Mellon as a basis for building replaceable software units. The
emphasis is on real-time, fault-tolerant systems. In addition to the basic publish/sub-
scribe model, a facility is provided to detect whether nodes in the network have
failed, and when new nodes in the network have joined. Therefore, channels are
consistent to all publishers, i.e., all publishers on one channel will see the same sub-
scribers at every time.
The Tibco Rendezvous Information Bus [TIBCO 1997] is a commercial imple-
mentation of the subscription-based communication model. It is mainly intended
for financial applications, for example, the distribution of stock price information
138
8.2. The radio broadcast paradigm and its implementations
to dealer rooms. One of the interesting features is that when a process subscribes,
it can leave part of the channel name unspecified. The effect is that the process is
subscribed to all channels matching the given channel name.
The Java Shared Data Toolkit [Burridge 1999], a product of Sun Microsystems,
is intended for collaborative interactive applications. It provides the concept of ses-
sions, which processes can join and leave dynamically. Within a session, processes
can send messages to the other processes, and they have the ability to create shared
data structures. The JSDT can be used on top of a number of different communication
mechanisms, such as sockets or Remote Method Invocation. Sun Microsystems offers
JSDT and JavaSpaces as separate products intended for use in different application
areas.
public interface L i s t e n e r {
p u b l i c void a c c e p t ( O b j e c t o b j e c t ) ;
}
Figure 8.2: Public classes and methods in Radio Broadcast Paradigm library
139
8. A FRAMEWORK AROUND THE RADIO BROADCAST PARADIGM
The classes Transmitter and Receiver and the interface Listener, are sufficient
to build complete applications. The programmer does not need to be not aware of
the fact that Transmitter and Receiver objects may be on different machines.
The need to define one’s own classes implementing the Listener interface for
even the most basic ways of handling incoming data is rather impractical. Therefore,
the library contains a few Listener classes for simple processing tasks. They are
summarized in Table 8.1.
140
8.2. The radio broadcast paradigm and its implementations
On execution, the code for the class HelloPrinter is sent to the ClassListener
that is contained in objects of the class HelloConsumer, and the text “Hello, World”
will be printed on the screen.
public class H e l l o P r i n t e r {
s t a t i c { System . out . p r i n t l n ( "Hello, world" ) ; }
}
class HelloProducer {
p u b l i c s t a t i c void main ( S t r i n g [ ] a r g s ) {
try {
Object o =
new C l a s s D e f i n i t i o n ( C l a s s . forName ( "HelloPrinter" ) ) ;
new T r a n s m i t t e r ( "hello" ) . t r a n s m i t ( o ) ;
} catch ( j a v a . i o . I O E x c e p t i o n e ) { }
}
}
c l a s s HelloConsumer {
p u b l i c s t a t i c void main ( S t r i n g [ ] a r g s ) {
new R e c e i v e r ( "hello" ,new C l a s s L i s t e n e r ( ) ) ;
pause ( ) ; // Wait i n d e f i n i t e l y
}
}
Even though the transmit method takes an Object as parameter, only objects
that directly or indirectly implement the interface Serializable can be transmit-
ted. Objects not implementing this interface are silently discarded. The interface
Serializable was introduced in Java 1.1 as part of the Object Serialization API.
Our implementation of the Radio Broadcast Paradigm library uses these features in-
ternally to convert objects to byte arrays before passing them on to receivers. Even
when sending objects within a single Java Virtual Machine, they are serialized and
de-serialized.
Consistent serialization has the interesting consequence that any data structure
that is transmitted will become a ‘deep copy’ when received. Consider for example
a Vector of objects. Applying the clone method to such a Vector will yield a copy
of the vector, however, any reference in the vector refers to the same objects as the
references in the original vector. However, sending and receiving the vector through
the Radio Broadcast Paradigm library will yield a vector with references to copies
of the elements of the original vector. This is important when considering the fact
that one of the purposes of the Radio Broadcast Paradigm is to decouple processes
as much as possible from each other.
141
8. A FRAMEWORK AROUND THE RADIO BROADCAST PARADIGM
ceived is not guaranteed. Even though two objects sent sequentially by the same
transmitter will probably be received in the same order by all receivers, two objects
sent by different transmitters may be received in different orders by different receiv-
ers. An application should not make any assumption about such issues.
Besides platform-dependent native-code solutions, the only form of communica-
tion between different Java virtual machines is the use of TCP/IP-based socket com-
munication. Other high-level protocols, such as Java’s Remote Method Invocation
are built on top of this. Our implementation also uses TCP/IP sockets for commu-
nication between Transmitters and Receivers located in different Java virtual ma-
chines.
The implementation uses one ‘server’ process for each machine in the network
that hosts processes using subscription-based communication. Even on a single non-
networked host, this server process is still necessary to provide communication be-
tween processes running concurrently on this machine. Figure 8.4 illustrates the
possible communication paths; the ‘clients’ in this figure are Java virtual machines
that execute programs using the subscription facilities.
server A server B
hostA hostB
local network
142
8.2. The radio broadcast paradigm and its implementations
is always reliable, so the previous scenario in which a missed message causes a stall
will not occur.
Periodically, the servers communicate with each other and with the clients at-
tached to them, through the set of channel names for which their clients have defined
Receiver objects. Availability of this information minimizes the amount of data ex-
changed between servers and clients, and among servers. Consider, for instance, the
case in which two threads within the same process communicate with each other.
If there are no other processes that have defined Transmitters or Receivers with
the same channel name, the objects communicated between the two threads will not
be sent to the server. However, as soon as somewhere in the network a Receiver is
defined for that channel, the server to which it is attached will announce this to the
other servers, and future objects sent on the channel will be sent to the new receiver
as well.
For each channel name, a Channel object exists. The mapping between channel
names and Channel objects is maintained by a (single) Registry object. Finally, the
Forwarder class, which is also a singleton, is responsible for communication with the
server. It multiplexes and de-multiplexes incoming and outgoing data and control
messages to a single TCP/IP connection.
Registry Transmitter
1 n
n 1
Channel
n 1
TCP / IPconnection
to server 1 n 1 1
Forwarder Receiver Listener
The server program contains a single ‘manager’ object, and two objects for each
connection to the server. These objects handle the incoming and outgoing data
stream, respectively. The manager object keeps a table with information about which
channels should be forwarded to which connections. In addition, there is a separate
thread that periodically broadcasts to the network to discover the presence of other
servers on the network. If a new server is found, a new connection is set up.
143
8. A FRAMEWORK AROUND THE RADIO BROADCAST PARADIGM
scalability with respect to the number of lorries and the number of movements,
flexibility with respect to changes in the number of lorries and the behavioral pat-
terns of the various vehicles operating on the terrain.
For this article, it is assumed that a separate planner system exists that provides
each vehicle with a plan: a function mapping time to the position the vehicle should
be (or should have been) at that moment. A complete plan provides information on
144
8.3. Controlling through subscription: A case study
where to collect the container, how to drive through the area and where to deliver
the container.
In the design of a system based on an RPB, one must keep in mind that there is no
guarantee that data will arrive. The only countermeasure is to send precious data
twice or more times. However, in a case like this, the loss of a single message is no
disaster: the receiving processes temporarily use information slightly older than it
should be.
or as complex as
• A vehicle coming from right has precedence, unless the vehicle from left is delayed
more than the vehicle coming from right.
Under the assumption that any vehicle has a consistent view on the area, applic-
ation of valid traffic rules allows a control process to take a decision on whether to
continue, to stop or to alter the velocity in the presence of other vehicles.
We realize that in order for a lorry to take a decision, having a consistent view
on the whole area is an overshoot. What is required is a consistent view of the
direct environment of the lorry. Therefore, the area in which the vehicles move
is partitioned in regions: a grid of for instance 10 by 10 coordinated points. To
each region one particular channel is associated. A vehicle sends its short-term plan
through the channel, associated with the region it is positioned in; it listens to the
145
8. A FRAMEWORK AROUND THE RADIO BROADCAST PARADIGM
same region channel, and to the channels of the eight regions surrounding this region
as well. Scalability is promoted through this approach.
channel
region channel
vehicle
listens to
In Figure 8.6, we show two vehicles in two different regions. Each vehicle sends
(solid line) to the channel associated to the region it is positioned in. All vehicles
in a given region listen to the same channel, and to the channels associated to the
eight regions around it. Note that it is possible that more than just one vehicle drives
around in one region.
Furthermore, a region process that collects data of the vehicles driving in the
region, is associated to each region. It creates a summary which is sent through the
‘image channel’, available for our visualization system. The visualizer can also be
used to zoom in to one region, by telling it to listen to the associated channel. The
short-term plans of the vehicles in that region may be inspected.
The traffic rules are a part of each vehicle process. Every vehicle process listens
to a ‘rules’ channel, which may be used to send a new version of these traffic rules.
To avoid version conflicts, vehicles send the version number of the rules they use,
together with their short-term plan. In case of a version conflict, a default rule is
used by both parties.
146
8.3. Controlling through subscription: A case study
8.3.4 Implementation
The controller is built using the RBP library that was discussed in Section 8.2.3. In
Figure 8.7 we show the internal view of a vehicle process. In this figure, active
(threaded) objects are represented by a rounded box, while sharp-edged boxes de-
note threadless objects.
Receiver active
active object
VehicleState ReceiverManager
passive
Prioritydecider Vehicle Transmitter passive object
Rules VehicleInfo
has, asks
• It asks the VehicleState object for the speed and position of the vehicle, the
short-term plan and the current version of the traffic rules, and adds its identity
to construct the current Vehiclelnfo.
• Once every few time units, the PriorityDecider is asked to compute the next
position the vehicle will drive to. This is based on the information gathered
from the local environment and – obviously – on the traffic rules. The object
VehicleState is updated.
• The traffic rules themselves may be updated when a new class definition is
sent through the Rules channel.
147
8. A FRAMEWORK AROUND THE RADIO BROADCAST PARADIGM
148
8.4. Analysis of the case study
to accept the communicated value. If a receiver thread is not idling, the value to be
sent by the send-statement will be lost.
XTG and ATL share a single property specification language, a temporal logic based
on CTL (Computation Tree Logic) [Clarke et al. 1986] and TCTL (Timed CTL) [Hen-
zinger et al. 1994]. The usage of these logics is strongly connected with the applic-
ation of model checking verification. TCTL variants are real-time extensions of CTL.
These extensions either augment temporal operators with time bounds, or use reset
quantifiers.
The core syntax of CTL defines two temporal operators, AU and EU. The formula
(φ1 AUφ2 ) is satisfied in a state if for all computation paths starting from that state,
a state that satisfies φ2 is encountered, and until that time φ1 is satisfied. (φ1 EUφ2 )
is satisfied if there is at least one such computation path. Derived operators are:
E F φ (There is path on which there is state satisfying φ), EGφ (There is a path on
which every state satisfies φ), AF φ (On all paths there is some state satisfying φ),
and AGφ (On all paths every state satisfies φ).
Our CTL variant supports two types of atomic properties: boolean expressions
over values of variables and clocks of both the system and the property, and location
expressions. The latter take the form g@l, which expresses the fact that the graph
g of the system is currently at location l.
To address resetting quantifiers, we use a technique found in other TCLTs, which
consists of modeling the reset quantifier by assignments to specification clocks and
variables. As an example, in our CTL variant (referred to as CTL XTG or simply CTL),
z := 0.AF (p ∧ z ≤ 10)
expresses that p will always become true sometime within ten time-units. A second-
ary benefit from this approach is that we can use symbolic constants in our property
formulae (as suggested by Henzinger [Henzinger 1996]). Consider for example, the
CTL formula
149
8. A FRAMEWORK AROUND THE RADIO BROADCAST PARADIGM
1 2
position is accurate, but the position it believes the other vehicle has, is based on the
information it received.
Even though this model is an oversimplification of the original system, it contains
the essential elements: vehicles publishing their own position, and making decisions
based on received information. The communication model is unreliable, in the sense
that a message will be lost when a receiver is not listening, for instance, because it
is busy processing a previous message.
In the ATL specification each vehicle is modeled by a controlling process and a
receiver process. The controlling process periodically sends the vehicle’s position to
the receiver process of the other vehicle. The controlling process of a vehicle retrieves
the (assumed) position of the other vehicle from a variable shared with the receiver
process. Figure 8.9 shows the code of the controlling process and the receiver of one
of the vehicles. The code for the other vehicle (defining the position variable p2) is
similar and is omitted here.
// V e h i c l e 1 ’ s p o s i t i o n
i n t p1 = V e h i c l e 1 I n i t i a l ;
// V e h i c l e 1 ’ s i d e a o f V e h i c l e 2 ’ s p o s i t i o n
i n t q1 = V e h i c l e 2 I n i t i a l ;
// C o n t r o l l i n g p r o c e s s f o r V e h i c l e 1
process Vehicle1 {
forever {
i f ( p1 >= R e g i o n L e f t && p1 <= R eg io nR ig ht )
plan1 . send ( p1 +1);
sleep ( VehicleDelay );
i f ( ( q1−p1 ) > D i s t a n c e || ( p1−q1 ) > D i s t a n c e )
p1++;
}
}
// R e c e i v e r p r o c e s s i n v e h i c l e 1
// r e c e i v e s p o s i t i o n from V e h i c l e 2
r e c e i v e r plan2 ( i n t b u f f e r ) {
sleep ( ReceiverDelay ) ;
q1 = b u f f e r ;
}
150
8.4. Analysis of the case study
Vehicle1Initial 0
RegionLeft 3
RegionRight 12
Vehicle2Initial 15
Distance 2
VehicleDelay 4
ReceiverDelay 7
151
8. A FRAMEWORK AROUND THE RADIO BROADCAST PARADIGM
by
i f ( V e h i c l e D e l a y < VehicleDelayMax )
delay ( VehicleDelay ) ;
else
d e l a y ( VehicleDelayMax ) ;
152
8.4. Analysis of the case study
We show the values of ReceiverDelay1 and ReceiverDelay2 for which the ve-
hicles will not collide. From this figure, it can be seen that a longer communications
latency in one direction can be compensated by a shorter delay in the other direction.
This result shows a relationship that cannot be described by an approximation of a
linear relation. This can be explained by realizing that the vehicle controller pro-
cess ‘samples’ the position of the other vehicle at regular intervals of VehicleDelay.
Changing the value of VehicleDelay will change the size of the ‘blocks’ in the figure,
although the shape will be similar.
Results
The results of the verification experiments described above are shown in Figure 8.13,
where p1 and p2 are positions. The objective of these experiments is to demonstrate
the use of our tool-set for the (formal) derivation of values for which the required
property holds. The parameter values themselves denote execution attributes of
the underlying system. The result indicates the ranges for the values of the various
attributes such that the property is guaranteed to hold.
153
8. A FRAMEWORK AROUND THE RADIO BROADCAST PARADIGM
Varied parameter : The parameter that was varied in the experiment, was the
cycle-time of the vehicles. This cycle-time determines the VehicleDelay, which
amounts to the cycle-time plus 5 milliseconds.
Measured parameter : The parameter that was measured was ReceiverDelay (the
time between the moment a message is sent, and the moment it is received),
in relation to the occurrence of collisions.
By default, the cycle-time of the vehicles was set to one second, meaning that each
second, a vehicle checks the data it did receive giving information on the position of
the other vehicle, and it computes its next step based on those data. Measurement
shows that the time needed for the computation is approximately 5 milliseconds (on
both systems). The actual cycle-time is therefore 1005 milliseconds; the measured
154
8.5. Conclusions and further work
155
8. A FRAMEWORK AROUND THE RADIO BROADCAST PARADIGM
experiments based on model-checker predictions are more complex and the model-
checking itself requires far more resources. One practical issue to be addressed is
visualization of results: as more variables depend on each other, visual representa-
tions of the dependencies become complex.
Current validation runs were done on a large Linux machine, but could have been
done on any PC. Our current experiments involve larger control configurations (over
a dozen vehicles involved) than given here, and verification runs require somewhat
more memory than available on an ordinary PC. However, due to the symmetry in
the ATL specification, the amount of memory for model-checking in the complete
verification remains within limits. The models provide useful insight in further op-
timizations in the model checker.
Our current work consists of optimizing the model checker, and developing robust
translators for notations like UML, Java and C languages into ATL specifications.
156
9
1
Creating a short course on Scala
157
9. CREATING A SHORT COURSE ON SCALA
Abstract
9.1 Introduction
For some universities, it is too big a risk to offer all educational material for free
in the form of Open Educational Resources (OER). This holds, for instance, for a
distance learning university that prepares its own education material, complete with
guidelines, exercises, and other elements that enable students to follow the course
(in principle) without any further guidance2 . The risk of losing considerable income
when offering such material for free is very real.
On the other hand, distance learning universities and OER seem to be a natural
pair. The mission of a distance learning university is to enable everyone to enjoy aca-
demic education, to stimulate students to educate themselves at an academic level,
and offer them the means to do so. Many distance universities – ours is an example
– have the word ‘open’ in their name. In other words, the desire to contribute to OER
is great.
Within our university, there has been an effort to prepare short courses, for free,
in the form of OER [Schuwer and Mulder 2009]. This project was funded both by
the Dutch government and the William and Flora Hewlett Foundation, and has now
ended. A sustainable method for creating OER cannot rely fully on such funding.
The contribution of this article is that we propose a method for sustainable devel-
opment of OER, in the form of short courses, not based on existing material but on
new material, almost without extra funding. The core of the method is to produce
OER as a side-effect of Continuous Professional Development ( CPD ) for teachers [Day
1999]. For that reason, we coin our method the CPD method.
We describe the development process of the CPD method and argue why this
process is sustainable. We propose requirements for a suitable course subject, and
we present the results of a course, prepared using this method. We compare our
approach with existing models of sustainable OER, and discuss advantages and dis-
advantages of our approach.
In this article, we address the following questions:
2
The Open University of the Netherlands is such a distance learning university.
158
9.2. Open Educational Resources
• What are the characteristics of the CPD method to develop an OER course, and
how does it differ from existing models of sustainable OER development?
• Is it possible to engage students and non-students during the development of
a course, and how can they participate? What works, what does not work, in
that respect?
• What are the criteria for the coice of a subject to be used in this type of OER
development?
• What are the advantages and disadvantages of the CPD method and the res-
ulting type of OER?
The remainder of this article is structured as follows. We start by introducing
Open Educational Resources and existing models for sustainable OER in Section 9.2.
In Section 9.3, we introduce an example OER product which is developed with the
CPD method: a short course on Scala, which functions as a running example illustrat-
ing our approach. Next, we describe the development process (Section 9.4) of this
first short course. In Section 9.5, we discuss the characteristics of our CPD method,
with respect to the aspects of funding, technical, and course content. In this sec-
tion, we also elaborate on the differences with the existing models. Section 9.6 then
discusses how the subject of this course meets the criteria of the CPD method. We
conclude the article, in Section 9.7, with an evaluation of the feedback from our
readers, and draw some conclusions and discuss alternatives.
159
9. CREATING A SHORT COURSE ON SCALA
Tools: Software to support the development, use, re-use and delivery of learning
content, including searching and organization of content, content and learn-
ing management systems, content development tools, and on-line learning
communities.
In practice, the costs of OER are far from zero [Downes 2007]. The William and
Flora Hewlett Foundation3 offers a grant for universities and other parties to open
their content, and many universities have funded OER projects themselves. In the
long term, developing and maintaining OER should be possible without additional
funding, in order to make it sustainable. The fact that the costs of OER are not zero
does not only stem from the fact that it costs time (and therefore money) to prepare
existing educational resources for publication on the internet. There is also a risk in-
volved for distance learning universities that create their own educational material:
it is not known how many students only buy courses to acquire the course mater-
ials, without the intention to complete the course. In general, the course material
contains everything needed to study the course. Therefore, it cannot be foreseen
whether offering material for free will increase income (because more people get ac-
quainted with the university), or decrease income (because less students buy courses
since the course material is free).
Hylén [Hylén 2006] lists some arguments for institutional involvement in OER.
First of all, in line with academic traditions, one considers sharing knowledge as a
good thing in itself. Second, educational institutions are funded (partly) from tax-
payers’ money, so it seems just to share and reuse resources developed by publicly
funded institutions. Also, by reusing shared resources, the costs for content devel-
opment can be cut, thereby making better use of available resources. Finally, one
needs to look for new ways of making revenue, for instance by offering content for
free both with the purpose of advertising the quality of the teaching institute and as
a way of lowering the threshold for new students.
160
9.2. Open Educational Resources
main focus. Another aspect is the fact that some resources need a mechanism to stay
available on an ongoing basis. An example of such an OER is the Stanford Encyclo-
pedia of Philosophy4 . This encyclopedia clearly needs to be updated on an ongoing
basis, adding new philosophers or new insights. This requires some mechanism to
be in place. In this article we do not consider OER that require such a mechanism.
Downes [Downes 2007] describes funding models, technical models, content
models, and staffing models for sustainable OER. We will provide a brief overview
of these models.
Funding models
Since there are costs to make existing or new education material publicly available
in the form of OER, sustainable OER needs to address how it is funded. Below, we
sum up existing funding models.
Endowment Model: The project is sustained from interest earned on a fund. The
Stanford Encyclopedia of Philosophy is an example of this model.
Conversion Model: Something is given away for free with the possibility to pay for
extras. Several Linux distributors have adopted this model.
Contributor-Pay Model: The author pays (once) to the provider, who makes the
contribution available for free. The Public Library of Science7 is an example.
The Sponsorship Model: Sponsoring may have the form of advertisements or just
mentioning the name. Examples are the MIT iCampus Outreach8 (Microsoft)
and the Stanford iTunes project9 (Apple).
Institutional Model: An institution itself may pay for an OER initiative, such as MIT
does for its OpenCourseWare project10 .
The Governmental Model: Here, the governmental model represents direct fund-
ing for OER projects. An example is the Dutch Wikiwijs11 project.
4
http://plato.stanford.edu/
5
http://sakaiproject.org/sakai-foundation
6
http://en.wikipedia.org/wiki/Wikipedia:Contact_us/Donations
7
http://www.plos.org/publish/pricing-policy/publication-fees/
8
http://icampus.mit.edu/outreach/
9
http://itunes.stanford.edu/overview.html
10
http://ocw.mit.edu
11
http://www.wikiwijs.nl/home/
161
9. CREATING A SHORT COURSE ON SCALA
The Ithaka report [Guthrie et al. 2008] on sustainability of online academic re-
sources distinguishes between funding by direct beneficiaries (such as subscription
payment, one-time payment, pay-per-use, and contributor payment) and funding
by indirect beneficiaries (such as host institutional funds, corporate sponsorships,
advertisers, philanthropic funding, and licensing).
These models for financial sustainability all concern funding for the costs of OER.
Another relevant aspect, which is not covered by these models, is a mechanism to
reduce the cost of producing and maintaining OER.
Technical models
Technical models address how OER is made available, and how it is used. Roughly,
Downes discerns two models:
• the OER s are used ‘as is’ without modification, or
• resources are downloaded, adapted, and sent back to the system repository
for vetting and potential use by others.
He does not elaborate on the implementation, i.e. the platform needed for these
two models. Obviously, a platform which allows for downloads of content only sup-
ports the first model, whereas Wikis or other community platforms allow for the
second model as well.
Content models
Concerning content, Downes states that sustainability means that the content should
be reusable: it should be possible to integrate content in another context. Our ma-
terial is reusable by definition, in that sense: the material is designed to be studied
without any extra guidance (although we do give extra guidance). Another content-
related aspect is the licensing model used. Also, sustainable OER might need a com-
munity around it. This last point is in line with the recommendations of the Ithaka
report [Guthrie et al. 2008]:
• understanding user needs is paramount but often neglected,
• create a competitive advantage, and
• catalysing a dynamic environment for agility, creativity, risk taking, and innov-
ation is imperative.
Often, it seems to be taken for granted that OER consists of existing material,
but this is not always the case. Wikipedia is an example of an OER for which new
content is created, and in the OpenER project [Schuwer and Mulder 2009] of the
Open University of the Netherlands, some of the OER courses were created using
existing material, but other courses were created from scratch.
162
9.3. An example OER product
Staffing models
Staffing models concern the people involved in producing OER, and making material
available. Downes mentions:
Co-producer model: The consumers of the resources take an active hand in the
production, or the production is done by volunteers. There is little control
over quality and content, but this model requires much less funding.
9.3.1 Scala
The design goal for the programming language Scala was to eliminate the need for
different languages for different goals [Odersky et al. 2010]. For writing a script,
12
MIT Open Courseware, http://ocw.mit.edu
163
9. CREATING A SHORT COURSE ON SCALA
for instance, one needs a different programming language than for writing a com-
piled program. For programming in an object-oriented style, one needs a different
language than for programming in a functional style. For creating a special purpose
(or domain-specific) language, one needs a different programming language than a
general purpose language. In many cases, a special language is needed for parallel
programs as well. Scala has been designed to fulfil all these purposes.
On the one hand, these features make Scala easy to learn. The language can be
learned by starting with very simple scripts, without the need to write a complete
program (which always involves the use of classes and objects). Using the Read-
Eval-Print-Loop (REPL), a student may start by writing single lines in Scala, and one
can immediately see the results.
On the other hand, these features make Scala difficult to learn, because of the
diversity of language features. The object-oriented part of Scala, for instance, has
enhancements to the features of Java and C#. In Scala it is possible to create an
object without an associated class, Scala has the notion of a companion object and
a companion class, Scala has traits, case classes, and case objects, and all these
features have to be learned. The same applies for the functional programming part
of Scala. On top of that, even for students who are already familiar with both an
object-oriented language and a functional language, it is difficult to learn when to
use the object-oriented aspects, and when to use the functional aspects. And of
course, there are features for writing parallel programs, and features enabling one
to develop a domain-specific language with Scala. All those aspects require not only
knowledge about syntax and the API, but also knowledge about best practices, and
when and how to use each feature.
Scala is an attractive language for educational purposes, because of its many
features. In a course about concepts of programming languages, for example, Scala
can be used to show examples of a variety of concepts. Scala could be used as a first
programming language, by starting with writing scripts and explaining the concepts
of variables and functions, later adding object-orientation, functional programming,
and parallel and distributed programming. Scala would then become the language
used in a variety of courses. The disadvantage of such an approach (besides the
fact that all those courses would have to be rewritten completely) is that the main
programming language of the curriculum would be a language that is not widely
used at this moment, although the list of companies adopting Scala is growing, and
contains successful companies like Twitter or LinkedIn.
What we did want, however, was to create the possibility for our students to get
acquainted with at least several features of Scala. Therefore, we decided to create a
short course on Scala, in which we assume knowledge of an object-oriented language
such as Java as a prerequisite.
The course we created [Stuurman and Heeren 2012] can be read on a Wiki (in 87
pages) or downloaded as a pdf document (of 124 pages). We estimate that someone
with a good understanding of an object-oriented language such as Java needs about
30 hours to study the course.
The course is divided into four Sections: ‘The Basics’, ‘Object-orientation’, ‘Func-
tional Programming’ and a project. Each section has an introduction, learning goals
164
9.4. The CPD method for sustainable OER
that direct the student, a body with text and exercises, feedback on the exercises,
and a summary.
The last section of the course consists of the exercises we used at the initial meet-
ing with the students. The exercises suggest modifications to a basic implementation
of the snake game. For the course, we wrote a complete set of answers to the exer-
cises, so whoever gets stuck can see how the exercises can be solved.
In this section we discuss three essential ingredients for creating OER course material
using the CPD method: organizing a reading group of teachers around a topic for
which professional development of these teachers is considered to be required, an
early meeting with interested students, and continuous feedback by students on the
course material.
165
9. CREATING A SHORT COURSE ON SCALA
One could state that the transformation of lecture notes into course pages does re-
quire extra work, but that the teacher benefits from this extra work, acquiring deeper
knowledge.
With the CPD method, a course can be prepared almost without additional cost.
Hence, the process provides a way to create sustainable OER. For the Scala OER
course, we did get support from the faculty (200 hours) to create a course of the
same quality as our regular courses. These extra hours were used to write learning
goals, summaries, and in particular many programming exercises with feedback and
a solution model for the programming assignment. In our opinion, one can create a
course without these extra hours; in that case, the material will probably not contain
exercises, and will be more ‘raw’ in appearance.
166
9.5. Characteristics of the CPD method
wanted to learn more about the language. This meeting made it very clear that a
course on Scala would be welcomed by a part of our student population.
167
9. CREATING A SHORT COURSE ON SCALA
Funding
We cannot rely on external funding, and want to offer OER for free, which rules out
other types of funding. In some cases, there might be a small amount of funding
from the institution itself, but the focus is on minimizing the costs.
We minimize those costs in two ways. First, we do not use existing material for
our OER courses, thus minimizing the risk of losing paying customers by offering
the material for free. We use new material. Second, we create OER based on new
material as a side-product of Continuous Professional Development activities that
are already performed by the teaching staff on a regular basis. University teachers,
especially those within the dynamic domain of Computer Science, continuously have
to update their knowledge. Ideally, a free course should be the valorisation of that
effort: instead of keeping the acquired knowledge to themselves, university teachers
could materialize their newly gained knowledge in the form of a free course.
Ideally speaking, the open courses should have the same quality as courses within
the curriculum. One of the arguments for OER is that it functions as an advertisement
for our courses and programs. That works best if the free course shows the same
quality offered in regular courses. Another cost-related aspect is that it would be
an advantage if parts of the open courses could be used in (future) regular courses.
Preparing courses with the same quality as regular courses though, is only possible
with extra funding. Courses that are created as a side-product of CPD probably will
not contain exercises and solutions, for instance.
Relating this approach to the existing funding models, we simply try to stay out-
side those models, and have found ways to reduce the costs. We achieve this by
creating courses as side-products of efforts we already make. In this way the ad-
ditional costs of production are virtually zero. Improving the course upon student
feedback will require minimal costs that can still be considered part of the CPD.
Technical
Choosing a technical platform may seem to be of minor importance, but the avail-
ability of a platform that enables the type of OER you want to establish is vital for
success. In the case of the Open University of the Netherlands, such a platform is
available. OpenU13 , based on Liferay Portal14 , is used by the faculty of Computer
Science to present courses, research activities, staff members, and news items to the
public. OpenU comes with some typical social media features, such as profiles for re-
gistered users, and the possibility to blog or to use Wikis [Schuwer, Lane et al. 2011].
This platform allows us to create OER in a flexible way, and simplifies interactions
with users. The platform is accessible for everybody, and content can be viewed
without registering. Furthermore, registration is free and possible for everybody.
Registration enables users to publish comments to the content.
In our view, there is a third alternative to the two existing models of offering OER
‘as is’ or allowing users to download, adapt, and send back resources. This alternat-
ive is to allow users to give feedback and to interact with the content providers. A
13
http://portal.ou.nl/
14
http://www.liferay.com/products/liferay-portal/
168
9.5. Characteristics of the CPD method
requirement for this approach is the availability of a social platform with a Wiki. We
consider this third alternative as an essential element of our CPD method. The feed-
back of students serves as feedback to the professional teacher. Some subjects may
not have been understood thoroughly by the teacher, which may lead to comments
of students. When the teacher improves the course on the Wiki, the understanding
of the teacher improves.
A disadvantage of the Wiki as it is offered by OpenU, is that it is not possible to
receive notifications of comments placed on a Wiki page. This means that, in prac-
tice, one shoould regularly check all Wiki pages for new comments. The possibility
of notifications is, thus, highly desirable.
Content
In our situation, it is considered important that OER courses differ from the courses
within the curriculum. The method we propose is intended for creating new courses,
on new subjects.
Our approach is to engage students in an early stage, both to check whether
the selected subject is of interest to the students and to receive early feedback. Such
interaction is not only important for the development of OER, but it also serves a more
general purpose. Interaction motivates students of a distance learning university to
continue their study, which can be very hard for students with a full-time job, having
to study in the evening hours, or for students who are confronted with all kinds of
circumstances in their personal situation.
The subject of an open course should be a new development within the field, not
covered in the regular curriculum. The domain of Computer Science is a domain with
fast-paced changes. Even though courses are aimed at the steady theoretical base of
the domain, it is desirable to pay attention to recent changes, if only to keep students
interested. To develop a new, regular course is labor-intensive (and hence costly).
On top of that, we can only introduce a new course when we withdraw another one
from the curriculum: short open courses offer an attractive alternative for covering
hot topics without giving up the more fundamental courses in a curriculum. A short,
free course offers students to get acquainted with new developments.
These requirements for the content of an OER are not covered by the existing con-
tent models. Engaging students in an early stage is in line with the recommendation
of the OER Ithaka report [Guthrie et al. 2008] to understand users’ needs.
Staffing
The OER course is written by our own staff, but we engage students in an early stage,
and ask for continuous feedback. This can be seen as a combination of the producer-
consumer model and the co-producer model.
169
9. CREATING A SHORT COURSE ON SCALA
We first evaluate the use of the CPD method , and then the engagement of students
with Scala course. At last, we draw conclusions.
170
9.7. Evaluation and Conclusion
course as a side-product of activities that are carried out anyway, as part of regular
continuous professional development. This approach differs from existing funding
models. We think it is important to make the knowledge that individual teachers
acquire when keeping up in their field of work, available to the public. Another
characteristic is that we require a social platform with a Wiki for our OER. This
characteristic differs from existing technical models. A third characteristic is that
we develop new material for OER, that the subject should meet several criteria (not
covered by the curriculum, a recent development, interesting both for students and
the staff studying the subject), and that we engage students early on. This approach
differs from existing content models. A fourth characteristic is that the OER course
is produced by staff members, but that students are engaged in an early stage, and
that we ask for continuous feedback. This is a combination of the producer-consumer
model and the co-producer model.
The second question queries whether it is possible to engage students and non-
students during the development of a course. What works and what does not work,
in that respect? The purpose of a meeting in an early stage is to check the attract-
iveness of the selected subject. It also prepares students on what is to come, and
will make it more likely that they will provide active feedback. A Wiki with the pos-
sibility to add comments works very well, but in our case the disadvantage was that
we regularly had to check all pages for comments, due to the lack of a notification
mechanism.. In this case, a forum to discuss the course did not work. The threshold
to expose yourself appears to be too high (which is supported by the fact that we
also received feedback by email, with the explicit statement that giving feedback in
public did not feel right). As for the cooperation of students in constructing a course
in a setting without mandatory exercises, one should not set the expectations too
high. The fact that students do give feedback reflects their interest, and the fact that
one is able to give feedback stimulates an active attitude while studying.
The third question concerns the criteria for selecting a subject that is suitable for
this type of OER development. We have described our requirements earlier. Another
example of a subject meeting the criteria is the development of mobile applications
for the Android platform. At the moment, we are following the same process with
this subject: we are organizing meetings around this topic, and are reading material,
giving talks, and programming.
The last question asks for the advantages and disadvantages of the CPD method,
and the resulting OER. In our opinion, it is worthwhile to spend some of the time
that each teacher devotes to continuous professional development to materialize the
acquired knowledge into OER material. The question is, however, to what standard.
In the case of the open Scala course, we were able to put in 200 extra hours to
create a course that resembles our regular course material in structure and in quality:
material that can be studied at home without any extra guidance. As a comparison,
to create a regular 100-hours course from scratch we generally need more than 2000
hours: 200 hours of work for a 30-hours course is a low investment. These extra
hours are not always available. When one would like to use this method to create
an OER course without the funding for extra hours, the trade-in will be quality: a
course created by different authors in a Wiki, to reflect what they learned about a
new subject, will not be as consistent and as logical in structure as our Scala course,
171
9. CREATING A SHORT COURSE ON SCALA
and will lack exercises with feedback. We think that even the buzz it creates in social
media may make it worthwhile.
9.7.3 Conclusion
We have presented a new method for creating OER with as main characteristic that
OER are created as a side-effect of Continuous Professional Development. We com-
pared the method to existing methods and applied it to create an OER on the Scala
172
9.7. Evaluation and Conclusion
language. This course was followed by enthusiastic students who improved the
course via feedback on a teacher-created Wiki. The course received considerable
attention. All in all, the experience with the Scala course confirmed the usefulness
of the use of the CPD method for creating OER.
173
Part III
Epilogue
175
10
10.1 Summary
The subject of this thesis is design for change. We discerned two strategies for design
for change: applying variation points and enhancing changeability. These strategies
do not rule each other out: they may be (and often are) combined. We addressed
both technical and educational aspects of these strategies.
177
10. EPILOGUE AND FUTURE WORK
178
10.2. Observations
10.2 Observations
The problem to find a method to design for change is not solved once and for all.
On the contrary, design for change is a subject that will never be ‘solved’. The fact
that the problem will never be solved has several causes. Design is inherently hard
in the first place, because it involves conquering the problem of complexity. Design
with ease of change as one of the goals adds complexity. Another cause is formed
by ongoing developments in programming languages and programming platforms,
which show an increase in abstraction. Such abstract concepts in programming lan-
guages demand new approaches to use those concepts. A third cause is the fact that
179
10. EPILOGUE AND FUTURE WORK
systems get more complex, and the more complex systems are, the harder design for
change is (the harder design is in general).
When looking back to our contributions in this field, with respect to variation
points, to enhancing changeability, and to educational aspects, we think that the
following observations can be made.
180
10.2. Observations
the implications for the resulting design into account when making decisions about
the tools and techniques to model the problem. In the end, these decisions have
implications on, for instance, the changeability of the resulting system.
To take these implications into account, they should be known, and this is not
always the case. Summarizing, one may argue that implicit design should be made
explicit where possible.
• use a particular place in the code where changes have to be applied (factories
are an example),
• use an EDSL to declare the changes (see Chapter 5),
• use a Domain Specific Language (DSL) to declare the changes, and write a
parser to read the changes,
• use an existing language (see Chapter 6) or create a text format (such as in
a configuration file) or a file format (such as in a spreadsheet program). In
these cases too, a parser must be written (in the example of JavaScript and
HTML , this task is performed by the browser).
Embedded Domain Specific Languages (in which the declared changes are com-
piled together with the remainder of the code) and Domain Specific Languages (that
will be parsed by the program) have different advantages and disadvantages. Using
an EDSL, one may use the facilities offered by the underlying programming language,
for instance. Interpretation versus compilation has consequences for performance.
On the other hand, using a DSL, it is possible to allow users to declare changes. Ad-
vantages and disadvantages of this approach have been discussed for the framework
for exercise assistants, on the basis of a number of case studies [Heeren and Jeuring
2010].
One of the examples of the strategy to enhance changeability is automated pro-
gramming, in which bugs are prevented by generating code using a code generator
that has proven to be correct [Toetenel et al. 1996]. In fact, this strategy may be seen
as an example of the strategy to isolate change, in which everything is supposed to
be changeable. This raises the question of where to draw the line: to which extent
do we isolate changes?
One may view programming in a programming language as a form of automated
programming: the compiler produces the machine code, while we have declared
what we want the resulting program to achieve using a higher-level programming
181
10. EPILOGUE AND FUTURE WORK
language. This fact may help in deciding what to include in the ‘permanent’ code,
and what to declare as changes. What is declared as changes, is declared using
another language (although such a language may be based on the programming
language in the case of an EDSL). Applying changes in this language should be easier
than applying the same changes in the code.
In the case of a DSL, embedded or not, the choice is obvious: the language is
geared to a specific domain, and that is what the language should be used for. For
everything outside this domain, the programming language should be used.
In other cases, the choice partly depends on volume: programming languages
tend to be prepared for a high volume of code. For instance, name space, packages
or modules, information hiding and abstraction are almost always part of a pro-
gramming language. In some cases, languages to declare changes outside the code
lack such facilities. When the volume of lines is low and will stay low, this is not a
problem, but when the volume is high, the same kind of facilities are required of the
declaration language.
182
10.2. Observations
The answer may be associated with the restrictions for subscription-based com-
munication:
• The order in which the data are sent is not necessarily the same order at which
they are received.
• There is no way to ensure that data are not lost, other then sending some
precious data twice or more times.
The typical use of subscription-based communication is where the same kind of
data is sent over and over again, every time slightly different [Boasson 1998]. In such
a case, the loss of one message is no disaster: the receiving processes temporarily
use information slightly older than it should be.
The same applies to a global state: when components update the global state
regularly, each time modifying some of the variables in the global state by a fraction,
one may safely use a global state. Steels describes how he uses a global state in this
manner for his Lego robots: different sensors add or subtract from variables in the
global state, and these variables direct the actions of the robot [Steels 2003].
In other cases, where changes of the global state are more far-reaching (a simple
example is a variable that is either true or false), or when changes are not applied
over and over again, a global state has the disadvantage that a bug in one of the
components may influence components that read the global state, and the rippling
effects make the software hard to debug.
10.2.6 Education
We have presented various contributions on the wide subject of design for change.
We showed that there are two strategies to design for change, and that these strate-
gies may be used simultaneously: apply variation points and enhance changeability.
The ‘tools’ for both strategies are decoupling and abstraction. These strategies and
tools, one may safely assume, are the invariants in software design for change. The
fact that these strategies and tools are known, does not mean that it is clear how to
use those strategies and tools: each situation is different, and the study of design for
change consists for a great part in finding best practices with respect to, for instance,
where to apply variation points, and how.
Best practice is closely related to education. In Chapter 6, for instance, we de-
scribed how we supply students with guidelines telling them how to refactor a given
program to a program that complies to the software engineering design principles.
Another example is that we use design patterns as a means to teach object-oriented
software design (see Chapter 3).
Making explicit how to solve problems, and supply students with procedural in-
formation in the form of guidelines and best practices, is one technique to teach stu-
dents how to design to change; working in a setting similar to an architect’s studio,
with the teacher as the master and the students as apprentices, is another technique
(see Chapter 3). Where procedural guidance can be made explicit, we should do
so, in particular in distance education, but where this is not possible, the master-
apprentice approach allows us to convey implicit knowledge.
183
10. EPILOGUE AND FUTURE WORK
In practice, software design should be a synonym for software design for change.
Almost any software design should be optimized for change. An exception might
be a product that is thrown away, and is completely redesigned from scratch after
the first try, but in such a case, the first try might better be called a prototype that
functions as an input for the design of the first product. Education of software design
is therefore a synonym for education of software design for change.
184
Samenvatting
Stel, dat ICT-projecten als bij toverslag netjes binnen het gestelde budget zouden
opleveren wat de opdrachtgever wenst. Zelfs in deze utopische situatie zouden ICT-
projecten nog problemen blijven opleveren, laat ik in mijn proefschrift zien.
De wereld verandert namelijk voortdurend. Als gevolg daarvan moeten er ook
steeds veranderingen worden aangebracht in software. U kunt daarbij denken aan
nieuwe wetten en regels, aan reorganisaties, maar ook bijvoorbeeld aan nieuwe
hardware: mobiele apparaten met hogere resoluties. Zowel de veranderende maat-
schappij als technologische ontwikkelingen brengen nieuwe wensen voor software
met zich mee.
Software kan worden aangepast aan nieuwe wensen, maar wanneer er geen ex-
tra maatregelen zijn genomen, wordt het, elke keer dat er een verandering is aange-
bracht, moeilijker om een volgende verandering aan te brengen. ‘Moeilijker’ betek-
ent dat het steeds kostbaarder wordt om veranderingen aan te brengen, en ook dat
het risico dat er bij zo’n verandering fouten worden gemaakt steeds groter wordt.
Dit fenomeen wordt ook wel ‘software veroudering’ genoemd.
Wanneer software bij het ontwerpen wordt geoptimaliseerd voor toekomstige
veranderingen, wordt dit probleem van verouderende software zo veel mogelijk ver-
meden. Software tijdens het ontwerpen optimaliseren voor toekomstige veranderin-
gen is het onderwerp van dit proefschrift. Daarbij gebruiken we ‘ontwerpen’ in de
ruime zin van het woord: zowel software architectuur (het ontwerpen van syste-
men op hoog abstractieniveau), software design (het ontwerpen van software op
detailniveau) als programmeren valt er onder.
Wanneer men rekening wil houden, bij het ontwerp van software, met toekom-
stige veranderingen, zijn er twee mogelijkheden: veranderingen zijn van te voren
te voorspellen (althans, de plaats waar in de software toekomstige veranderingen
moeten worden aangebracht is te voorspellen), of er valt niets te voorspellen over
veranderingen.
185
SAMENVATTING
In het eerste geval kan er gebruik gemaakt worden van zogenaamde variation
points: plekken in de software die zijn voorbereid op toekomstige veranderingen.
In het tweede geval kan alleen de globale ‘veranderbaarheid’, changeability, van de
software zo groot mogelijk worden gemaakt.
De changeability kan altijd worden verhoogd, terwijl variation points alleen kun-
nen worden ingebouwd wanneer veranderingen voorspeld kunnen worden.
In mijn proefschrift kijk ik naast de technische aspecten van deze vormen van
ontwerpen met het oog op toekomstige veranderingen ook naar de educatieve as-
pecten: hoe leren we studenten software zo te ontwerpen dat het resultaat zo flexibel
mogelijk is met betrekking tot veranderingen?
Variation points
Software voor mobiele apparaten moet functioneren in een sterk veranderende om-
geving: het apparaat kan een kwartslag draaien zodat het scherm hoger dan breed
is of andersom, de verbinding kan wegvallen, het geheugen kan plotseling ontoerei-
kend zijn, er kan een telefoontje binnenkomen, enzovoort. Software voor mobiele
apparaten moet dus rekening houden met van te voren bekende veranderingen.
De twee belangrijkste ‘gereedschappen’ die de software ontwikkelaar heeft voor
variation points zijn losse koppeling en abstractie. Deze gereedschappen zijn ook
gebruikt in ontwikkelomgevingen voor software voor mobiele apparaten, om con-
structies te maken die programmeurs kunnen gebruikken om software te bouwen
die op veranderingen kan reageren. In hoofdstuk 2 bespreken we hoe software voor
mobiele apparaten in elkaar zit, en hoe we het ontwerpen van mobiele software
kunnen opnemen in het universitaire curriculum.
Variation points kunnen worden aangebracht door losse koppelingen aan te bren-
gen (waarbij abstractie nodig is). Het punt is dat je niet zomaar overal losse kop-
pelingen aan kunt brengen: uiteindelijk zijn er vaste koppelingen nodig om de ver-
schillende onderdelen van de software met elkaar te kunnen laten werken. Design
patterns zijn een vorm van expliciet gemaakte ervaringskennis over in welke situatie
je welke losse koppelingen kunt gebruiken. In een onderwijssituatie is het lastige
van design patterns dat je ze pas op waarde leert schatten in een groot project: in
kleine oefenprobleempjes bieden ze weinig extra waarde. In hoofdstuk 3 bespreken
we hoe studenten aan een universiteit met afstandsonderwijs toch kunnen leren met
design patterns te werken in een behoorlijk groot project.
In hoofdstuk 4 laten we een software architectuur zien voor een systeem met
onbemande voertuigen. Elk voertuig heeft een eigen processor, en beschikt over de
verkeersregels. Een van de voor de hand liggende toekomstige veranderingen is het
veranderen van de verkeersregels (bijvoorbeeld als gevolg van schaalvergroting, of
van de introductie van nieuwe soorten voertuigen). We bespreken twee manieren
om nieuwe verkeersregels in het systeem aan te brengen, waarbij de ene manier
voldoet aan de gegeven software architectuur, terwijl de architectuur voor de an-
dere manier moet worden aangepast. We bespreken voor- en nadelen van beide
manieren.
Voor studenten is het bij allerlei oefeningen (bijvoorbeeld wiskundige vergelijkin-
gen oplossen, logische formules in een normaalvorm zetten, of kleine program-
186
meeropdrachten) handig om te kunnen oefenen in een situatie waarin er directe
feedback komt. Aan de Open Universiteit hebben we, samen met de Universiteit
Utrecht, een tool ontwikkeld dat het mogelijk maakt om studenten semantisch rijke
feedback te geven bij het oplossen van dit soort problemen. Toekomstige veran-
deringen zitten hem in het domein, in de regels binnen dat domein, en in oplos-
singsstrategieën. Zoals we in hoofdstuk 5 bespreken, zijn die aspecten in de soft-
ware geïsoleerd, en worden gespecificeerd in een domein-specifieke taal. Dat maakt
toekomstige uitbreidingen gemakkelijker. Een ander aspect is dat de feedback wordt
aangeboden in de vorm van webservices, waar allerlei front-ends gebruik van kun-
nen maken. Ook dat is een vorm van losse koppeling die het mogelijk maakt heel
gemakkelijk nieuwe front-ends in gebruik te nemen.
In hoofdstuk 6 laten we zien hoe een verzameling expliciete richtlijnen voor re-
factoren (het ombouwen van code om deze beter onderhoudbaar te maken met
het oog op toekomstige veranderingen) inderdaad leidt tot code waarin veel ge-
makkelijker veranderingen aangebracht kunnen worden. Een van de onderdelen
van de richtlijn is om voor de hand liggende toekomstige veranderingen te beden-
ken, en na te gaan wat er moet gebeuren om die te implementeren. Het voorbeeld
dat we hanteren laat zien hoe je wat verandert buiten de code kunt houden. Wat ver-
andert wordt dan elders gespecificeerd, ingelezen, en daarmee kan het systeem een
hele verzameling veranderingen aan zonder dat de code veranderd hoeft te worden.
Changeability vergroten
Een probleem kan op verschillende manieren gespecificeerd worden. In hoofdstuk 7
gebruiken we twee verschillende specificaties van het probleem van een controller
voor een trein. We laten zien dat de ene specificatie leidt tot een software architec-
tuur waarin data centraal staan, terwijl de andere specificatie leidt tot een software
architectuur waarin functies centraal staan. We laten zien dat die twee software ar-
chitecturen verschillende eigenschappen hebben op het gebied van timing, scalabi-
lity, fault-tolerance en extendibility. De keuze voor een specificatiemethode voor het
probleem is dus uiteindelijk van invloed op eigenschappen van het systeem, waaron-
der de mogelijkheden om het systeem uit te breiden.
Een manier om een systeem gemakkelijker uitbreidbaar te maken is om van te
voren te kunnen bewijzen dat het resultaat bepaalde eigenschappen heeft (en zo
te voorkomen dat pas na de bouw blijkt dat de gewenste eigenschappen niet aan-
wezig zijn). In hoofdstuk 8 beschrijven we een framework voor systemen die opgezet
worden volgens het radio-broadcast paradigma, met bijbehorende implementatie.
Omdat de implementatie bekend is, zijn we in staat om randvoorwaarden te stellen
aan de infrastructuur van – bijvoorbeeld – een treincontroller, om te garanderen dat
er – bijvoorbeeld – geen botsingen tussen treinen kunnen voorkomen. Zo’n frame-
work maakt het gemakkelijker om in de toekomst veranderingen aan te brengen om-
dat allerlei belangrijke eigenschappen van te voren kunnen worden gecontroleerd.
Functionele talen hebben eigenschappen (zoals het zich zo veel mogelijk ont-
houden van state) die het gemakkelijker maken om een systeem uit te breiden. Als
een nieuwe functie getest is, en juist bevonden, kan de introductie van zo’n nieuwe
functie geen ongewenste neveneffecten elders tot gevolg hebben. De meeste pro-
187
SAMENVATTING
188
Dankwoord
De achtergrond van mijn promotie is – in het kort – dat ik twee keer gestart ben
met een promotietraject, en dat traject beide keren heb moeten stoppen. De eerste
keer moest ik mijn promotietraject staken vanwege een combinatie van het wegval-
len van het onderzoeksproject, het uitvallen van de promotor, en persoonlijke om-
standigheden; de tweede keer bleek dat de gevolgen van het motorongeluk dat me
in 2005 overkwam toch verder strekten dan ik had gehoopt. Op dat moment heb
ik me er bij neergelegd om nooit te promoveren; dat voelde als een nederlaag. Met
deze achtergrond in het hoofd is het misschien te begrijpen dat ik vrijwel iedereen
in mijn omgeving dankbaar ben: op de een of andere manier heeft iedereen er wel
aan bijgedragen dat ik verder ben gekomen, dat ik het uiteindelijk toch heb aange-
durfd om de draad op te pakken (in de allereerste plaats natuurlijk mijn levensgezel
Ernst Anepool). Wanneer ik hier opnoem wie ik dankbaar ben met betrekking tot
deze promotie laat ik dan ook onvermijdelijk namen weg die ik graag zou noemen.
Daarom noem ik slechts enkele namen.
In de eerste plaats dank ik Marko van Eekelen, mijn promotor. Toen ik de reor-
ganisatieplannen van onze universiteit doornam besefte ik dat niet-gepromoveerde
docenten een aantal voor mij onoverkomelijke nadelen te wachten stond: er zou
een demotie plaatsvinden van universitair docent naar docent, ze zouden geen tijd
meer krijgen voor onderzoek, ze zouden een groot risico lopen op ontslag bij een
volgende reorganisatie, en doceren in de master zou voorbehouden zijn aan docent-
onderzoekers. Er zat – zo dacht ik – niets anders op dan voor een derde maal
te starten met een promotietraject. Tot mijn grote verrassing meldde Marko van
Eekelen dat ik voldoende had gepubliceerd om op basis van artikelen te promoveren.
In 2014 heb ik bovendien nog twee extra artikelen gepubliceerd. In het traject
daarna heeft hij me steeds op het juiste niveau bijgestaan: eerst op grote lijnen,
en tenslotte, bij de voorbereiding van het boekje, met veel detail. Hij is voor mij de
perfecte promotor.
Mijn copromotor Harrie Passier ben ik vanwege een groot aantal redenen dank-
189
DANKWOORD
baar. In de eerste plaats mocht ik als paranimf zijn eigen promotie meemaken, waar-
door ik een goed beeld heb gekregen van wat het betekent om een boek te produ-
ceren en op het podium te staan. In de lastige tijd waarin ik de rode draad probeerde
te vinden in mijn artikelen, door ze te karakteriseren op verschillende manieren en
te proberen die karakteristieken in spreadsheets tot een mooie matrix om te vormen,
bracht hij me op het spoor van ‘the Pyramid Principle’ [Minto 2009] om structuur
aan te brengen in teksten, en met de structuur in de introductie ontstond ook de
juiste matrix om de artikelen in onder te brengen. Hij heeft vanaf het begin veel
tijd en energie gestoken in het meelezen en becommentariëren van mijn teksten. Ik
ben hem ook dankbaar voor het feit dat hij iemand is van het overleg, van Skypen,
van mensen bij elkaar brengen, en dat hij daarmee heeft voorkomen dat ik als een
kluizenaar aan mijn proefschrift heb gewerkt. Tenslotte is hij de trekker van de on-
derzoeksgroep rond Vakdidactiek, waar ik na deze promotie mee verder wil.
Ook mijn andere copromotor, Bastiaan Heeren, en mijn voormalige decaan Lex
Bijlsma ben ik dankbaar voor de aandacht en de zorgvuldigheid waarmee ze mijn
teksten van commentaar hebben voorzien. Dankzij de opmerkingen van Erik Ba-
rendsen heb ik een aantal artikelen aangevuld, en zijn commentaar heeft er voor
gezorgd dat ze een stuk beter zijn geworden. Stef Joosten dank ik dat hij mijn proef-
schrift mee heeft genomen op vakantie om zijn goedkeuring op tijd te kunnen geven.
Serge Demeijer vroeg tijdens een visitatie, als lid van de visitatiecommissie, op zeer
plezierige wijze of het niet lastig voor me was om niet gepromoveerd te zijn tussen
gepromoveerde collega’s. Ik ben hem dankbaar dat hij mijn proefschrift heeft willen
lezen, en vooral ook voor de complimenten die hij bij zijn goedkeuring gaf. Dat was
de eerste keer dat ik me echt trots voelde op wat ik heb gedaan. Ook Ruurd Kuiper
wil ik danken voor de energie die hij heeft gestoken in het lezen van mijn teksten en
voor de vragen die hij me daar over heeft gesteld, en voor zijn advies om vooral te
genieten van de promotie en het niet alleen te zien als de weg naar een titel.
Tenslotte wil ik graag de medewerkers van de afdeling Hersenletsel van de reva-
lidatiekliniek Adelante in Hoensbroek bedanken. Dankzij hen heb ik geleerd lang-
zamer te werken, zoveel mogelijk gebruik te maken van externe geheugens en syste-
men om mijn werk te ordenen, en dankzij die hulp heb ik mijn werk kunnen vol-
houden en voortzetten. Met deze promotie hebben mijn hersenen, zo heb ik het
gevoel, zich helemaal gerevancheerd.
190
Curriculum Vitae
Sylvia Stuurman
Work
2011 Elected as Teacher of the Year of the Open University of the
Netherlands
2002 - now Assistent professor of Computer Science, Open University of
the Netherlands
2000 - 2002 Scientific officer, Devote, Bunnik
1997 - 2002 Researcher in Computer Science, Delft University of Techno-
logy
1995 - 1997 Research assistent, Delft University of Technology
1991 - 1995 System administrator/programmer, Delft University of Tech-
nology
1990 - 1991 Tutor, Open University of the Netherlands
1982 - 1991 Independent entrepreneur (retail)
1981 - 1983 Editor and corrector, Publishing house Het Spectrum
1979 - 1982 Teacher in Biology, secondary schools
Opleiding
1996 Master of Science Computer Science, Open University of the
Netherlands
1982 Diploma for entrepeneurs
1979 Qualification to teach Biology in secondary schools (‘Eerste-
graads bevoegdheid’), University of Groningen
1973 Gymnasium beta, Stedelijk Lyceum Zutphen
191
CURRICULUM VITAE
Publications
The Design of Mobile Apps: What and How to Teach?, Sylvia Stuurman, Bern-
ard E. van Gastel, Harrie J.M. Passier (2014) In: Proceedings of the fourth Com-
puter Science Education Research Conference 2014, pages 93 – 100, ACM Digital Lib-
rary [Stuurman, Passier et al. 2014]
Beautiful Javascript: How to guide students to create good and elegant code,
Harrie J.M. Passier, Sylvia Stuurman, Harold Pootjes (2014) In: Proceedings of the
fourth Computer Science Education Research Conference 2014, pages 65 – 76, ACM
Digital Library [Passier, Stuurman et al. 2014]
Feedback Services for Exercise Assistants, Alex Gerdes, Bastiaan J. Heeren, Johan
Jeuring, Sylvia Stuurman (2008) In: Proceedings of the seventh European Conference
on e-Learning, pages 402–410, Academic Conferences Limited [Gerdes et al. 2008]
Using IDEAS in Teaching Logic, Lessons Learned, Josje S. Lodder, Harrie J.M.
Passier, Sylvia Stuurman (2008) In: Proceedings of the first International Conference
on Computer Science and Software Engineering, volume 5, pages 553–557, IEEE Com-
puter Society Press [Lodder, Passier et al. 2008]
Experiences with Teaching Design Patterns, Sylvia Stuurman, Gert Florijn (2004)
In: ACM SIGCSE Bulletin, volume 36, number 3, pages 151–155, and in the Proceed-
ings of the ninth annual SIGCSE Conference on Innovation and Technology in Com-
puter Science Education (ITICSE), pages 151-155, ACM Digital Library [Stuurman
and Florijn 2004]
192
Software Architecture and JavaBeans, Sylvia Stuurman (1999) In: Proceedings of
the first Working IFIP Conference on Software Architecture (WICSA1), pages 183–199,
IEEE Computer Society Press [Stuurman 1999]
MTCCS, Ronald F. Lutje Spelberg, Sylvia Stuurman, Hans J. Toetenel (1996) Tech-
nical report, Delft University of Technology, Faculty of Technical Mathematics and In-
formatics [Lutje Spelberg et al. 1996]
193
References
Affenzeller, Michael, Stefan Wagner, Stephan Winkler and Andreas Beham (2009). Genetic
Algorithms and Genetic Programming: Modern concepts and practical applications. CRC Press
(cited on page 6).
Allen, Julia. H., Sean J. Barnum, Robert J. Ellison, Gary McGraw and Nancy R. Mead (2009).
Software Security Engineering. Addison-Wesley Professional (cited on pages 12, 96).
Allen, Robert and David Garlan (1994). ‘Beyond Definition/Use: Architectural Interconnection’.
In: ACM SIGPLAN Notices 29.8, pp. 35–45 (cited on page 61).
Alpert, Sherman R., Mark K. Singley and Peter G. Fairweather (1999). ‘Deploying Intelligent
Tutors on the Web: An Architecture and an Example’. In: International Journal of Artificial
Intelligence in Education 10.2, pp. 183–197 (cited on page 79).
Altayeb, Badreldin and Kostadin Damevski (2013). ‘Utilizing and Enhancing Software Modeling
Environments to Teach Mobile Application Design’. In: Journal of Computing Sciences in
Colleges 28.6, pp. 57–64 (cited on pages 32, 40).
Alur, Rajeev and David Dill (1994). ‘A Theory of Timed Automata’. In: Theoretical Computer
Science 126.2, pp. 183–235 (cited on page 148).
Ammerlaan, Marcel, Ronald Lutje-Spelberg and Hans J. Toetenel (1998). ‘XTG – An Engin-
eering Approach to Modelling and Analysis of Real-Time Systems’. In: Proceedings of the
10th Euromicro Workshop on Real-Time Systems. Berlin, Germany: IEEE Computer Society,
pp. 88–97 (cited on page 148).
Anderson, John R. (1993). Rules of the Mind. Routledge (cited on page 77).
d’Antoni, Susan (2008). Open Educational Resources: The Way Forward. International Coun-
cil for Open and Distance Education. URL: published % 20online % 20at % 20 % 5Cutel % 7Bhttp :
//openaccess.uoc.edu/webapps/o2/bitstream/10609/7163/1/Antoni_OERTheWayForward_2008_eng.
pdf%7D (cited on page 163).
Astrachan, Owen, Garrett Mitchener, Geoffrey Berry and Landon Cox (1998). ‘Design Patterns:
An Essential Component of CS Curricula’. In: ACM SIGCSE Bulletin 30.1, pp. 153–160 (cited
on page 51).
Backhouse, Roland, Patrik Jansson, Johan Jeuring and Lambert Meertens (1999). ‘Generic
Programming’. In: Third International School on Advanced Functional Programming (AFP),
195
REFERENCES
Revised Lectures. Vol. 1608. Lecture Notes in Computer Science. Braga, Portugal: Springer,
pp. 28–115 (cited on page 80).
Ballou, Donald P. and Harold L. Pazer (1985). ‘Modeling data and process quality in multi-
input, multi-output information systems’. In: Management Science 31.2, pp. 150–162 (cited
on page 94).
Balzer, Robert (1985). ‘A 15 year Perspective on Automatic Programming’. In: IEEE Transactions
on Software Engineering SE-11.11, pp. 1257–1268 (cited on page 20).
Barais, Olivier, Anne Françoise Le Meur, Laurence Duchien and Julia Lawall (2008). ‘Software
Architecture Evolution’. In: Software Evolution. Springer, pp. 233–262 (cited on page 60).
Bargas-Avila, Javier A. et al. (2010). ‘Simple but Crucial User Interfaces in the World Wide
Web: Introducing 20 guidelines for usable web form design’. In: User Interfaces. Ed. by Rita
Mátrai. Rijeka, Croatia: InTech, pp. 1–10 (cited on pages 94, 97).
Beck, Kent and Cynthia Andres (2004). Extreme Programming Explained: Embrace Change.
Addison-Wesley Professional (cited on page 8).
Beck, Kent, Mike Beedle et al. (2001). The agile manifesto. http://www.agilemanifesto.org (cited
on page 8).
Beck, Kent, Ron Crocker et al. (1996). ‘Industrial Experience with Design Patterns’. In: Proceed-
ings of the 18th International Conference on Software Engineering (ICSE). Berlin, Germany:
IEEE Computer Society, pp. 103–114 (cited on page 50).
Beeson, Michael (1998). ‘Design Principles of Mathpert: Software to Support Education in
Algebra and Calculus’. In: Computer-human interaction in symbolic computation. Ed. by N.
Kajler. Texts and Monographs in Symbolic Computation. Heidelberg, Germany: Springer,
pp. 163–177 (cited on pages 77, 87).
Bennett, Judith, Fred Lubben and Sylvia Hogarth (2007). ‘Bringing Science to Life: A synthesis
of the research evidence on the effects of context-based and STS approaches to science
teaching’. In: Science Education 91.3, pp. 347–370 (cited on page 43).
Benveniste, Albert, Eric Fabre, Stefan Haar and Claude Jard (2003). ‘Diagnosis of Asynchronous
Discrete-event Systems: a Net Unfolding Approach’. In: IEEE Transactions on Automatic
Control 48.5, pp. 714–727 (cited on page 40).
Biegstraaten, Ton, Klaas Brink, Jan van Katwijk and Hans J. Toetenel (1994). A Simple Railroad
Controller: A Case Study in Real-time Specification. Tech. rep. 94-86. Delft University of
Technology, Department of Mathematics and Informatics (cited on pages 120–121).
Boasson, Maarten (1995). ‘The Artistry of Software Architecture’. In: IEEE Software 12.6,
pp. 13–17 (cited on page 120).
Boasson, Maarten (1996). ‘Subscription as a Model for the Architecture of Embedded Systems’.
In: Proceedings of the Second IEEE International Conference on Engineering of Complex Com-
puter Systems. Montreal, Quebec, Canada: IEEE Computer Society, pp. 130–133 (cited on
pages 63, 136–137, 142, 148).
Boasson, Maarten (1998). ‘Software Architecture for Distributed Reactive Systems’. In: Proceed-
ings of the 25th Conference on Current Trends in Theory and Practice of Informatics: Theory
and Practice of Informatics. SOFSEM ’98. London, UK: Springer-Verlag, pp. 1–18 (cited on
pages 64, 183).
Booch, Grady (1982). ‘Object-oriented Design’. In: ACM SIGAda Ada Letters 1.3, pp. 64–76
(cited on page 10).
Bourque, Pierre and Richard E. Fairly, eds. (2014). Guide to the Software Engineering Body of
Knowledge version 3. IEEE Computer Society (cited on pages 11, 96).
Bouwers, Eric (2007). ‘Improving Automated Feedback’. MA thesis. Utrecht University (cited
on page 78).
196
References
Bower, Matt, Karen Woo, Matt Roberts and Paul Watters (2006). ‘Wiki Pedagogy – A Tale of Two
Wikis’. In: Proceedings of the 7th International Conference on Information Technology Based
Higher Education and Training (ITHET). Ultimo, NSW, Australia: IEEE Computer Society,
pp. 191–202 (cited on page 167).
Brabrand, Claus, Anders Møller, Mikkel Ricky and Michael I. Schwartzbach (2000). ‘Power-
forms: Declarative client-side form field validation’. In: World Wide Web 3.4, pp. 205–214
(cited on page 93).
Brooks, Fred P. (1987). ‘No Silver Bullet - Essence and Accident in Software Engineering’. In:
Computer 20.4, pp. 10–19 (cited on page 14).
Bruning, Lucia and Berenice Michels (2013). Concept-contextvenster. Tech. rep. Stichting
Leerplan Ontwikkeling (SLO), the Netherlands (cited on page 45).
Buck, Duane and David J. Stucki (2000). ‘Design Early Considered Harmful: Graduated expos-
ure to complexity and structure based on levels of cognitive development’. In: ACM SIGCSE
Bulletin 32.1, pp. 75–79 (cited on page 52).
Buckley, Jim, Tom Mens, Matthias Zenger, Awais Rashid and Günter Kniesel (2005). ‘Towards a
Taxonomy of Software Change’. In: Journal of Software Maintenance and Evolution: Research
and Practice 17.5, pp. 309–332 (cited on page 14).
Burridge, Rich (1999). Java Shared Data Toolkit User Guide. Tech. rep. Sun Microsystems,
October (cited on page 139).
Capilla, Rafael and Jan Bosch (2013). ‘Binding Time and Evolution’. In: Systems and Software
Variability Management. Springer, pp. 57–73 (cited on page 18).
Caspersen, Michael E. and Michael Kolling (2009). ‘STREAM: A first programming process’.
In: ACM Transactions on Computing Education (TOCE) 9.1, 4:1–4:29 (cited on page 93).
Caswell, Tom, Shelley Henson, Marion Jensen and David Wiley (2008). ‘Open Educational
Resources: Enabling universal education’. In: International Review of Research in Open and
Distance Learning 9.1, pp. 1–11 (cited on page 159).
Chaachoua, Hamid, Jean-François Nicaud, Alain Bronner and Denis et al. Bouhineau (2004).
‘Aplusix, a Learning Environment for Algebra, actual use and benefits’. In: Proceedings of
10th International Conference on Mathematics Education (ICME-10). Roskilde, Denmark:
IMFUFA, Department of Science, Systems and Models, Roskilde University, pp. 1–8 (cited
on pages 77, 87).
Chin, Erika, Adrienne Porter Felt, Kate Greenwood and David Wagner (2011). ‘Analyzing Inter-
application Communication in Android’. In: Proceedings of the 9th International Conference
on Mobile systems, Applications, and Services (MobiSys). New York, NY, USA: ACM Digital
Library, pp. 239–252 (cited on page 15).
Cîmpan, Sorana, Fabien Leymonerie and Flavio Oquendo (2005). ‘Handling Dynamic Beha-
viour in Software Architectures’. In: Software Architecture. Ed. by Ron Morrison and Flavio
Oquendo. Vol. 3527. Lecture Notes in Computer Science. Springer Berlin Heidelberg,
pp. 77–93 (cited on page 60).
Claessen, Koen and John Hughes (2011). ‘QuickCheck: A Lightweight Tool for Random Testing
of Haskell Programs’. In: ACM Sigplan Notices 46.4, pp. 53–64 (cited on page 80).
Clarke, Edmund M., E. Allen Emerson and A. Prasad Sistla (1986). ‘Automatic Verification of
Finite-State Concurrent Systems using Temporal Logic Specifications’. In: ACM Transactions
on Programming Languages and Systems (TOPLAS) 8.2, pp. 244–263 (cited on page 149).
Clements, Paul et al. (2003). Documenting Software Architectures, Views and beyond. The SEI
Series in Software Engineering. Addison-Wesley (cited on page 10).
197
REFERENCES
Cohen, Arjeh M., Hans Cuypers, Ernesto Reinaldo Barreiro and Hans Sterk (2003). ‘Interactive
Mathematical Documents on the Web’. In: Algebra, Geometry and Software Systems. Ed. by
Joswig Michael and Takayama Nobuki. Springer, pp. 289–307 (cited on pages 77, 82, 87).
Colburn, Timothy and Gary Shute (2001). ‘Decoupling as a Fundamental Value of Computer
Science’. In: Minds and Machines 21.2, pp. 241–259 (cited on page 12).
Cole, Melissa (2009). ‘Using Wiki Technology to Support Student Engagement: Lessons from
the trenches’. In: Computers and Education 52.1, pp. 141–146 (cited on page 167).
Cotroneo, Domenico, Roberto Natella, Roberto Pietrantuono and Stefano Russo (2014). ‘A Sur-
vey of Software Aging and Rejuvenation Studies’. In: ACM Journal on Emerging Technologies
in Computing Systems (JETC) 10.1, 8:1–8:34 (cited on page 5).
Coulouris, George, Jean Dollimore and Tim Kindberg (1994). Distributed Systems: Concepts
and Design. Second Edition. Addison-Wesley (cited on page 137).
Crockford, Douglas (2008). JavaScript: The Good Parts. O’Reilly Media, Inc. (cited on pages 22,
91).
Dahl, Ole-Johan and Kristen Nygaard (1966). ‘SIMULA: An ALGOL-based Simulation Lan-
guage’. In: Communications of the ACM 9.9, pp. 671–678 (cited on page 10).
Darwin, Ian (1999). ‘GUI Development with Java’. In: Linux Journal 1999.61 (cited on
page 52).
Davis-II, John et al. (1999). Overview of the Ptolemy Project. Tech. rep. ERL (cited on page 32).
Day, Christopher (1999). Developing Teachers: The Challenges of Lifelong Learning. London:
Falmer Press, p. 249 (cited on page 158).
De Raadt, Michael, Richard Watson and Mark Toleman (2009). ‘Teaching and Assessing Pro-
gramming Strategies Explicitly’. In: Proceedings of the Eleventh Australasian Conference on
Computing Education. Australian Computer Society, Inc., pp. 45–54 (cited on page 94).
Dehlinger, Josh and Jeremy Dixon (2011). ‘Mobile Application Software Engineering: Chal-
lenges and research directions’. In: Workshop on Mobile Software Engineering. Santa Clara,
California, USA. published online: http://mobileseworkshop.org (cited on page 15).
DeRemer, Franklin L. and Hans H. Kron (1976). ‘Programming-in-the-large versus Programming-
in-the-small’. In: Programmiersprachen. Springer, pp. 80–89 (cited on page 10).
Deursen, Arie van, Paul Klint and Joost Visser (2000). ‘Domain-specific Languages: An Annot-
ated Bibliography’. In: ACM SIGPLAN Notices 35.6, pp. 26–36 (cited on page 19).
Dijkstra, Edsger W. (1968). ‘A Constructive Approach to the Problem of Program Correctness’.
In: BIT Numerical Mathematics 8.3, pp. 174–186 (cited on page 9).
Dijkstra, Edsger W. (1969). ‘Structured Programming’. In: Software Engineering Techniques.
Rome, Italy: NATO Science Committee, pp. 84–88 (cited on page 9).
Dijkstra, Edsger W. (1982). ‘On the Role of Scientific Thought’. In: Selected Writings on Com-
puting: A Personal Perspective. Springer, pp. 60–66 (cited on pages 12, 96).
Downes, Stephen (2007). ‘Models for Sustainable Open Educational Resources’. In: The Inter-
disciplinary Journal of Knowledge and Learning Objects 3, pp. 29–44 (cited on pages 160–
161).
Drusinsky, Doron (2011). Modeling and Verification Using UML Statecharts: A working guide to
reactive system design, runtime monitoring and execution-based model checking. Oxford, UK:
Newnes, Elsevier (cited on page 40).
Engels, Gregor, Reiko Heckel and Stefan Sauer (2000). ‘UML - A Universal Modeling Language?’
In: Application and Theory of Petri Nets 2000. Springer, pp. 24–38 (cited on page 15).
Erev, Ido, Adi Luria and Anan Erev (2006). ‘On the Effect of Immediate Feedback’. In: Proceed-
ings of the Chais Conference on Learning in the Technological Era. Vol. 1. Raanana, Israel:
The Open University of Israel, pp. 26–30 (cited on page 77).
198
References
Evans, Eric (2004). Domain-driven Design: Tackling complexity in the heart of software. Boston,
United States: Addison-Wesley Professional (cited on page 30).
Evers, Joseph J.M. (1999). DiTrans, toekomst gericht gautomatiseerd containertransport. Tech.
rep. 94/4. Delft University of Technology (cited on page 144).
Felleisen, Matthias (2001). How to Design Programs: An introduction to programming and com-
puting. MIT Press (cited on pages 11, 93).
Friesen, Norman (2009). ‘Open Educational Resources: New Possibilities for Change and
Sustainability’. In: International Review of Research in Open and Distance Learning 10.5,
pp. 1492–3831 (cited on page 163).
Gamma, Erich, Richard Helm, Ralph Johnsons and John Vlissides (1994). Design Patterns,
Elements of Reusable Object-Oriented Software. Addison-Wesley (cited on pages 16, 50, 56).
Garlan, David, Robert Allen and John Ockerbloom (1994). ‘Exploiting Style in Architectural
Design Environments’. In: ACM SIGSOFT Software Engineering Notes 19.5, pp. 175–188
(cited on page 61).
Garlan, David and David Notkin (1991). ‘Formalizing Design Spaces: Implicit invocation mech-
anisms’. In: VDM’91 Formal Software Development Methods. Ed. by S. Prehn and Hans J.
Toetenel. Vol. 551. Lecture Notes in Computer Science. Heidelberg, Germany: Springer,
pp. 31–44 (cited on page 70).
Gauthier, Richard L. and Stephen D. Ponto (1970). Designing Systems Programs. Prentice-Hall
(cited on page 9).
Gerdes, Alex, Bastiaan J. Heeren, Johan Jeuring and Sylvia Stuurman (2008). ‘Feedback Ser-
vices for Exercise Assistants’. In: Proceedings of the 7th European Conference on e-Learning
(ECEL). Agia Napa, Cyprus: Academic Conferences Limited, pp. 402–410 (cited on page 192).
Gilbert, John K. (2006). ‘On the Nature of “Contex” in Chemical Education’. In: International
Journal of Science Education 28.9, pp. 957–976 (cited on pages 30, 43).
Gilbert, John K., Astrid M.W. Bulte and Albert Pilot (2011). ‘Concept Development and Transfer
in Context-Based Science Education’. In: International Journal of Science Education 33.6,
pp. 817–837 (cited on pages 44–46).
Goguadze, Giorgi, Alberto González Palomo and Erice Melis (2005). ‘Interactivity of Exercises
in ActiveMath’. In: Towards Sustainable and Scalable Educational Innovations Informed by
the Learning Sciences. Sharing Good Practices of Research, Experimentation and Innovation.
Ed. by Chee-Kit Looi, David Jonassen and Mitsuru Ikeda. Frontiers in Artificial Intelligence
and Applications. IOS Press, pp. 109–116 (cited on pages 77, 87).
Goldfedder, Brandon and Linda Rising (1996). ‘A Training Experience with Patterns’. In: Com-
munications of the ACM 39.10, pp. 60–64 (cited on page 51).
Gordon, Aaron J. (2013). ‘Concepts for Mobile Programming’. In: Proceedings of the 18th ACM
Conference on Innovation and Technology in Computer Science Education. Canterbury, United
Kingdom: ACM Digital Library, pp. 58–63 (cited on pages 31–32, 43).
Goudarzi, Kaveh Moazami and Jeff Kramer (1996). ‘Maintaining Node Consistency in the Face
of Dynamic Change’. In: Proceedings of the Third International Conference on Configurable
Distributed Systems. Washington DC, USA: IEEE Computer Society Press, pp. 62–69 (cited
on page 71).
Gregersen, Allan Raundahl and Bo Nørregaard Jørgensen (2009). ‘Dynamic Update of Java Ap-
plications, Balancing change flexibility vs programming transparency’. In: Journal of Soft-
ware Maintenance and Evolution: Research and Practice 21.2, pp. 81–112 (cited on page 60).
Gurp, Jilles van, Jan Bosch and Mikael Svahnberg (2001). ‘On the Notion of Variability in
Software Product Lines’. In: Proceedings of the Working IEEE/IFIP Conference on Software
199
REFERENCES
Architecture (WICSA). Washington DC, USA: IEEE Computer Society, pp. 45–55 (cited on
page 14).
Guthrie, Kevin, Rebecca Griffiths and Nancy Maron (2008). Sustainability and Revenue Models
for Online Academic Resources: An Ithaka report. Ithaka (cited on pages 160, 162, 169).
Haas, Hugo and Allen Brown (2004). Web Services Glossary. W3C Working Group Note (11
February 2004) (cited on page 82).
Hattie, John and Helen Timperley (2007). ‘The Power of Feedback’. In: Review of Educational
Research 77.1, pp. 81–112 (cited on page 77).
Hazzan, Orit (2002). ‘The Reflective Practitioner Perspective in Software Engineering Educa-
tion’. In: Journal of Systems and Software 63.3, pp. 161–171 (cited on pages 13, 17).
Heeren, Bastiaan J. and Johan Jeuring (2009). ‘Recognizing Strategies’. In: Electronic Notes in
Theoretical Computer Science 237, pp. 91–106 (cited on pages 79–80).
Heeren, Bastiaan J. and Johan Jeuring (2010). ‘Adapting Mathematical Domain Reasoners’.
In: Intelligent Computer Mathematics. Springer, pp. 315–330 (cited on page 181).
Heeren, Bastiaan J. and Johan Jeuring (2014). ‘Feedback Services for Stepwise Exercises’. In:
Science of Computer Programming 88, pp. 110–129 (cited on page 76).
Heeren, Bastiaan J., Johan Jeuring, Arthur van Leeuwen and Alex Gerdes (2008). ‘Specifying
Strategies for Exercises’. In: Intelligent Computer Mathematics. Springer, pp. 430–445 (cited
on page 79).
Heitkötter, Henning and Tim A. Majchrzak (2013). ‘Cross-Platform Development of Business
Apps with MD2’. In: Design Science at the Intersection of Physical and Virtual Design, Proceed-
ings of the 8th International Conference on Design Science Research in Information Systems
and Technologies (DESRIST). Ed. by Jan vom Brocke, Riitta Hekkala, Sudha Ram and Matti
Rossi. Vol. 7939. Lecture Notes in Computer Science. Helsinki, Finland: Springer, pp. 405–
411 (cited on page 32).
Henderson-Sellers, Brian (2005). ‘UML–the Good, the Bad or the Ugly? Perspectives from a
panel of experts’. In: Software and Systems Modeling 4.1, pp. 4–13 (cited on page 180).
Hennecke, Martin (1999). ‘Online Diagnose in Intelligenten Mathematischen Lehr-Lern-Systemen’.
PhD thesis. Hildesheim University (cited on page 78).
Henzinger, Thomas A. (1996). ‘The Theory of Hybrid Automata’. In: Proceedings of the Eleventh
IEEE Symposium on Logic in Computer Science (LICS). Washington DC, USA: IEEE Computer
Society, pp. 278–292 (cited on page 149).
Henzinger, Thomas A., Xavier Nicollin, Joseph Sifakis and Sergio Yovine (1994). ‘Symbolic
Model Checking for Real-Time systems’. In: Information and Computation/Information and
Control 111, pp. 193–244 (cited on page 149).
Hirschfeld, Robert, Pascal Costanza and Oscar Nierstrasz (2008). ‘Context-Oriented Program-
ming’. In: Journal of Object Technology 7.3, pp. 1660–1769 (cited on page 15).
Hoare, Charles Antony Richard (1965). Record Handling. Lecture for the NATO Summer School
(cited on page 10).
Homola, Martin and Zuzanna Kubincova (2009). ‘Taking Advantage of Web 2.0 in Organized
Education (A Survey)’. In: Proceedings of the International Conference on Interactive Com-
puter Aided Learning (ICL). Ed. by Michael E. Auer. Villach, Austria: Kassel University Press,
pp. 741–752 (cited on page 167).
Hoon, Walter A. C. A. J. de, Luc M. W. J. Rutten and Marko C. J. D. van Eekelen (1995).
‘Implementing a Functional Spreadsheet in Clean’. In: Journal of Functional Programming
5 (03), pp. 383–414 (cited on page 9).
Hu, Minjie, Michael Winikoff and Stephen Cranefield (2012). ‘Teaching Novice Programming
using Goals and Plans in a Visual Notation’. In: Proceedings of the Fourteenth Australasian
200
References
Computing Education Conference. Vol. 123. Australian Computer Society, Inc., pp. 43–52
(cited on page 94).
Hylén, Jan (2006). ‘Open Educational Resources: Opportunities and Challenges’. In: Proceed-
ings of Open Education 2006: Community, Culture and Content. Paris, France: CERI, Center
for Educational Research and Innovation, pp. 49–63 (cited on pages 159–160).
Jackson, Michael A. (1975). Principles of Program Design. Academic Press (cited on page 9).
Jeuring, Johan (2007). ‘Feedback in Exercise Assistants’. In: Book of Abstracts of Online Educa
Berlin, 13th International Conference on Technology Supported Learning and Training. Berlin,
Germany: ICWE. Also published as Technical Report Utrecht University UU-CS-2007-036
(cited on page 79).
Jeuring, Johan, Harrie Passier and Sylvia Stuurman (2007). ‘A Generic Framework for Devel-
oping Exercise Assistants’. In: Proceedings of the 8th International Conference on Informa-
tion Technology Based Higher Education and Training (ITHET). Washington DC, USA: IEEE
Computer Society Press, pp. 81–91. Also available as Technical Report Utrecht University
UU-CS-2007-017 (cited on pages 19, 75, 192).
Johnson, Timothy E. (1963). ‘Sketchpad III: A computer program for drawing in three dimen-
sions’. In: Proceedings of the AFIPS Spring Joint Computer Conference. New York, NY, USA:
ACM Digital Library, pp. 347–353 (cited on page 10).
The Joint Taskforce On Computing Curricula (2013). Computer Science Curricula 2013 (cited
on page 43).
The Joint Taskforce On Computing Curricula (2009a). Graduate Software Engineering 2009
(GSwE2009) Curriculum Guidelines for Graduate Degree Programs in Software Engineering.
Ed. by Art Pyster (cited on pages 43–44, 46).
The Joint Taskforce On Computing Curricula (2009b). Software Engineering 2004, Curriculum
Guidelines for Undergraduate Degree Programs in Software Engineering (cited on pages 45–
46).
Katwijk, Jan van, Ruud de Rooij, Sylvia Stuurman and Hans J. Toetenel (2001). ‘Software
Development and Verification of Dynamic Real-time Distributed Systems based on the Radio
Broadcast Paradigm’. In: Parallel and Distributed Computing Practices. Commack, NY, USA:
Nova Science Publishers, Inc., pp. 105–126 (cited on page 192).
Katwijk, Jan van and Hans J. Toetenel (1995). Experience Using Paisley for Real-time Specifica-
tion. Tech. rep. 95-29. Delft University of Technology, Department of Technical Mathematics
and Informatics (cited on pages 120, 127).
Kemerer, Chris F. (1995). ‘Software Complexity and Software Maintenance: A survey of empir-
ical research’. In: Annals of Software Engineering 1.1, pp. 1–22 (cited on page 21).
Kennedy, Aileen (2005). ‘Models of Continuing Professional Development: A framework for
analysis’. In: Journal of In-service Education 31.2, pp. 235–250 (cited on page 165).
Kinnunen, Päivi and Lauri Malmi (2006). ‘Why Students Drop out CS1 courses’. In: Proceedings
of the Second International Workshop on Computing Education Research. ACM, pp. 97–108
(cited on page 91).
Kirschner, Paul A., John Sweller and Richard E Clark (2006). ‘Why Minimal Guidance during
Instruction does Not Work: An analysis of the failure of constructivist, discovery, problem-
based, experiential, and inquiry-based teaching’. In: Educational psychologist 41.2, pp. 75–
86 (cited on pages 13, 45, 91).
Ko, Minhyuk, Yong-Jin Seo, Bup-Ki Min, Seunghak Kuk and Hyeon Soo Kim (2012). ‘Extending
UML Meta-model for Android Application’. In: Proceedings of the 2012 IEEE/ACIS 11th
International Conference on Computer and Information Science (ICIS). Shanghai, China:
IEEE Computer Society, pp. 669–674 (cited on page 32).
201
REFERENCES
Kou, Siming, Muhammad Ali Babar and Amit Sangroya (2010). ‘Modeling Security for Service
Oriented Applications’. In: Proceedings of the Fourth European Conference on Software Archi-
tecture: Companion Volume. ECSA ’10. Copenhagen, Denmark: ACM, pp. 294–301 (cited
on page 41).
Kraemer, Frank A. (2011). ‘Engineering Android Applications Based on UML Activities’. In: Pro-
ceedings of the 14th Conference on Model Driven Engineering Languages and Systems (MOD-
ELS). Ed. by Jon Whittle, Tony Clark and Thomas Kühne. Vol. 6981. Lecture Notes in
Computer Science. Wellington, New Zealand: Springer, pp. 183–197 (cited on pages 32,
36, 39).
Kramer, Jeff (2007). ‘Is Abstraction the Key to Computing?’ In: Communications of the ACM
50.4, pp. 36–42 (cited on pages 12–13, 96).
Kramer, Jeff and Jeff Magee (1990). ‘The Evolving Philosophers Problem: Dynamic change
management’. In: IEEE Transactions on Software Engineering 16.11, pp. 1293–1306 (cited
on pages 70, 121).
Kruchten, Philippe (1995). ‘Architectural Blueprints: The 4+1 View Model of Architecture’. In:
IEEE Software 12.6, pp. 42–50 (cited on pages 10, 61).
Kruchten, Philippe (2004). The Rational Unified Process: an introduction. Addison-Wesley Pro-
fessional (cited on page 180).
Kurshan, Robert P. (1997). ‘Formal Verification in a Commercial Setting’. In: Proceedings of
the 34th Design Automation Conference. Anaheim, California, USA: ACM Digital Library,
pp. 258–262 (cited on page 148).
Larman, Craig (2012). Applying UML and Patterns: An Introduction to Object-Oriented Analysis
and Design and Iterative Development. Third Edition. Upper Saddle River, United States:
Pearson Education (cited on page 30).
Lehman, Meir M. and Les A. Belady (1985). Program Evolution - processes of software change.
London: Academic Press (cited on page 6).
Lehman, Meir M., Dewayne E. Perry and Juan F. Ramil (1998). ‘On Evidence Supporting the
FEAST Hypothesis and the Laws of Software Evolution’. In: Proceedings of the Fifth Inter-
national Software Metrics Symposium. Bethesda, Maryland, USA: IEEE Computer Society
Press, pp. 84–88 (cited on pages 6–7).
Li, Zhen and Eileen Kraemer (2013). ‘Programming with Concurrency: Threads, Actors, and
Coroutines’. In: Proceedings of the 2013 IEEE 27th International Parallel and Distributed
Processing Symposium Workshops & PhD Forum (IPDPSW). Boston, Massachusetts, United
States: IEEE Computer Society Press, pp. 1304–1311 (cited on page 41).
Libbrecht, Paul and Stefan Winterstein (2005). ‘The Service Architecture in the ActiveMath
Learning Environment’. In: First International Kaleidoscope, Learning Grid SIG Workshop on
Distributed e-Learning Environments. Naples, Italy: Technology Enhanced Learning European
Advanced Research Consortium (TELEARC). published online at http : / / ewic . bcs . org /
category/16635 (cited on page 88).
Liskov, Barbara and Stephen Zilles (1974). ‘Programming with Abstract Data Types’. In: ACM
Sigplan Notices 9.4, pp. 50–59 (cited on page 9).
Liu, Tongping, Charlie Curtsinger and Emery D. Berger (2011). ‘DThreads: Efficient Determ-
inistic Multithreading’. In: Proceedings of the Twenty-Third ACM Symposium on Operating
Systems Principles. Cascais, Portugal: ACM Digital Library, pp. 327–336 (cited on page 41).
Lodder, Josje S., Johan Jeuring and Harrie J.M. Passier (2006). ‘An Interactive Tool for Manip-
ulating Logical Formulae’. In: Proceedings of the Second International Conference on Tools
for Teaching Logic (TICTTL). Ed. by M. Manzano, B. Pérez Lancho and A. Gil. Salamanca,
Spain: Springer (cited on page 87).
202
References
Lodder, Josje S., Harrie J.M. Passier and Sylvia Stuurman (2008). ‘Using IDEAS in Teaching
Logic, Lessons Learned’. In: Proceedings of the International Conference on Computer Science
and Software Engineering (CSSE). Vol. 5. Wuhan, China: IEEE Computer Society Press,
pp. 553–557. Also available as Technical Report Utrecht University UU-CS-2006-040 (cited
on pages 19, 76, 192).
Lodderstedt, Torsten, David Basin and Jürgen Doser (2002). ‘SecureUML: A UML-based mod-
eling language for model-driven security’. In: UML 2002, The Unified Modeling Language.
Ed. by Jean-Marc Jézéquel, Heinrich Hussmann and Stephen Cook. Vol. 2460. Lecture
Notes in Computer Science. Springer Berlin Heidelberg, pp. 426–441 (cited on page 41).
Lüer, Chris, David S. Rosenblum and André van der Hoek (2001). ‘The Evolution of Software
Evolvability’. In: Proceedings of the 4th International Workshop on Principles of Software
Evolution. IWPSE ’01. Vienna, Austria: ACM Digital Library, pp. 134–137 (cited on pages 6,
17).
Lutje Spelberg, Ronald F., Sylvia Stuurman and Hans J. Toetenel (1996). MTCCS. Tech. rep.
Delft University of Technology, Faculty of Technical Mathematics and Informatics (cited on
page 193).
Ma, Linxiao, John Ferguson, Marc Roper and Murray Wood (2007). ‘Investigating the Viability
of Mental Models held by Novice Programmers’. In: ACM SIGCSE Bulletin 39.1, pp. 499–503
(cited on page 91).
Magee, Jeff and Jeff Kramer (1996). ‘Dynamic Structure in Software Architectures’. In: ACM
SIGSOFT Software Engineering Notes 21.6, pp. 3–14 (cited on page 71).
Magee, Jeff and Jeff Kramer (2006). State Models and Java Programs. Second Edition. Chichester,
England: Wiley (cited on page 40).
Marchetto, Alessandro, Paolo Tonella and Filippo Ricca (2008). ‘State-based Testing of Ajax
Web Applications’. In: Proceedings of the 2008 1st International Conference on Software
Testing, Verification, and Validation. Lillehammer, Norway: IEEE Computer Society, pp. 121–
130 (cited on page 40).
Mayr, Ernst (1997). ‘The Objects of Selection’. In: Proceedings of the National Academy of
Sciences 94.6, pp. 2091–2094 (cited on page 6).
McConnell, Steve (2004). Code Complete. Microsoft Press (cited on page 11).
McCracken, Michael et al. (2001). ‘A Multi-national, Multi-institutional Study of Assessment of
Programming Skills of First-year CS Students’. In: ACM SIGCSE Bulletin 33.4, pp. 125–180
(cited on page 90).
McGreal, Rory (2004). ‘Learning Objects: A practical definition’. In: International Journal
of Instructional Technology and Distance Learning (IJITDL) 9.1. available online at http:
//www.itdl.org/Journal/Sep_04/article02.htm (cited on page 159).
Mehta, Nikunj R., Nenad Medvidovic and Sandeep Phadke (2000). ‘Towards a Taxonomy of
Software Connectors’. In: Proceedings of the 22nd International Conference on Software En-
gineering (ICSE). Limerick, Ireland: ACM Digital Library, pp. 178–187 (cited on page 10).
Merriam-Webster (2004). Merriam-Webster’s Collegiate Dictionary. Merriam-Webster (cited on
page 8).
Merriënboer, Jeroen J.G. van, Richard E. Clark and Marcel B.M. de Croock (2002). ‘Blueprints
for Complex Learning: The 4C/ID-model’. In: Educational Technology Research and Devel-
opment 50.2, pp. 39–61 (cited on page 92).
Merriënboer, Jeroen J.G. van and Paul A. Kirschner (2001). ‘Three Worlds of Instructional
Design: State of the art and future directions’. In: Instructional Science 29.4-5, pp. 429–441
(cited on page 45).
203
REFERENCES
Merriënboer, Jeroen J.G. van and Paul A. Kirschner (2013). Ten Steps to Complex Learning, a
systematic appraoch to four-component instructional design. Second Edition. New York, NY,
USA: Taylor & Francis (cited on page 91).
Merrill, M. David (2002). ‘First Principles of Instruction’. In: Educational technology research
and development 50.3, pp. 43–59 (cited on pages 13, 45, 91).
Meyer, Bertrand (1997). Object-Oriented Software Construction. Second Edition. Upper Saddle
River, New Jersey, USA: Prentice Hall (cited on page 97).
Michels, Gerard, Sebastiaan Joosten, Jaap van der Woude and Stef Joosten (2011). ‘Am-
persand’. In: Proceedings of the 12th International Conference on Relational and Algebraic
Methods in Computer Science (RAMICS). Ed. by Harrie Swart. Vol. 6663. Lecture Notes in
Computer Science. Rotterdam, the Netherlands: Springer, pp. 280–293 (cited on page 20).
Microsystems, Sun (1998). The JavaSpaces Specification. Tech. rep. published online at http:
//www.oracle.com/technetwork/articles/javase/javaspaces- 140665.html. Sun Microsystems
(cited on page 138).
Minto, Barbara (2009). The pyramid principle: logic in writing and thinking. Pearson Education
(cited on page 190).
Morrison, Gary R., Steven M. Ross, Mala Gopalakrishnan and Jason Casey (1995). ‘The Effects
of Feedback and Incentives on Achievement in Computer-based Instruction’. In: Contem-
porary Educational Psychology 20.1, pp. 32–50 (cited on page 77).
Mory, Edna H. (2003). ‘Feedback Research Revisited’. In: Handbook of Research for Educational
Communications and Technology. Ed. by D.H. Jonassen. Heidelberg, Germany: Springer,
pp. 745–785 (cited on page 77).
Mouheb, Djedjiga et al. (2009). ‘Weaving Security Aspects into UML 2.0 Design Models’. In:
Proceedings of the 13th Workshop on Aspect-oriented Modeling. AOM ’09. Charlottesville,
Virginia, USA: ACM, pp. 7–12 (cited on page 41).
Myagmar, Suvda, Adam J. Lee and William Yurcik (2005). ‘Threat Modeling as a Basis for
Security Requirements’. In: Symposium on Requirements Engineering for Information Security
(SREIS), pp. 1–8 (cited on page 41).
Nielsen, Jacob (2006). Participation Inequality: Encouraging more users to contribute. Alertbox
Columns, http://www.nngroup.com/articles/participation-inequality/ (cited on page 172).
Nudelman, Greg (2013). Android Design Patterns: Interaction Design Solutions for Developers.
Indianapolis, United States: John Wiley & Sons (cited on page 42).
Odersky, Martin, Lex Spoon and Bill Venners (2010). Programming in Scala. Second Edition.
Artima (cited on pages 22, 163).
Oliveira, Paulo, Fátima Rodrigues and Pedro Rangel Henriques (2005). ‘A Formal Definition of
Data Quality Problems’. In: International Conference on Information Quality ICIQ. Cam-
bridge, Massachusstes, USA: MIT Information Quality (MITIQ), pp. 14–24 (cited on
page 94).
Oram, Andy and Greg Wilson (2007). Beautiful Code: Leading programmers explain how they
think. O’Reilly Media, Inc (cited on page 89).
Oreizy, Peyman, Nenad Medvidovic and Richard N. Taylor (1998). ‘Architecture-based Runtime
Software Evolution’. In: Proceedings of the 20th International Conference on Software Engin-
eering (ICSE). Long Beach, California, USA: IEEE Computer Society Press, pp. 177–186
(cited on page 71).
Parada, Abilio G and Lisane B. de Brisolara (2012). ‘A Model Driven Approach for Android
Applications Development’. In: Proceedings of the Conference on Computing System Engin-
eering, Brazilian Symposium (SBESC). IEEE Computer Society. Natal, Brazil: IEEE Computer
Society, pp. 192–197 (cited on pages 32, 36).
204
References
Parnas, David Lorge (1985). ‘Software Aspects of Strategic Defense Systems’. In: Communica-
tions of the ACM 28.12, pp. 1326–1335 (cited on page 20).
Parnas, David Lorge (1994). ‘Software Aging’. In: Proceedings of the 16th International Confer-
ence on Software Engineering (ICSE). Sorrento, Italy: IEEE Computer Society Press, pp. 279–
287 (cited on page 5).
Parnas, David Lorge, Paul C. Clements and David M. Weiss (1985). ‘The Modular Structure
of Complex Systems’. In: IEEE Transactions on Software Engineering SE-11.3, pp. 259–266
(cited on page 10).
Parnas, David Lorge, A. John van Schouwen and Shu Po Kwan (1990). ‘Evaluation of Safety-
critical Software’. In: Communications of the ACM 33.6, pp. 636–648 (cited on page 121).
Passier, Harrie J.M. and Johan Jeuring (2006). ‘Feedback in an Interactive Equation Solver’.
In: Proceedings of the Web Advanced Learning Conference and Exhibition (WebALT). Ed. by
M. Seppälä, S. Xambo and O. Caprotti. Oy WebALT, pp. 53–68 (cited on page 87).
Passier, Harrie J.M., Sylvia Stuurman and Harold Pootjes (2014). ‘Beautiful Javascript: How to
guide students to create good and elegant code’. In: Proceedings of the Fourth Computer
Science Education Research Conference (CSERC). Berlin, Germany: ACM Digital Library,
pp. 65–76 (cited on page 192).
Perry, Dewayne E. and Alexander L. Wolf (1992). ‘Foundations for the Study of Software Archi-
tecture’. In: ACM SIGSOFT Software Engineering Notes 17.4, pp. 40–52 (cited on page 10).
Peyton Jones, Simon L. (2003). Haskell 98 Language and Libraries: the revised report. Cambridge
University Press (cited on page 80).
Pietraszek, Tadeusz and Chris Vanden Berghe (2006). ‘Defending against Injection Attacks
through Context-Sensitive String Evaluation’. In: Recent Advances in Intrusion Detection.
Vol. 3858. Lecture Notes in Computer Science. Springer, pp. 124–145 (cited on page 94).
Pina, Luıs and Michael Hicks (2013). ‘Rubah: Efficient, general-purpose dynamic software
updating for Java’. In: Proceedings of the Workshop on Hot Topics in Software Upgrades
(HotSWUp). available online at https://www.usenix.org/conference/hotswup13/workshop-
program (cited on page 60).
Postel, Jon (1981). Request For Comments 793-Transmission Control Protocol (cited on pages 94,
97).
Proulx, Viera K. (2000). ‘Programming Patterns and Design Patterns in the Introductory Com-
puter Science Course’. In: ACM SIGCSE Bulletin 32.1, pp. 80–84 (cited on page 51).
Rahn, Mirko and Johannes Waldmann (2002). ‘The Leipzig Autotool System for Grading Stu-
dent Homework’. In: Workshop on Functional and Declarative Programming in Education
(FDPE). Kiel, Germany: University of Kiel (cited on page 87).
Rajkumar, Raganuthan and Mike Gagliardi (1996). ‘High Availability in The Real-Time Pub-
lisher/Subscriber Inter-Process Communication Model’. In: Proceedings 17th IEEE Real-Time
Systems Symposium. IEEE Computer Society Technical Committee on Real-Time Systems.
Washington, DC: IEEE Computer Society Press, pp. 136–141 (cited on page 138).
Richards, Gregor, Sylvain Lebresne, Brian Burg and Jan Vitek (2010). ‘An Analysis of the
Dynamic Behavior of JavaScript Programs’. In: ACM Sigplan Notices 45.6, pp. 1–12 (cited
on page 91).
Riley, Derek (2012). ‘Using Mobile Phone Programming to Teach Java and Advanced Program-
ming to Computer Scientists’. In: Proceedings of the 43rd ACM Technical Symposium on
Computer Science Education (SIGCSE). Raleigh, North Carolina, USA: ACM Digital Library,
pp. 541–546 (cited on pages 32, 36).
Rooij, Ruud C.M. de (1998). ‘Subscription-based Communication for Distributed Embedded
Java Applications’. In: Proceedings of the Fourth Annual Conference of the Advanced School
205
REFERENCES
for Computing and Imaging (ASCI). Lommel, Belgium: Advanced School for Computing and
Imaging (ASCI) (cited on pages 66, 139, 148).
Royce, Winston W. (1987). ‘Managing the Development of Large Software Systems: Concepts
and techniques’. In: Proceedings of the 9th International Conference on Software Engineering
(ICSE. Los Alamitos CA, USA: IEEE Computer Society Press, pp. 328–338 (cited on page 8).
Rozanski, Nick and Eoin Woods (2005). Software Systems Architecture: Working with Stake-
holders Using Viewpoints and Perspectives. Addison-Wesley Professional (cited on page 10).
Rumbaugh, James R., Michael R. Blaha, William Lorensen, Frederick Eddy and William Pre-
merlani (1990). Object-oriented Modeling and Design. Prentice-hall (cited on page 10).
Rumbaugh, James, Ivar Jacobson and Grady Booch (2004). Unified Modeling Language Refer-
ence Manual, The. Pearson Higher Education (cited on page 10).
Schön, Donald A. (1987). Educating the Reflective Practitioner. San Francisco: Jossey-Bass
(cited on page 13).
Schuwer, Robert, Andrew Lane, Anda Counotte-Potman and Martina Wilson (2011). ‘A Com-
parison of Production Processes for OER’. In: Open Courseware Consortium Global Meeting.
Cambridge, Massachusetts, USA: Open Courseware Consortium. published online at http:
//oro.open.ac.uk/29817/ (cited on page 168).
Schuwer, Robert and Fred Mulder (2009). ‘OpenER, a Dutch initiative in Open Educational
Resources’. In: Open Learning: The Journal of Open and Distance Learning 24.1, pp. 67–76
(cited on pages 158, 162).
Segal, Mark E. and Ophir Frieder (1988). ‘Dynamic Program Updating in a Distributed Com-
puter System’. In: Proceedings of the Conference on Software Maintenance. Phoenix, Arizona:
IEEE Computer Society Press, pp. 198–203 (cited on pages 71, 121).
Seifzadeh, Habib, Hassan Abolhassani and Mohsen Sadighi Moshkenani (2013). ‘A Survey of
Dynamic Software Updating’. In: Journal of Software: Evolution and Process 25.5, pp. 535–
568 (cited on page 17).
Shalloway, Alan and James Trott (2005). Design Patterns Explained: A new perspective on object-
oriented design. Addison-Wesley Professional (cited on page 50).
Shaw, Mary (1995). ‘Beyond Objects: A software design paradigm based on process control’.
In: ACM SIGSOFT Software Engineering Notes 20.1, pp. 27–38 (cited on page 127).
Shaw, Mary (1996). ‘Some Patterns for Software Architectures’. In: Pattern Languages of Pro-
gram Design 2. Addison-Wesley, pp. 255–269 (cited on page 13).
Shaw, Mary and Paul Clements (1997). ‘A Field Guide to Boxology: Preliminary classification
of architectural styles for software systems’. In: Proceedings of The 21st Annual International
Computer Software and Applications Conference (COMPSAC). Washington, DC, USA: IEEE
Computer Society Press, pp. 6–13 (cited on page 120).
Shaw, Mary and David Garlan (1996). Software Architecture: perspectives on an emerging dis-
cipline. Prentice Hall (cited on pages 10, 120, 122).
Singhal, Amit (2004). ‘Challenges in Running a Commercial Search Engine’. In: Proceedings
of the 28th Annual International ACM SIGIR Conference on Research and Development in
Information Retrieval. Salvador, Brazil: ACM, pp. 432–432 (cited on page 7).
Song, Hui et al. (2011). ‘Supporting Runtime Software Architecture: A bidirectional transfor-
mation based approach’. In: Journal of Systems and Software 84.5, pp. 711–723 (cited on
page 60).
Stankovic, John A. (1996). ‘Real-time and Embedded Systems’. In: ACM Computing Surveys
(CSUR) 28.1, pp. 205–208 (cited on pages 61, 131).
206
References
Steels, Luc (2003). ‘Intelligence with Representation’. In: Philosophical Transactions of the
Royal Society of London. Series A: Mathematical, Physical and Engineering Sciences 361.1811,
pp. 2381–2395 (cited on page 183).
Stefanov, Stoyan (2010). JavaScript patterns. Sebastopol, California, USA: O’Reilly Media
(cited on page 98).
Störrle, Harald and J.H. Hausmann (2004). ‘Semantics of UML 2.0 Activities’. In: Proceedings of
the IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC). Rome,
Italy: IEEE Computer Society, pp. 235–242 (cited on page 37).
Stringfellow, Catherine and Divya Mule (2013). ‘Smartphone Applications As Software Engin-
eering Projects’. In: Journal of Computing Sciences in Colleges 28.4, pp. 27–34 (cited on
pages 32, 36).
Stuurman, Sylvia and Bastiaan J. Heeren (2012). Scala Opener Cursus (in Dutch). http://
portal.ou.nl/web/topic-scala (cited on page 164).
Stuurman, Sylvia (1997). Evolving Software Architectures: A Position Paper. Presented at the
Living with Inconsistency Workshop in conjunction with ICSE (cited on pages 60–61, 193).
Stuurman, Sylvia (1999). ‘Software Architecture and Java Beans’. In: Proceedings of the First
working IFIP Conference on Software Architecture (WICSA). IFIP Conference Proceedings.
Washington DC, USA: IEEE Computer Society Press, pp. 183–199 (cited on pages 15, 180,
193).
Stuurman, Sylvia, Marko C.J.D. van Eekelen and Bastiaan J. Heeren (2012). ‘A New Method
for Sustainable Development of Open Educational Resources’. In: Proceedings of Second
Computer Science Education Research Conference (CSERC). Wroclaw, Poland: ACM Digital
Library, pp. 57–66 (cited on page 192).
Stuurman, Sylvia and Gert Florijn (2004). ‘Proceedings of the 9th Annual SIGCSE Conference
on Innovation and Technology in Computer Science Education’. In: vol. 36. SIGCSE Bulletin
3. Leeds, United Kingdom: ACM, pp. 151–155 (cited on page 192).
Stuurman, Sylvia and Johan Jeuring (2007). Turning an Interactive Tool implemented in Haskell
into a Web Application – an experience report. Technical report Universiteit Utrecht (cited
on page 192).
Stuurman, Sylvia and Jan van Katwijk (1997). ‘Evaluation of Software Architectures for a
Control System: a case study’. In: Proceedings of the Second International Conference on
Coordination Languages and Models (COORDINATION). Heidelberg, Germany: Springer,
pp. 157–171 (cited on page 193).
Stuurman, Sylvia and Jan van Katwijk (1998). ‘On-line Change Mechanisms: the Software
Architectural Level’. In: Proceedings of the 6th International Symposium on the Foundations
of Software Engineering. Orlando, Florida, US: ACM Digital Library, pp. 80–86 (cited on
pages 145, 193).
Stuurman, Sylvia, Harrie J.M. Passier and Bernard E. van Gastel (2014). ‘The Design of Mobile
Apps: Which Modeling Techniques to Teach?’ In: Proceedings of the Fourth Computer Science
Education Research Conference (CSERC). Berlin, Germany: ACM Digital Library, pp. 93–100
(cited on page 192).
Stuurman, Sylvia, Frank J. Wester and Manuela Witsier-Voglet (2002). Design Patterns. Open
Universiteit Nederland (cited on page 50).
Swierstra, S. Doaitse and Pablo R. Azero Alcocer (1999). ‘Fast, Error Correcting Parser Com-
binators: A short tutorial’. In: Theory and Practice of Informatics, 26th Seminar on Current
Trends in Theory and Practice of Informatics (SOFSEM). Vol. 1725. Lecture Notes in Com-
puter Science. Heidelberg, Germany: Springer, pp. 111–129 (cited on page 78).
207
REFERENCES
208
Yourdon, Edward and Larry L. Constantine (1979). Structured Design: Fundamentals of a dis-
cipline of computer program and systems design. Prentice-Hall, Inc. (cited on page 12).
Zinn, Claus (2006). ‘Feedback to Student Help Requests and Errors in Symbolic Differenti-
ation’. In: Proceedings of the 8th International Conference on Intelligent Tutoring Systems
(ITS). Vol. 4043. Lecture Notes in Computer Science. Jhongli, Taiwan: Springer, pp. 349–
359 (cited on page 79).
S Y LV I A S T U U R M A N
Sylvia Stuurman
Sylvia Stuurman studied Biology and
graduated in Computer Science.
She works as assistant professor at the
Open University of the Netherlands.