Story-driven modeling
is an
object-oriented modeling
Object-oriented modeling (OOM) is an approach to modeling an application that is used at the beginning of the software life cycle when using an object-oriented approach to software development.
The software life cycle is typically divided up into ...
technique.
Other forms of object-oriented modeling focus on
class diagram
In software engineering,
a class diagram
in the Unified Modeling Language (UML) is a type of static structure diagram that describes the structure of a system by showing the system's classes, their attributes, operations (or methods), and the re ...
s.
Class diagrams describe the static structure of a program, i.e. the building blocks of a program and how they relate to each other.
Class diagrams also model data structures, but with an emphasis on rather abstract concepts like types and type features.
Instead of abstract static structures, story-driven modeling focuses on concrete example scenarios and on how the steps of the example scenarios
may be represented as
object diagram
In object-oriented programming, an object diagram
in the Unified Modeling Language (UML) is a diagram that shows a complete or partial view of the structure of a modeled system at a specific time.
Overview
In the Unified Modeling Language (U ...
s and how these object diagrams evolve during scenario execution.
Software development approach
Story-driven modeling proposes the following software development approach:
# Textual scenarios: For the feature you want to implement, develop a textual scenario description for the most common case. Look on only one example at a time. Try to use specific terms and individual names instead of general terms and e.g. role names:
#: Scenario Go-Dutch barbecue
#*Start: This Sunday Peter, Putri, and Peng meet at the park for a go-Dutch barbecue. They use the Group Account app to do the accounting.
#*Step 1: Peter brings the meat for $12. Peter adds this item to the Group Account app.
#*Step 2: Putri brings salad for $9. Peter adds this item, too. The app shows that by now the average share is $7 and that Peng still have to bring these $7 while Peter gets $5 out and Putri gets $2 out.
#*Step 3: ...
# GUI mock-ups: To illustrate the
graphical user interface
A graphical user interface, or GUI, is a form of user interface that allows user (computing), users to human–computer interaction, interact with electronic devices through Graphics, graphical icon (computing), icons and visual indicators such ...
(GUI) for the desired feature, you may add some wireframe models or GUI mock-ups to your scenario:
#: Scenario Go-Dutch barbecue
#*Start: This Sunday Peter, Putri, and Peng meet at the park for a go-Dutch barbecue. They use the Group Account app to do the accounting.
#*Step 1: Peter brings the meat for $12. Peter adds this item to the Group Account app.
#*Step 2: Putri brings salad for $9. Peter adds this item, too. The app shows that by now the average share is $7 and that Peng still have to bring these $7 while Peter gets $5 out and Putri gets $2 out:

#*Step 3: ...
# Storyboarding: Next, you think about how a certain situation, i.e. a certain step of a scenario may be represented within a computer by a runtime object structure. This is done by adding
object diagram
In object-oriented programming, an object diagram
in the Unified Modeling Language (UML) is a diagram that shows a complete or partial view of the structure of a modeled system at a specific time.
Overview
In the Unified Modeling Language (U ...
s to the scenario. In story driven modeling, a scenario with object diagrams is also called a storyboard.
#: Scenario Go-Dutch barbecue
#*Start: This Sunday Peter, Putri, and Peng meet at the park for a go-Dutch barbecue. They use the Group Account app to do the accounting.
#*Step 1: Peter brings the meat for $12. Peter adds this item to the Group Account app.
#*Step 2: Putri brings salad for $9. Peter adds this item, too. The app shows that by now the average share is $7 and that Peng still have to bring these $7 while Peter gets $5 out and Putri gets $2 out:


#*Step 3: ...
# Class diagram derivation: Now it is fairly straightforward to derive a
class diagram
In software engineering,
a class diagram
in the Unified Modeling Language (UML) is a type of static structure diagram that describes the structure of a system by showing the system's classes, their attributes, operations (or methods), and the re ...
from the object diagrams used in the storyboards.

Note, the class diagram serves as a common reference for all object diagrams. This ensures that overall the same types and attributes are used. Using a
UML tool, you may generate a first implementation from this class diagram.
# Algorithm design: So far you have modeled and implemented that object structures that are deployed in your application. Now you need to add behavior, i.e. algorithms and method bodies. Programming the behavior of an application is a demanding task. To facilitate it, you should first outline the behavior in
pseudocode
In computer science, pseudocode is a description of the steps in an algorithm using a mix of conventions of programming languages (like assignment operator, conditional operator, loop) with informal, usually self-explanatory, notation of actio ...
notation. You might do this, e.g. with an object game. For example, to update the saldo attributes of all persons you look at our object structure and from the point of view of the GroupAccount object you do the following:
#: Update the saldo of all persons:
#* visit each item
#** for each item add the value to the total value and add 1 to the number of items
#* compute the average share of each person by dividing the total value by the number of persons
#* visit each person
#** for each person reset the saldo
#** for each person visit each item bought by this person
#*** for each item add the value to the saldo of the current person
#** for each person subtract the share from the saldo
# Behavior implementation: Once you have refined your algorithm
pseudocode
In computer science, pseudocode is a description of the steps in an algorithm using a mix of conventions of programming languages (like assignment operator, conditional operator, loop) with informal, usually self-explanatory, notation of actio ...
down to the level of operations on object structures it is straightforward to derive source code that executes the same operations on your object model implementation.
# Testing: Finally, the scenarios may be used to derive automatic
JUnit
JUnit is a test automation framework for the Java programming language. JUnit is often used for unit testing, and is one of the xUnit frameworks.
JUnit is linked as a JAR at compile-time. The latest version of the framework, JUnit 5, resides ...
tests. The pseudocode for a test for our example might look like:
#: Test update the saldo of all persons:
#* create a group account object
#* add a person object with name Peter and a person object with name Putri and a person object with name Peng to the group account object
#* add an item object with buyer Peter, description Meat, and value $12 to the group account object
#* add an item object with buyer Putri, description Salad, and value $9 to the group account object
#* call method update the saldo of all persons on the group account object
#* ensure that the saldo of the Peter object is $5
#* ensure that the saldo of the Putri object is $2
#* ensure that the saldo of the Peter object is -$7
#* ensure that the sum of all saldos is $0
: Such automatic tests ensure that in the example situation the behavior implementation actually does what is outlined in the storyboard. While these tests are pretty simple and may not identify all kinds of bugs, these tests are very useful to document the desired behavior and the usage of the new features and these tests ensure that the corresponding functionality is not lost due to future changes.
Summary
Story driven modeling has proven to work very well for the cooperation with non IT experts.
People from other domains usually have difficulties to describe their needs in general terms (i.e. classes) and general rules (pseudocode). Similarly, normal people have problems to understand pseudocode or to judge, whether their needs are properly addressed or not. However, these people know their business very well and with the help of concrete examples and scenarios it is very easy for normal people to spot problematic cases and to judge whether their needs have been addressed properly.
Story Driven Modeling has matured since its beginning in 1997. In 2013 it is used for teaching e.g. in Kassel University, Paderborn University, Tartu University, Antwerp University, Nazarbayev University Astana, Hasso Platner Institute Potsdam, University of Victoria, ...
See also
*
Agile modeling
Agile modeling (AM) is a methodology for Software development process models, modeling and documentation, documenting software systems based on best practices. It is a collection of values and principles that can be applied on an (agile) software d ...
*
Entity–control–boundary
The entity–control–boundary (ECB), or entity–boundary–control (EBC), or boundary–control–entity (BCE) is an architectural pattern used in Use case, use-case–driven object-oriented programming that structures the Class (computer prog ...
*
Agile software development
Agile software development is an umbrella term for approaches to software development, developing software that reflect the values and principles agreed upon by ''The Agile Alliance'', a group of 17 software practitioners, in 2001. As documented ...
*
Class-responsibility-collaboration card Class-responsibility-collaboration (CRC) cards are a brainstorming tool used in the design of object-oriented software. They were originally proposed by Ward Cunningham and Kent Beck as a teaching tool but are also popular among expert designers ...
*
Object-oriented analysis and design
Object-oriented analysis and design (OOAD) is a technical approach for analyzing and designing an application, system, or business by applying object-oriented programming, as well as using visual modeling throughout the software development pro ...
*
Object-oriented modeling
Object-oriented modeling (OOM) is an approach to modeling an application that is used at the beginning of the software life cycle when using an object-oriented approach to software development.
The software life cycle is typically divided up into ...
*
Test-driven development
Test-driven development (TDD) is a way of writing source code, code that involves writing an test automation, automated unit testing, unit-level test case that fails, then writing just enough code to make the test pass, then refactoring both the ...
*
Unified Modeling Language
The Unified Modeling Language (UML) is a general-purpose visual modeling language that is intended to provide a standard way to visualize the design of a system.
UML provides a standard notation for many types of diagrams which can be roughly ...
References
{{reflist
Object-oriented programming
Software design