100% found this document useful (2 votes)
837 views

Software Development

Uploaded by

szpakos
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
837 views

Software Development

Uploaded by

szpakos
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 272

University

College of Southeast Norway

Software Development
A Practical Approach!
Hans-Petter Halvorsen, 2016.01.06

http://home.hit.no/~hansha

Preface
The main goal with this document:

• To give you an overview of what software engineering is


• To take you beyond programming to engineering software

What is Software Development? It is a complex process to develop modern and professional


software today. This document tries to give a short overview of Software Development.


This document tries to focus on a practical approach regarding Software Development.

So why do we need System Engineering? Here are some key factors:

• Understand Customer Requirements


o What does the customer needs (because they may not know it!)
o Transform Customer requirements into working software
• Planning
o How do we reach our goals?
o Will we finish within deadline?
o Resources
o What can go wrong?
• Implementation
o What kind of platforms and architecture should be used?

ii

o Split your work into manageable pieces


• Quality and Performance
o Make sure the software fulfills the Customers needs

We will learn how to build good (i.e. high quality) software, which includes:

• Requirements Specification
• Technical Design
• Good User Experience (UX)
• Improved Code Quality and Implementation
• Testing
• System Documentation
• User Documentation
• etc.

You will find additional resources on this web page:

http://home.hit.no/~hansha/?tutorial=software_development

Information about the author:

Hans-Petter Halvorsen, M.Sc.


The author currently works at University College of Southeast Norway. The author has been
working with Software Engineering for the last 20 years.

For more information, visit my web site:

iii

http://home.hit.no/~hansha

iv

Table of Contents
Preface ...................................................................................................................... ii

Table of Contents ...................................................................................................... v

Part 1 : Introduction ........................................................................... 15


1 Introduction ...................................................................................................... 16
1.1 Background .................................................................................................................... 20

1.2 Topics ............................................................................................................................. 21

1.3 Tools ............................................................................................................................... 23

2 Software History ............................................................................................... 27


2.1 Introduction ................................................................................................................... 27

2.2 Software Trends ............................................................................................................. 29

3 Software Development ..................................................................................... 31

3.1 Challenges ...................................................................................................................... 32

3.2 Software Systems ........................................................................................................... 32

3.3 Documentation .............................................................................................................. 34

3.4 Iterations and Releases .................................................................................................. 35

Part 2 : Software Engineering ............................................................. 37


4 Development Teams ......................................................................................... 38

4.1 Teams ............................................................................................................................. 39

4.2 Roles ............................................................................................................................... 39

4.2.1 Stakeholders ........................................................................................................... 40

4.2.2 Project Manager ..................................................................................................... 40

4.2.3 System Architect ..................................................................................................... 40

v
vi Table of Contents

4.2.4 UX Designer ............................................................................................................ 40

4.2.5 Programmer ............................................................................................................ 40

4.2.6 Software Tester ....................................................................................................... 40

5 Software Development Phases ......................................................................... 42

5.1 Requirements ................................................................................................................. 43

5.2 Design ............................................................................................................................. 44

5.2.1 Technical Design ..................................................................................................... 45

5.2.2 UX Design ................................................................................................................ 45

5.3 Implementation ............................................................................................................. 45

5.4 Testing ............................................................................................................................ 46

5.5 Deployment .................................................................................................................... 46

6 Software Development Process ........................................................................ 47

6.1 Plan-driven models ........................................................................................................ 49

6.1.1 Waterfall model ...................................................................................................... 49

6.1.2 V-model .................................................................................................................. 50

6.2 Agile Software Development ......................................................................................... 51

6.2.1 Waterfall vs. Agile ................................................................................................... 55

6.2.2 eXtreme Programming (XP) .................................................................................... 56

6.2.3 Scrum ...................................................................................................................... 58

6.2.4 Kanban .................................................................................................................... 60

6.3 Hybrid Process Models ................................................................................................... 61

6.3.1 Unified Process (UP)/ Rational Unified Process (RUP) ............................................ 61

6.4 Summary ........................................................................................................................ 62

6.5 Exercises ......................................................................................................................... 62

7 Scrum ................................................................................................................ 64
7.1 The Scrum Process ......................................................................................................... 64
vii Table of Contents

7.2 Scrum Events .................................................................................................................. 65

7.2.1 Daily Scrum Meeting ............................................................................................... 66

7.3 Scrum Artifacts ............................................................................................................... 67

7.4 The Scrum Team ............................................................................................................ 67

7.5 Scrum Meetings ............................................................................................................. 68

7.6 Scrum Terms .................................................................................................................. 69

7.7 Tips and Tricks ................................................................................................................ 71

8 Project Management ........................................................................................ 72

8.1 Project Planning ............................................................................................................. 73

8.2 Kick-off/Brainstorming ................................................................................................... 73

8.3 Software Development Plan (SDP) ................................................................................. 74

8.3.1 Gantt Chart ............................................................................................................. 76

8.4 Meetings ........................................................................................................................ 77

8.4.1 Meeting Agenda ..................................................................................................... 78

8.4.2 Minutes of Meeting ................................................................................................ 78

8.5 Agile Project Planning and Tracking ............................................................................... 79

8.6 Summary ........................................................................................................................ 81

9 Requirements Engineering ................................................................................ 83

9.1 User Requirements ........................................................................................................ 85

9.2 System Requirements .................................................................................................... 85

9.3 Functional Requirements ............................................................................................... 85

9.4 Non-Functional Requirements ....................................................................................... 86

9.5 SRS .................................................................................................................................. 86

9.6 Project Estimation .......................................................................................................... 89

9.7 Exercises ......................................................................................................................... 89

10 User eXperience(UX) ...................................................................................... 91


viii Table of Contents

10.1 UX Guidelines ............................................................................................................. 92

10.2 GUI Mockup ................................................................................................................ 93

10.3 Creativity .................................................................................................................... 94

11 UML ............................................................................................................... 95

11.1 Introduction ................................................................................................................ 95

11.2 UML Software ............................................................................................................. 96

11.2.1 Visual Studio Enterprise .......................................................................................... 96

11.3 Use Case ..................................................................................................................... 97

11.4 Sequence Diagram ...................................................................................................... 98

11.5 Class Diagram ............................................................................................................. 99

11.6 Summary .................................................................................................................... 99

11.7 Exercises ..................................................................................................................... 99

12 Software Implementation ............................................................................ 101


12.1 Programming Style & Coding Guidelines .................................................................. 102

12.1.1 Naming Convention .............................................................................................. 103

12.2 Comments ................................................................................................................ 103

12.3 Debugging ................................................................................................................. 106

12.4 Code Review ............................................................................................................. 107

12.5 Refactoring ............................................................................................................... 109

13 Testing ......................................................................................................... 111

13.1 Introduction .............................................................................................................. 111

13.1.1 Test Levels ............................................................................................................. 116

13.1.2 Bug Tracking .......................................................................................................... 117

13.1.3 Software versioning .............................................................................................. 117

13.2 Test Categories ......................................................................................................... 120

13.2.1 Black-box Testing .................................................................................................. 120


ix Table of Contents

13.2.2 White-box Testing ................................................................................................. 121

13.3 Test Levels ................................................................................................................ 121

13.3.1 Unit Testing ........................................................................................................... 123

13.3.2 Regression Testing ................................................................................................ 125

13.3.3 Integration Testing ................................................................................................ 126

13.3.4 System Testing/Validation Testing ........................................................................ 126

13.3.5 Acceptance Testing ............................................................................................... 126

13.4 Test Documentation ................................................................................................. 127

13.4.1 Test Planning ......................................................................................................... 128

13.5 Bug Tracking Systems ............................................................................................... 129

13.6 Test Environment ..................................................................................................... 130

13.6.1 Virtualization ......................................................................................................... 132

13.7 Terms used in Testing ............................................................................................... 134

13.7.1 Bugs ...................................................................................................................... 134

13.7.2 Debugging ............................................................................................................. 134

13.7.3 Code Coverage ...................................................................................................... 135

13.7.4 Eat your own Dog food ......................................................................................... 135

13.7.5 Code/Feature Freeze ............................................................................................ 136

13.7.6 Test-Driven Development (TDD) ........................................................................... 136

13.7.7 Development-Driven Testing (DDT) ...................................................................... 136

13.8 The 7 Principles of Testing ........................................................................................ 137

13.9 Testing Summary ...................................................................................................... 138

13.10 Exercises ................................................................................................................... 138

14 Deployment and Installation ....................................................................... 140

14.1 Introduction .............................................................................................................. 140

14.2 Releases .................................................................................................................... 140


x Table of Contents

14.3 Deployment .............................................................................................................. 142

14.4 Test and Production Environment ............................................................................ 143

14.4.1 Development Environment ................................................................................... 145

14.4.2 Production Environment ....................................................................................... 145

14.4.3 Test Environment .................................................................................................. 145

15 Project Documentation ................................................................................ 146

15.1 Process Documentation ........................................................................................... 149

15.2 Product Documentation ........................................................................................... 150

15.2.1 System Documentation ........................................................................................ 150

15.2.2 User Documentation ............................................................................................. 152

15.3 Setup & Distribution ................................................................................................. 154

16 Software Maintenance ................................................................................ 155

16.1 Introduction .............................................................................................................. 155

16.2 Categories ................................................................................................................. 155

Part 3 : Platforms & Tools ................................................................ 158


17 Software Platforms ...................................................................................... 159

17.1 Introduction .............................................................................................................. 159

17.2 Platform Vendors ..................................................................................................... 160

17.3 Desktop .................................................................................................................... 161

17.3.1 Windows ............................................................................................................... 162

17.3.2 Mac OS X ............................................................................................................... 163

17.3.3 Linux ...................................................................................................................... 165

17.4 Web .......................................................................................................................... 167

17.4.1 Web Servers .......................................................................................................... 169

17.4.2 Web Frameworks .................................................................................................. 169

17.4.3 Web Scripting Languages ...................................................................................... 170


xi Table of Contents

17.5 Mobile Devices ......................................................................................................... 171

17.5.1 iOS ......................................................................................................................... 173

17.5.2 Android ................................................................................................................. 174

17.5.3 Windows 8/8.1 and Windows 10 .......................................................................... 177

17.5.4 Windows Phone .................................................................................................... 179

17.6 Cloud Computing ...................................................................................................... 180

17.7 Open Source ............................................................................................................. 181

18 Software Frameworks & Languages ............................................................ 182

18.1 Object-Oriented Programming (OOP) ...................................................................... 182

18.2 Popular Programming Languages
 ........................................................................... 183

18.2.1 C ............................................................................................................................ 184

18.2.2 C++ ........................................................................................................................ 185

18.2.3 C# .......................................................................................................................... 185

18.2.4 Java ....................................................................................................................... 186

18.2.5 Objective-C ........................................................................................................... 187

18.2.6 Visual Basic ........................................................................................................... 187

18.2.7 Perl ........................................................................................................................ 187

18.2.8 Python ................................................................................................................... 188

18.2.9 PHP ........................................................................................................................ 189

18.2.10 JavaScript .......................................................................................................... 189

18.2.11 SQL .................................................................................................................... 189

18.2.12 MATLAB ............................................................................................................. 190

18.2.13 LabVIEW ............................................................................................................ 191

18.3 Naming Convention .................................................................................................. 192

18.4 Defensive Programming ........................................................................................... 194

18.4.1 Error Handling ....................................................................................................... 194


xii Table of Contents

18.5 Software Frameworks .............................................................................................. 196

18.5.1 .NET Framework ................................................................................................... 196

18.5.2 WPF ....................................................................................................................... 196

18.5.3 Silverlight .............................................................................................................. 198

19 Software Architecture .................................................................................. 199

19.1 API ............................................................................................................................ 201

19.2 Client-Server ............................................................................................................. 203

19.3 Web Services ............................................................................................................ 204

19.3.1 SOAP Web Services ............................................................................................... 207

19.3.2 REST Web Services ................................................................................................ 208

19.3.3 Creating Web Services with Visual Studio ............................................................ 208

19.4 3-tier Architecture .................................................................................................... 212

20 Integrated Development Environment (IDE) ............................................... 217


20.1 Visual Studio ............................................................................................................. 217

20.2 Xcode ........................................................................................................................ 218

20.3 Eclipse ....................................................................................................................... 219

20.4 Android Studio .......................................................................................................... 219

21 UML Software .............................................................................................. 221

21.1 Visio .......................................................................................................................... 221

21.2 Visual Studio (Enterprise) ......................................................................................... 222

22 Source Code Control (SCC) ........................................................................... 223

22.1 Introduction .............................................................................................................. 223

22.2 Team Foundation Server .......................................................................................... 225

22.3 SVN ........................................................................................................................... 225

22.4 CVS ............................................................................................................................ 226

22.5 Git ............................................................................................................................. 226


xiii Table of Contents

22.6 Others ....................................................................................................................... 226

22.7 Cloud-based SCC Hosting Services ............................................................................ 226

22.7.1 Visual Studio Online .............................................................................................. 226

22.7.2 GitHub ................................................................................................................... 227

22.7.3 Bitbucket ............................................................................................................... 227

23 Bug Tracking Systems .................................................................................. 228

24 Team Foundation Server (TFS) ..................................................................... 229

24.1 Source Code Control (SCC) ....................................................................................... 231

24.2 Areas and Iterations ................................................................................................. 232

24.3 Work Items ............................................................................................................... 233

24.3.1 Queries .................................................................................................................. 235

24.4 Taskboard ................................................................................................................. 236

24.5 Visual Studio Online ................................................................................................. 236

24.6 Client Tools ............................................................................................................... 239

24.6.1 Team Explorer ....................................................................................................... 239

24.6.2 MS Excel Add-in .................................................................................................... 241

24.6.3 MS Project Add-in ................................................................................................. 241

24.6.4 Windows Explorer Integration .............................................................................. 242

24.6.5 TFS MSSCCI Provider ............................................................................................. 242

24.6.6 Team Explorer Everywhere ................................................................................... 243

24.7 Agile (Scrum) Development in TFS ........................................................................... 244

24.7.1 Product Backlog Items in TFS ................................................................................ 245

24.7.2 Sprint Backlog Items in TFS ................................................................................... 245

24.7.3 Taskboard ............................................................................................................. 247

24.8 Software Testing in TFS ............................................................................................ 248

24.8.1 Test Planning in TFS .............................................................................................. 249


xiv Table of Contents

25 Databases .................................................................................................... 250

25.1 SQL Server ................................................................................................................ 250

25.2 ER Diagram ............................................................................................................... 251

25.2.1 MS Visio ................................................................................................................ 252

25.2.2 ERwin .................................................................................................................... 252

25.3 Structured Query Language ...................................................................................... 253

25.3.1 Best Practice ......................................................................................................... 254

26 Unit Testing .................................................................................................. 255

26.1 Unit Tests Frameworks ............................................................................................. 255

26.2 Unit Testing in Visual Studio ..................................................................................... 255

26.3 Code Coverage ......................................................................................................... 258

26.4 Exercises ................................................................................................................... 259

27 Deployment in Visual Studio ........................................................................ 260

27.1 Setup Creation Software .......................................................................................... 261

27.2 Visual Studio ............................................................................................................. 262

27.2.1 InstallShield Limited Edition ................................................................................. 262

27.2.2 WiX Toolset ........................................................................................................... 263

Part 4 : Additional Resources ........................................................... 265


28 Tutorials ....................................................................................................... 266

29 Glossary ....................................................................................................... 267

References ............................................................................................................ 270


Part 1 : Introduction
In this part we discuss what software development is with some examples. We also give a short
overview of the software history.

15

1 Introduction
What is Software Development? It is a complex process to develop modern and professional
software today. This document tries to give a short overview of Software Development. Normally
we use the terms System Engineering or Software Engineering.

System Engineering: The process of analyzing and designing an entire system, including the
hardware and the software.

Software Engineering: The discipline for creating software applications. A systematic approach to
the design, development, testing, and maintenance of software.

A lot of systems today have a mix of hardware and software that is tightly integrated, like modern
smartphones, tablets, etc. To create such systems, involve a lot of different disciplines.

Software, is any set of machine-readable instructions that directs a computer's processor to


perform specific operations. The term is used to contrast with computer hardware, the physical
objects (processor and related devices) that carry out the instructions. Computer hardware and
software require each other and neither can be realistically used without the other, see Figure 1-1.


Figure 1-1: Hardware and Software working together

16
17 1 Introduction

In Figure 1-2 we see a typical network and infrastructure that the software relies on.


Figure 1-2: Typical Network and Infrastructure in Software Development

Figure 1-3 we see the complexity of software development and different components that are
involved.


Figure 1-3: The Complexity of Software.

Part 1: Introduction
18 1 Introduction

In Figure 1-4 we see the different phases involved in the Software Development Lifecycle (SDLC).


Figure 1-4: The Software Development Lifecycle

The main parts or phases in the software development process are:

• Planning
• Requirements Analysis
• Design
• Implementation
• Testing
• Deployment and Maintenance

In Figure 1-5 we see examples of some of the different activities involved in the different phases of
software development.

Part 1: Introduction
19 1 Introduction


Figure 1-5: Activities involved in the different Software Phases

As you see, software development involves lot of phases the are executed by different disciplines
and different people. We will discuss and explain all these things later in this document.


Figure 1-6: Have Reviews at all levels in the Development Cycle

Part 1: Introduction
20 1 Introduction

1.1 Background
Software and software systems are getting more and more complex, so it is important to have the
necessary “tools” in your “toolbox” to be able to create and maintain your software.

Software Development is a complex process, and it may involves a lot of money and a lot of
people. Here are some examples:

• Windows 7: A Team with 1000 Developers created Windows 7

• Number of Code Lines: Real systems may have millions of code lines

• Big money: 100+ million Development Projects

• Combination of Hardware and Software: Most of the projects involves both hardware and
software and integration between them.

• iPhone 1: Development period 2004-2007, 1000 Apple employees worked with the device,
Estimated cost: $150 mill.

All this needs some kind of structure! - Software Engineering is the Answer!

Part 1: Introduction
21 1 Introduction


Project Planning and Management is important in Software Development and we can use different
approaches to deal with the Software Development, which we will cover in this document.

Especially so-called Agile approaches, such as Scrum has become very popular today.

1.2 Topics
Below we list the different topics covered in this document. The Software Development Life Cycle,
shorted SDLC, involves different phases, such as:

• Market research
• Gathering requirements for the proposed business solution
• Analyzing the problem
• Create a plan or design for the software-based solution
• Implementation (coding) of the software
• Documentation in different ways
• Testing the software
• Deployment and Installation
• Maintenance and bug fixing
• Marketing

See also Figure 1-7 for topics involved in software development.

There are different approaches (Software Development Processes) that deal with these phases,
such as:

Part 1: Introduction
22 1 Introduction

• Waterfall model
• V-model
• Agile Software Development (such as Scrum, XP, etc.)
• Spiral model
• Rational Unified Process (RUP)
• etc.

We will learn more about these development processes later in this document.


Figure 1-7: Different Topics involved in Software Development

Software Development also involves different roles, which are organized in different teams (Figure
1-8). Typical roles are:

• Project Manager
• System Architect
• UX Designer
• Programmer, System Developer
• Tester
• Customer

It is crucial that the different roles and teams are able to work together and collaborate.

The Programmer or System Engineer has to deal with that there exists hundreds of different
Programming Languages. Each language has pros and cons, so it is important to find out which
programming language is best suited in a given situation.

Part 1: Introduction
23 1 Introduction


Figure 1-8: Different Roles involved in Software Development

In this document we will learn how to build good (i.e. high quality) software, which includes:

• Requirements Specification
• Technical Design
• User Experience (UX)
• Improved Code Quality and Implementation
• Testing
• System Documentation
• User Documentation
• etc.

1.3 Tools
In order to create great software, as a software engineer you need a toolbox with proper tools,
otherwise you will not succeed in your job (see Figure 1-9).

Part 1: Introduction
24 1 Introduction


Figure 1-9: The Toolbox of a Software Engineer

When working with software development it is important to have good tools. The developer needs
of course to use a programming language and proper IDE (Integrated Development Environment).
In addition, a so-called ALM Tool should be used. ALM is short for Application Lifecycle
Management. An ALM tool typically facilitate and integrate things like:

• Requirements Management
• Architecture
• Coding
• Source Code Control (SCC)
• Testing
• Bug Tracking
• Release Management
• etc.

There exist a lot of such tools, e.g. Team Foundation Server (TFS), Jita, etc.

We will take a closer look at TFS in this document. TFS from Microsoft, since it is tightly integrated
with Visual Studio.

Typically, you need to share the code with others developers or testers in your team or other
teams, so it is crucial that you have tools that can be used to share your code, that makes sure that

Part 1: Introduction
25 1 Introduction

old versions of your code will be stored, and can be restored, etc. Such a system is called a Source
Code Control (SCC) system.

Your software will also contain a lots of bugs that needs to be found, tracked and fixed, etc. In
order to handle that we need a so-called Bug Tracking system.

In Figure 1-10 we see some of the bug tracking functionality in TFS.


Figure 1-10: Bug Tracking System

In Figure 1-11 we see a typical software project with different platforms and frameworks involved.

Part 1: Introduction
26 1 Introduction


Figure 1-11: Typical Software Project with different Platforms and Frameworks involved

Typically, your software needs to be installed and be running on different devices, such as PCs,
tablets, smartphones, etc. You also need to store the data, typically in a database, such as
Microsoft SQL Server, MySQL, etc.

All these devices and the data also need to communicate with each other over a network, either
an internal network (LAN, Local Area Network) or over Internet (WAN, Wide Area Network).

All these things make it very complicated to develop, test, deploy and install such systems. That’s
the reality for a modern software developer.

Part 1: Introduction

2 Software History
2.1 Introduction
The computer and software history goes back to the beginning of the 1900 century. IBM was
established in 1911, Hewlet Packard (HP) was established in 1939, the transistor came in 1947, the
first Microprocessor came in 1972, etc. But “personal computing” started in 1981 with MS-DOS
and the IBM PC. In 1984 came the famous Macintosh from Apple. Windows 1.0 was released in
1985.

They found a bug (actually a moth) inside a computer in 1947 that made the program not
behaving as expected. This was the “first” real bug.

In the 80s and 90s we saw the beginning of the personal computer era that started with Mac
computers from Apple (Macintosh, 1984) and IBM computers from IBM (or IBM compatible
computers from other vendors) with MS-DOS and later Windows installed (Figure 2-1).


Figure 2-1: The Beginning of Personal Computing

27
28 2 Software History

World Wide Web (WWW) was established in 1991. The first Web Browser, as we know it today,
came in 1994 (Netscape). Google was established as late as 1998. Facebook was first invented in
2004. The first smartphone was released in 2007 (iPhone).

In Figure 2-2 we see some of the people that have founded and shaped the modern software
industry.


Figure 2-2: Pioneers of modern Software Industry

The companies that they created still dominate the software industry today. Some of the people
are still active within these companies today, either as CEOs or members of the board.

Some of the larges software companies today are:

• Microsoft (established 1975), Bill Gates, Paul Allen

• MS DOS (1981), Office, Windows (1985), …

• Employees (2012): 94.000, Revenue (2012): $74 bill.

• Apple (Software and Hardware) (established 1976), Steve Jobs, Steve Wozniak

• Macintosh (1984), iPhone (1097), iPad (2012), iOS

• Employees (2012): 72.800, Revenue (2012): $158 bill.

• Google (established 1986), Larry Page, Sergey Brin

• Facebook (established 2004), Mark Zuckerberg

Part 1: Introduction
29 2 Software History

• More than 1 bill. users

In addition, we can mention companies like IBM, Oracle, Samsung (more hardware than software),
Amazon, SAP, Adobe, Symantec, VMware, etc.

2.2 Software Trends


The software industry has changed a lot since the 80s, and it is still changing very quickely. Figure
2-3 gives an overview of some important trends in the software industry today and tomorrow.


Figure 2-3: Software Trends

Apps and Mobil devices: Everybody have a mobile device today and fewer PCs are sold than ever
before. Licensing: You don’t buy, but lease software these days and all your information is stored
in the Cloud, and some software is actually running in the Cloud (Cloud Computing). The security
challenges is very important in this case.

The companies that develop software needs to face these facts and make the necessary changes
in order to survive.

“Softwear” and Wearable Computing: Now we have watches like Galaxy Gear, the Apple Watch,
Google Glass, etc.

Part 1: Introduction
30 2 Software History

In Figure 2-4 wee see some examples of Software Trends.


Figure 2-4: Software Trends Examples

Part 1: Introduction

3 Software Development
In this chapter we will give a short overview of software development, the challenges and what
kind of different software categories we have, what kind of documents that are needed and
created during the software development process, what kind of skills needed, etc.

Software Development (also known as application development, software design, designing


software, software application development, enterprise application development, or platform
development) is the development of a software product.

Software Engineering (SE) is the application of a systematic, disciplined, quantifiable approach to


the development, operation, and maintenance of software.

In Figure 3-1 we see how a software application typically interacts with users, the underlying
operating system and hardware.


Figure 3-1: Software Interaction with Hardware and Users

31
32 3 Software Development

3.1 Challenges
In Figure 3-2 we see some of the challenges in software development.

2"

Figure 3-2: Challenges with Software Development

Collaboration and communication within the team and with stakeholders, etc. is crucial when it
comes to creating good software.

Creating software is complicated. It is important to understand the customers needs! In some way
you need to find out what the customer needs.

Market research, etc. is a good start, but in the end you need to go much deeper to understand
the customer. Most of the time the customer doesn’t even know what they need.

3.2 Software Systems


In software development we have different kinds of systems, such as [1]:

• Stand-alone applications

Part 1: Introduction
33 3 Software Development

– These are application systems that run on a local computer, such as a PC. They
include all necessary functionality and do not need to be connected to a network.

• Interactive transaction-based applications

– Applications that execute on a remote computer and are accessed by users from
their own PCs or terminals. These include web applications such as e-commerce
applications.

• Embedded control systems

– These are software control systems that control and manage hardware devices.
Numerically, there are probably more embedded systems than any other type of
system.

• Batch processing systems

– These are business systems that are designed to process data in large batches. They
process large numbers of individual inputs to create corresponding outputs.

• Entertainment systems

– These are systems that are primarily for personal use and which are intended to
entertain the user.

• Systems for modeling and simulation

– These are systems that are developed by scientists and engineers to model physical
processes or situations, which include many, separate, interacting objects.

• Data collection systems

– These are systems that collect data from their environment using a set of sensors
and send that data to other systems for processing.

• Systems of systems

– These are systems that are composed of a number of other software systems.

We can split the software systems in 2 main categories:

Generic products

• Stand-alone systems that are marketed and sold to any customer who wishes to buy them.

• Examples – PC software such as graphics programs, project management tools; CAD


software; software for specific markets such as appointments systems for dentists.

Examples: Microsoft Office

Part 1: Introduction
34 3 Software Development

Customized products

• Software that is commissioned by a specific customer to meet their own needs.

• Examples – embedded control systems, air traffic control software, traffic monitoring
systems.

3.3 Documentation
Lots of documentation is involved in software development, see Figure 3-3. In this document we
will go through all the documentation needed in the different phases involved in software
development.

Some important documents are:

• SRS – Software Requirements Specifications

o A document stating what an application must accomplish

• SDD – Software Design Document

o A document describing the design of a software application

• STP - Software Test Plan

o Documentation stating what parts of an application will be tested, and the schedule
of when the testing is to be performed

• STD - Software Test Documentation

o Contents: Introduction, Test Plan, Test Design, Test Cases, Test procedures, Test
Log, …, Summary

More about Software Documentation later in this document.

Part 1: Introduction
35 3 Software Development


Figure 3-3: Typical Documentation involved in Software Development

QA – Quality Assurance. Quality Assurance (QA) refers to the engineering activities implemented
in a quality system so that requirements for a product or service will be fulfilled.

3.4 Iterations and Releases


In Software Development we typically have different iterations and releases, as shown in Figure
3-4.

Part 1: Introduction
36 3 Software Development


Figure 3-4: Software Iterations and Releases

Part 1: Introduction

Part 2 : Software
Engineering
In this part we introduce the different features and topics involved in software engineering, such
as software teams, software development processes, software project management, etc.

37

4 Development Teams
A typical Software Team consists of the following roles:

• Project Manager
• System Architect
• UX Designer (Software Designer)
• Programmer
• Software Tester

In addition, we have the Stakeholders or Customers that play an important role in the
development.

In Figure 4-1 we see a typical Software Team.


Figure 4-1: Software Team

A System Engineer is a general person that could be a Programmer, Architect, Designer, Tester in
different phases in the project, or he could be a tester in one project and a programmer in another
project – all in one person. That is usually the case in small companies, while in larger companies
these roles (designer, tester, programmer) could be a full-time job.

38
39 4 Development Teams

4.1 Teams
In order to create successfully software, collaboration inside the team is essential.


Figure 4-2: Team Collaboration

It is important that the team collaborate. Communication as well!

4.2 Roles
A typical Software Team consists of the following roles:

• Project Manager
• System Architect
• UX Designer (Software Designer)
• Programmer
• Software Tester

Part 2: Software Engineering


40 4 Development Teams

In addition, we have the Stakeholders or Customers that play an important role in the
development.

We will discuss these roles in more detail below.

4.2.1 Stakeholders
All the people that has an interest in the outcome of the software are called Stakeholders. In most
cases the Stakeholders are referred to as “Customers” but others may also be referred to as
stakeholders, such as management, shareholders, etc.

4.2.2 Project Manager


The Project Managers have the responsibility of the planning, execution and closing of the project.

More about Project management in a later chapter.

4.2.3 System Architect


With “Technical Design” we mean the Platform and Architecture Design, i.e., how to build the
software.

This is typically done by a so-called Software/System Architect.

4.2.4 UX Designer
UX Design is the Design of the User eXperience (UX) and the Graphical User Interface (GUI),
sometimes also called Human Machine Interface (HMI). This is what the end user of the software
see.

This is typically done by a so-called UX Designer.

4.2.5 Programmer
The Programmer or the Developer is doing the actual implementation of the software, i.e., the
coding.

4.2.6 Software Tester


Before the customer can start using the software it needs to be properly tested. The
Developer/Programmer needs to test his software, but since software consists of several software

Part 2: Software Engineering


41 4 Development Teams

modules and components created by different developers, we need dedicated software testers
that can test the software on a higher level.

The Customers are/should also be involved in the testing as well.

Part 2: Software Engineering


5 Software Development
Phases
In software development we have the following phases:

• Requirements (e.g., from Customer)


• Analysis and Design
• Implementation, Coding
• Documentation
• Testing
• Deployment, Installation and Maintenance

This chapter gives an introduction to these phases. Figure 5-1 shows an overview of the different
phases involved in Software Development:


Figure 5-1: Phases in Software Development

42
43 5 Software Development Phases

5.1 Requirements
In the requirements we describe what the system should do. The requirements include both
functional requirements and non-functional requirements [1].

Functional Requirements: Statements of services the system should provide, how the system
should react to particular inputs and how the system should behave in particular situations. May
state what the system should not do.

Non-Functional Requirements: Constraints on the services or functions offered by the system


such as timing constraints, constraints on the development process, standards, etc. Often apply to
the system as a whole rather than individual features or services.


The requirements are often collected in a so-called “Software Requirements Specification (SRS)”
document.

The SRS could contain stuff like [2]:

• Introduction
o Purpose
o Definitions
o System overview
o References
• Overall description
o Product perspective
§ System Interfaces
§ User Interfaces
§ Hardware interfaces
§ Software interfaces
§ Communication Interfaces
§ Memory Constraints

Part 2: Software Engineering


44 5 Software Development Phases

§ Operations
§ Site Adaptation Requirements
o Product functions
o User characteristics
o Constraints, assumptions and dependencies
• Specific requirements
o External interface requirements
o Functional requirements
o Performance requirements
o Design constraints
§ Standards Compliance
o Logical database requirement
o Software System attributes
§ Reliability
§ Availability
§ Security
§ Maintainability
§ Portability

• Other requirements

The Requirements is normally given by the Customer if we deal with customized products. The
software requirements document is the official statement of what is required of the system. It
should include both a definition of user requirements and a specification of the system
requirements. It is NOT a design document. As far as possible, it should include a set of WHAT the
system should do rather than HOW it should do it [1].

5.2 Design
In the design phase we use the specification and transform it into descriptions of how we should
do it.

In principle, requirements should state what the system should do and the design should describe
how it does this – but in practice this is not so easy! - In practice, requirements and design are
inseparable.

We can divide design into 2 main groups:

• Technical Design – Platform and Architecture Design, i.e., how to build the software.
• UX Design – Design of User eXperience (UX) and the Graphical User Interface (GUI),
sometimes also called Human Machine Interface (HMI). This is what the end user of the
software see.

Part 2: Software Engineering


45 5 Software Development Phases

5.2.1 Technical Design


Technical Design is the Platform and Architecture Design, i.e., how to build the software.

This is typically done by a so-called Software Architect.

5.2.2 UX Design
UX Design is the Design of the User eXperience (UX) and the Graphical User Interface (GUI),
sometimes also called Human Machine Interface (HMI). This is what the end user of the software
see.

This is typically done by a so-called UX Designer.

5.3 Implementation
Implementation = Coding.

Software is usually designed and created (coded/written/programmed) in integrated development


environments (IDE) like Eclipse, Xcode or Microsoft Visual Studio that can simplify the process and
compile the program to an executable unit. Software is usually created on top of existing software
and the application programming interface (API) that the underlying software frameworks
provide, e.g. Microsoft .NET, etc.

Most of the software has a Graphical User Interface (GUI). Normally you separate the GUI design
and code in different layers or files.

Part 2: Software Engineering


46 5 Software Development Phases

More about implementation later in this document.

5.4 Testing
Testing can be performed on different levels and by different persons. Testing is a very important
part of software development. About 50% of the software development is about testing your
software.

Creating User-friendly Software is Crucial!

More about Testing later in this document.

5.5 Deployment
What is Deployment?

Software deployment is all of the activities that make a software system available for use.

Examples:

• Get the software out to the customers

• Creating Installation Packages

• Documentation, e.g., Installation Guide, etc.

• Installation

• etc.

Deployment strategies may vary depending of what kind of software we create, etc.

More about Deployment later in this document.

When the software is deployed or installed, you normally goes into a Maintenance phase. The
maintenance of software involves bug fixes of the software after the software is released, etc. At
some time you also need to start planning new releases of the software.

Part 2: Software Engineering


6 Software Development
Process
There are lots of different software development processes or methods in use today [3], e.g.:

• Waterfall model
• V-model
• Spiral model
• Unified Process (UP)/ Rational Unified Process (RUP)
• Scrum
• eXtreme Programming (XP)
• Lean Software Development
• TDD (Test Driven Development)
• Lean Software Development
• Kanban
• etc.

These processes or models may be divided in 2 main categories; Plan-driven models and Agile
methods. The Waterfall model, V-model and the Spiral model is so-called plan-driven models,
while Scrum and eXtreme Programming are so-called Agile methods.

47
48 6 Software Development Process

Traditionally plan-driven methods where used in software development, while today Agile
methods such as Scrum have become very popular, especially in smaller development teams.

Plan-driven models (e.g., Waterfall) generally produce more documentation than Agile models.

In Figure 6-1 we see an overview of some of the most used methods.


Figure 6-1: Software Development Methods

In Figure 6-2 we see the main difference between Agile development and ordinary plan-driven
development.

Plan-based development

Requirements Requirements Design and


engineering specification implementation

Requirements change
requests

Agile development

Requirements Design and


engineering implementation


Figure 6-2: Plan-driven vs. Agile Development [1]

Part 2: Software Engineering


49 6 Software Development Process

6.1 Plan-driven models


We have different plan-driven models such as the Waterfall model, V-model, Spiral model which
we will discuss in more details.

6.1.1 Waterfall model


The Waterfall model [4] consists of the following phases:

• Requirements specification (Requirements analysis)


• Software design
• Implementation and Integration
• Testing (or Validation)
• Deployment (or Installation)
• Maintenance

Traditionally with the Waterfall model, you can only start on the next phase when the previous
phase is finished. This is why it is called the Waterfall method, see Figure 6-3.

Part 2: Software Engineering


50 6 Software Development Process


Figure 6-3: Waterfall model [4]

In practice there is impossible to create perfect requirements and design before you start
implementing the code, so it is common to go back and update these phases iteratively.

6.1.2 V-model
The V-model [5] is derived from the more traditional Waterfall model.

The V-model is an extension of the waterfall model, but its using a more flexible approach.

“The V-Model reflects a project management view of software development and fits the needs of
project managers, accountants and lawyers rather than software developers or users.”

Part 2: Software Engineering


51 6 Software Development Process


Figure 6-4: V-model [5]

As we see in Figure 6-4, the left side is about requirements and design, while the right-side of the
model is about testing and validating.

6.2 Agile Software Development


Agile software development is a group of software development methods based on iterative and
incremental development.


So what is Agile development? – Here is a short summary:

• A group of software development methods


• Iterative approach
• Incremental: Software available to Customers every 2-4 weeks
• Self-organizing and cross-functional Teams
• Refactoring

Part 2: Software Engineering


52 6 Software Development Process

In Figure 6-5 we see some important Agile features and principles.


Figure 6-5: Agile Features and Principles

Examples of popular Agile methods:

• Scrum
• eXtreme Programming (XP)

In Figure 6-6 we see the key features with Agile Software Development.


Figure 6-6: Agile Software Development

Figure 6-7 shows some main differences between Agile development and more traditional
development methods, such as, e.g., the Waterfall method.

Part 2: Software Engineering


53 6 Software Development Process


Figure 6-7: Agile vs. Traditional Development [6]

The Manifesto for Agile Software Development:

In 2001, some software developers met to discuss development methods. They published the
Manifesto for Agile Software Development to define the approach now known as agile software
development.

The Manifesto for Agile Software Development is as follows [7]:

We are uncovering better ways of developing
software by doing it and helping others do


it.
Through this work we have come to value:

• Individuals and interactions over processes and tools


• Working software over comprehensive documentation
• Customer collaboration over contract negotiation
• Responding to change over following a plan

That is, while there is value in the items on
the right, we value the items on the left more.

Part 2: Software Engineering


54 6 Software Development Process


Burndown Chart:

A burn down chart is a graphical representation of work left to do versus time. The outstanding
work (or backlog) is often on the vertical axis, with time along the horizontal. That is, it is a run
chart of outstanding work. It is useful for predicting when all of the work will be completed.

It is often used in agile software development methodologies such as Scrum. However, burn down
charts can be applied to any project containing measurable progress over time.

In Figure 6-8 we see a typical Burndown chart.

Part 2: Software Engineering


55 6 Software Development Process


Figure 6-8: Burndown Chart

6.2.1 Waterfall vs. Agile


Agile is more flexible than traditional methods (like the waterfall).

Here are some key factors that separates the traditional waterfall method versus the more flexible
Agile methods, such as Scrum:

• Agile and Scrum is based on Iterations while Waterfall is Sequential


• Agile and Scrum focus on less documentation
• Agile is good for small projects – not so good for larger projects?
• If the Customer don’t know what he wants in detail – Scrum is a good approach

In Figure 6-9 wee see some important differences between the traditional waterfall method and
the Agile Development approach. We see that Agile delivers value in each iteration of the
development.

Part 2: Software Engineering


56 6 Software Development Process


Figure 6-9: Waterfall vs. Agile Development

6.2.2 eXtreme Programming (XP)


eXtreme Programming or shorted XP is a popular Agile method. Typical features in XP are as
follows:

• Pair Programming
• Code Reviews
• Refactoring
• Unit Testing - In XP you start by writing Unit Tests before you start coding
• Standup Meetings


In Figure 6-10 we see how XP works in practice.

Part 2: Software Engineering


57 6 Software Development Process


Figure 6-10: eXtreme Programming

In XP they practice so-called “Pair Programming” (Figure 6-11), meaning 2 developers working
together.


Figure 6-11: Pair Programming [8]

So is Pair Programming Good or Bad? There exists various studies of the productivity of Pair
Programming [1]:

• Study 1: Comparable with that of 2 developers work independently


• Study 2: A significant loss in productivity compared with 2 developers working alone

A reasonable question is: Should the 2 developers have the same skills or not?

Newer less, there are benefits with XP:

• Collective Ownership for the code created and the results of the project.

Part 2: Software Engineering


58 6 Software Development Process

• Continuous informal Review process because each code line is looked at by at least 2
people
• It supports Refactoring, which is a continuous process of software improvement
• Less time is spent on repairing bugs.
• Improved Code Quality
• It reduces the overall risk

6.2.3 Scrum
Scrum [9] is a so-called Agile method, and it has become very popular today. In Figure 6-12 we see
an overview of the Scrum method.

Scrum is fairly simple and easy to understand. The method is more flexible and more informal than
plan-driven methods.

Part 2: Software Engineering


59 6 Software Development Process


Figure 6-12: Scrum Overview

In short, Scrum is a Framework for Software Development.

• Agile Software Development method


• Simple to understand
• Flexible
• Extremely difficult to master!
• Self-organizing Teams (3-9 persons)
• Scrum Team:
o Product Owner
o Scrum Master
o Development Team

Some important Scrum Events are:

• The Sprint (duration between 14-30 days)

• Sprint Planning Meeting (8 hours if 30 days sprint)

• Daily Scrum Meeting (Max 15 min, every day at the same time) (also called Standup
Meeting)

• Sprint Review (4 hours if 30 days sprint)

An example of a Daily Scrum Meeting is shown in Figure 6-13. It is normal to held this meeting as a
“standup meeting”, where participants actually standing during the meeting.

Part 2: Software Engineering


60 6 Software Development Process


Figure 6-13: Daily Scrum Meeting (Standup Meeting) [9]

Daily Scrum Meeting:

Important features with the Daily Scrum Meeting are as follows:

• Max 15 min.

• The meeting is held at the same time and place every day

• “Stand Up” Meeting

• Purpose:

– Synchronize activities and create a plan for next 24 hours.

– Track Progress

• Agenda – Each Team member explains:

– What has been accomplished since last meeting?

– What will be done before the next meeting?

– What obstacles are in the way?

6.2.4 Kanban

Part 2: Software Engineering


61 6 Software Development Process

Kanban is based on Lean and Toyota production principles and Just-in-Time principles. Kanban
has fewer “rules” than scrum. Kanban is flow-based, while Scrum is Time box-based (Sprints).
Kanban focus on limit the WIP (Work in Progress). Kanban has focus on estimation.

In Kanban they use a Kanban board (Figure 6-14) in order to track the progress. The Kanban board
is very similar to the Task board used in Scrum.


Figure 6-14: Kanban board

6.3 Hybrid Process Models

6.3.1 Unified Process (UP)/ Rational Unified Process


(RUP)
The Unified Process (UP)/ Rational Unified Process (RUP) is a so-called hybrid process model [1]. It
takes elements from many of the traditional plan drive methods as well iterative/incremental
delivery, which is an important part of Agile methods.

The RUP has been designed to work together with UML (Unified Modelling Language).

In UP we have 4 different phases [10]:

• Inception
• Elaboration

Part 2: Software Engineering


62 6 Software Development Process

• Construction
• Transition

Figure 6-15 shows these 4 phases.


Figure 6-15: Phases in Unified Process (UP) [10]

6.4 Summary
Agile methods have become very popular today. Agile methods are good in some situations, while
more traditional methods are better in other situations.

To create great software, we need to combine the best of all these approaches, and adjust them
to fit the needs of your company. There are lots of different kinds of software, and one method is
not fit to solve all these different situations.

Agile methods have less focus on documentation

6.5 Exercises

1. What is a Software Development Process? Why is it important to have a good Software


Development Process?

2. Explain Plan-driven software development in general

3. Give some examples of such Plan-driven software development methods

4. Explain Agile software development in general

Part 2: Software Engineering


63 6 Software Development Process

5. Give some examples of Agile software development methods

6. Explain the Waterfall method

7. Explain the differences between Agile and plan-driven development. Give some examples in
each category

8. Explain some features used in eXtreme Programming (XP)?

9. What is Scrum?

10. Give examples of Advantages and Disadvantages with Scrum

11. What is a Daily Scrum Meeting?

12. What is the different phases involved in software engineering?

13. Suggest a Software Project where it may be beneficial to use the Waterfall model and another
where Scrum is the best choice

Part 2: Software Engineering


7 Scrum
Scrum [9] is a so-called Agile method, and it has become very popular today. In Figure 7-1 we see
an overview of the Scrum method.

Scrum is fairly simple and easy to understand. The method is more flexible and more informal than
plan-driven methods.


Figure 7-1: Scrum Overview

In short, Scrum is a Framework for Software Development.

• Agile Software Development method


• Simple to understand
• Flexible
• Extremely difficult to master!
• Self-organizing Teams (3-9 persons)
• Scrum Team:
o Product Owner
o Scrum Master
o Development Team

7.1 The Scrum Process


Figure 7-2 shows the Scrum Process.

64
65 7 Scrum


Figure 7-2: Scrum Process [9]

7.2 Scrum Events


• The Sprint (duration between 14-30 days)

• Sprint Planning Meeting (8 hours if 30 days’ sprint)

• Daily Scrum Meeting (Max 15 min, every day at the same time) (also called Standup
Meeting)

• Sprint Review (4 hours if 30 days’ sprint)

An example of a Daily Scrum Meeting is shown in Figure 7-3. It is normal to held this meeting as a
“standup meeting”, where participants actually standing during the meeting.

Part 2: Software Engineering


66 7 Scrum


Figure 7-3: Daily Scrum Meeting (Standup Meeting) [9]

7.2.1 Daily Scrum Meeting


Important features with the Daily Scrum Meeting are as follows:

• Max 15 min.

• The meeting is held at the same time and place every day

• “Stand Up” Meeting

• Purpose:

– Synchronize activities and create a plan for next 24 hours.

– Track Progress

• Agenda – Each Team member explains:

– What has been accomplished since last meeting?

– What will be done before the next meeting?

– What obstacles are in the way?

Part 2: Software Engineering


67 7 Scrum

7.3 Scrum Artifacts


• Product Backlog

• Sprint Backlog

• Increment

Scrum’s artifacts represent work or value in various ways that are useful in providing transparency and
opportunities for inspection and adaptation. Artifacts defined by Scrum are specifically designed to
maximize transparency of key information needed to ensure Scrum Teams are successful in delivering a
“Done” Increment [11].

7.4 The Scrum Team


The Scrum Team have the following members:

• Product Owner

• Scrum Master

• Development Team

In addition, we have the Stakeholders, but they are not part of the Scrum team itself.

Part 2: Software Engineering


68 7 Scrum

7.5 Scrum Meetings


So if we summarize, we have 4 different meetings in Scrum:

• Sprint Planning Meeting


• Daily Scrum Meeting
• Sprint Review Meeting
• Retrospective Meeting

Figure 7-4 summarizes the different meetings (purpose, duration and frequency).


Figure 7-4: Scrum Meetings

For Scrum meetings we have the following guidelines:

Part 2: Software Engineering


69 7 Scrum

• The meeting agenda should be clear.


• If team members start a discussion that does not address the purpose of the meeting, the
members should take the discussion offline, to be completed later. The Scrum Master
should identify and indicate when team members should take a discussion offline.
• All meetings should follow the basic structure that is described for that meeting.
• Meetings should start on time, even if some team members are late.
• Team members should be on time except in rare, unavoidable cases. If your schedule
prevents you from being on time regularly, the conflict should be resolved as soon as
possible. If necessary, the Scrum Master should adjust the meeting time to resolve the
conflict if the change does not unfairly inconvenience another member of the team.
• Each team member should come to the meeting prepared.
• Meetings should finish on time. In most cases, the length of the meeting is determined by
the length of the sprint. For example, take two hours for a sprint planning meeting if the
sprint is one week long and four hours if the sprint is two weeks long.
• Scrum enforces this meeting structure to a level that might make people uncomfortable.
This reaction comes from the pressure to be on time, the peer accountability that is
associated with making and keeping commitments, and the transparency that is required
to actively participate. Daily Scrum meeting are also usually a standup meeting.

7.6 Scrum Terms


Below we summarize the terms used in Scrum.

Scrum:

Scrum is a framework structured to support complex product development. Scrum consists of


Scrum Teams and their associated roles, events, artifacts, and rules. Each component within the
framework serves a specific purpose and is essential to Scrum’s success and usage.

The Scrum Team:

The Scrum Team consists of a Product Owner, the Development Team, and a Scrum Master. Scrum
Teams are self-organizing and cross-functional. Self-organizing teams choose how best to
accomplish their work, rather than being directed by others outside the team.

Development Team:

The Development Team are the professionals who do the work of delivering a potentially
releasable Increment of “Done” product at the end of each Sprint. Development Teams are
structured and empowered by the organization to organize and manage their own work.

Product Owner:

Part 2: Software Engineering


70 7 Scrum

The Product Owner is the person responsible for maximizing the value of the product, the work of
the Development Team, and management of the Product Backlog.

Scrum Master:

The Scrum Master is a servant-leader for the Scrum Team responsible for ensuring Scrum is
understood and enacted. Scrum Masters do this by ensuring that the Scrum Team adheres to
Scrum theory, practices, and rules.

Product Backlog:

The Product Backlog is an ordered list of everything that might be needed in the product and is the
single source of requirements for any changes to be made to the product. The Product Owner is
responsible for the Product Backlog, including its content, availability, and ordering.

Sprint Backlog:

The Sprint Backlog is the set of Product Backlog items selected for the Sprint plus a plan for
delivering the product Increment and realizing the Sprint Goal. The Sprint Backlog is a forecast by
the Development Team about what functionality will be in the next Increment and the work
needed to deliver that functionality.

Increment:

The Increment is the sum of all the Product Backlog items completed during a Sprint and all
previous Sprints.

Sprint:

The heart of Scrum is a Sprint, a time-box of one month or less during which a “Done”, useable,
and potentially releasable product Increment is created. Sprints have consistent durations
throughout a development effort. A new Sprint starts immediately after the conclusion of the
previous Sprint.

Sprint Planning Meeting:

The work to be performed in the Sprint is planned at the Sprint Planning Meeting. This plan is
created by the collaborative work of the entire Scrum Team.

Daily Scrum:

The Daily Scrum is a 15-minute time-boxed event for the Development Team to synchronize
activities and create a plan for the next 24 hours. This is done by inspecting the work since the last
Daily Scrum and forecasting the work that could be done before the next one.

Sprint Review:

Part 2: Software Engineering


71 7 Scrum

A Sprint Review is held at the end of the Sprint to inspect the Increment and adapt the Product
Backlog if needed. During the Sprint Review, the Scrum Team and stakeholders collaborate about
what was done in the Sprint. Based on that and any changes to the Product Backlog during the
Sprint, attendees collaborate on the next things that could be done. This is an informal meeting,
and the presentation of the Increment is intended to elicit feedback and foster collaboration.

Sprint Retrospective:

The Sprint Retrospective is an opportunity for the Scrum Team to inspect itself and create a plan
for improvements to be enacted during the next Sprint. The Sprint Retrospective occurs after the
Sprint Review and prior to the next Sprint Planning Meeting. This is a three-hour time-boxed
meeting for one-month Sprints. Proportionately less time is allocated for shorter Sprints.

7.7 Tips and Tricks


Here are some Tips and Tricks when performing Agile/Scrum:

• Bring the Customer to the Daily Scrum Meetings

• Check out Pair Programming

• Use a Task Board (Whiteboard with Sticky Notes)

• Write Tests before you Write Code

• Continuously Integrate Changes and have Code Reviews and do continuous Code
Refactoring

• Prioritize the Product Backlog

• Have Demonstrations for the Customer during the Project

• Be sure to have a common understanding of Goals, Problems and Solutions

Part 2: Software Engineering


8 Project Management
Project management is the key factor in any software development projects. Project management
is the discipline of planning, organizing, motivating, and controlling resources to achieve specific
goals.

In Figure 8-1 we see the well known project triangle.


Figure 8-1: Project Triangle

Here are some Key factors for successful project management:

• Proper Planning
• Kick-off and Brainstorming
• Planning and Estimation
• Project Tracking
• Communication and Collaboration
• Meetings
• Using proper Tools, such as e.g., TFS

72
73 8 Project Management

8.1 Project Planning


Software development involves lots of activities that need to be planned and synchronized. In
order to do that we need good tools for these activities. The Gantt chart is probably the most used
tool. In addition, we need to have different meetings in order to plan and coordinate the different
activities.

Agile Development needs also some kind of Project Management and Planning, which we will
discuss in more detail later in this chapter.

8.2 Kick-off/Brainstorming
A Project should always start with a Kick-off meeting where a brainstorming session is important
of that meeting.

During the Brainstorming you should:

• Involve all in the group

• Discuss what you are going to do in the project

Part 2: Software Engineering


74 8 Project Management

• How are you going to solve the project?

• etc.

In addition to get good ideas for solving the project, you should learn from previous projects.

Examples: Who are going to solve the different parts, what kind of Frameworks are you going to
use, what kind of development tools shall you use, etc.

8.3 Software Development Plan (SDP)


Communication is the key to success! Below we list some examples how to avoid Communication
Problems [12]:

Part 2: Software Engineering


75 8 Project Management

• Listen to all with concentration


• Don’t pre-judge
• Give all team members a turn
• See the value in every idea
• Don’t make assumptions
• Ask questions to clarify
• When in doubt, communicate

A good idea is to create a Software Development Plan. The Software Development Plan gives an
overview of all the communication within the project or within the team, i.e., what kind of
communication, how the communication should be done, etc.

Examples of Communication:

• Meetings: The Team will meet every Monday from …


• Standards: Which Word processor, Templates, etc.
• E-mail… or other communication platforms, …
• Collaboration: How will you communicate? Work together on Tuesdays, …
• Other Tools: Microsoft Project, …
• etc.

The Software Development Plan typically includes the following sections:

1. Introduction: This briefly describes the objectives of the project and set out the constraints
(e.g., budget, time, etc.) that affects the management of the project

2. Project Organization: This section describes how the development team is organized, the
people involved and their roles in the team.

3. Risk Analysis

4. Hardware and Software Resource Requirements

5. Work Breakdown (WBS, Work Breakdown Structure): Break down the project in into
activities and identifies milestones

6. Project Schedule: Shows dependencies between activities, the estimated time required to
reach each milestone, allocation of people to activities. (5) and (6) is typically done in a
Gantt Chart (created in e.g. Microsoft Project)

7. Monitoring and Reporting Mechanisms: Definition of the Management Report that should
be produced, when these should be produced, etc.

Other words for the Software Development Plan may be “Communication Plan” or “Project Plan”.

Part 2: Software Engineering


76 8 Project Management

A Software Development Plan (SDP) is all about the Internal Communication within the
Development Team and how it Communicates with rest of the Organization, the Customers, etc.

8.3.1 Gantt Chart


One of the most used tool for project planning is the Gantt chart. The Gantt chart gives an
overview of tasks, subtasks, milestones, resources, etc. in a project.

In Figure 8-2 we se a Gant Chart example created with Microsoft Project.


Figure 8-2: Gant Chart Example – Microsoft Project

It is important that the Project Management is an active part of your software project. The Gantt
Chart should be used through the whole project, it is not something you create in the beginning of
the project and put in a drawer.

In Figure 8-3 we see the recommended way of working with the different project activities.

Part 2: Software Engineering


77 8 Project Management


Figure 8-3: Project Work

Always create a Project Plan!

8.4 Meetings
It is necessary to have meetings when planning and creating software, but these meetings should
not be misused.

Below we list some typical meeting needed during the software development project:

• Kickoff and Planning Meetings


• Project Meetings
• Daily Scrum Meetings
• Review Meetings
• Meetings for Planning next Sprint/Iteration

For meetings in general we have the following guidelines:

• The meeting agenda should be clear.


• All meetings should follow the basic structure that is described for that meeting.
• Meetings should start on time, even if some team members are late.
• Meetings should finish on time.
• Each team member should come to the meeting prepared.

Part 2: Software Engineering


78 8 Project Management

Always be prepared before the meetings (otherwise you don’t need to be there)!

8.4.1 Meeting Agenda


A typical meeting agenda could be as follows:

• Project Plan, Gantt Chart (Project Manager)

• Work Items, Overview and Status (Test Manager)

• Demonstration of Applications/Coding (Individual)

• Short Status for each member (Individual)

o What have you done so far?

o What shall be your main focus the next weeks?

o Any Technical Challenges/Problems/Issues? (It is very important to get an overview


of the challenges in the project, or else the whole project will be at risk if you don’t
tell about them!)

o Other matters

• The meeting should last no longer than 60 minutes.

When you are finished with the meeting, write a short Minutes of Meeting as soon as possible.

8.4.2 Minutes of Meeting


Write a “Minutes of Meeting” (send on e-mail to team members and supervisor the same day!).
The purpose of this is twofold:

• Important decisions or agreements are recorded, so they are not forgotten!


• The second purpose is to record unsolved issues that require follow up action, so-called
action items. Each action item is assigned to one (preferred) or more team members with a
specific deadline for completion.

Always create a Minutes of Meeting!

The Minutes of Meetings should include a table like this:

Task Responsible Deadline

… … …

… … …

Part 2: Software Engineering


79 8 Project Management

In this way we can easily get an overview of the tasks agreed in the meeting, which is responsible
for the tasks, and a specific deadline for each task. This task list should be followed up in the next
meeting.

8.5 Agile Project Planning and Tracking


Successful projects often have the following characteristics:

• The needs of the customers drive the project.


• The team creates a high-level plan for delivering the project.
• The team develops the product over several iterations and refines the high-level plan over
time.
• The team has effective tools for adapting to changes that occur.

Figure 8-4 shows the steps involved in Agile Project Planning and Tracking.


Figure 8-4: Agile Project Planning and Tracking

In Agile Project Planning and Tracking, everything is broken down to so-called iterations, as shown
in Figure 8-5.

Part 2: Software Engineering


80 8 Project Management


Figure 8-5: Using Iterations in Agile Project Planning and Tracking

The Task board is a key tool in Agile Project Planning and Tracking, see Figure 8-6


Figure 8-6: Task board used in Agile Software development

The Task board is used together with the Burndown chart, as shown in Figure 8-7.

Part 2: Software Engineering


81 8 Project Management


Figure 8-7: Burndown Chart

A burn down chart is a graphical representation of work left to do versus time. The outstanding
work (or backlog) is often on the vertical axis, with time along the horizontal. That is, it is a run
chart of outstanding work. It is useful for predicting when all of the work will be completed.

It is often used in agile software development methodologies such as Scrum. However, burn down
charts can be applied to any project containing measurable progress over time.

Team Foundation Server (TFS) have all these features (Task board, Burndown chart, etc.) built-in.

TFS is explained in detail in a later chapter.

8.6 Summary
Here is some important keywords for successful project management:

• Software Project Management is important in order to keep the project on track

• Agile Project Management = less documentation

• Useful tools are in Project Management and Tracking are: Gantt Chart, Task board,
Burndown Chart

• You should always create a Communication Plan

Part 2: Software Engineering


82 8 Project Management

• You should always start the project with a Brainstorming session.

Part 2: Software Engineering


9 Requirements Engineering
Before you start to implement a software system, you need to understand what the system is
intended to do. This intended functionality is the “Requirements”. The process of creating these
requirements is called Requirement Analysis or Requirement Engineering. It is the process of
understanding what you want and what you need in your software.

Requirements engineering (RE) refers to the process of formulating, documenting and maintaining
software requirements.

The results of the Requirement Analysis or Requirement Engineering process is normally one or
more documents, called the Software Requirement Specification (shorted “SRS”).

The requirements are in some cases created by the customer, at least the overall requirements (it
defines “What” the customers want), while more details are normally created by architects and
developers in the software company that is going to develop the actual software. Here we can
have both “What“ and “How” the software shall be designed or implemented.

The main challenges in Requirements Engineering is that the customers most often don’t know
what they want or are not qualified to know what they need.

In general, we can summarize the following:

• Stakeholders don’t know what they really want.


• Stakeholders express requirements in their own terms.
• Different stakeholders may have conflicting requirements.
• Organizational and political factors may influence the system requirements.
• The requirements change during the analysis process. New stakeholders may emerge and
the business environment may change.

In Figure 9-1 we see different types of requirements.


Figure 9-1: Software Requirements

83
84 9 Requirements Engineering

In Figure 9-2 and below we explain the different software requirements categories in more detail.


Figure 9-2: Software Requirements Categories Overview

User Requirements

Statements in natural language plus diagrams of the services the system provides and its
operational constraints. Written for customers.

System Requirements

A structured document setting out detailed descriptions of the system’s functions, services and
operational constraints. Defines what should be implemented so may be part of a contract
between client and contractor.

Client managers
System end-users
User
Client engineers
requirements
Contractor managers
System architects

System end-users
System Client engineers
requirements System architects
Software developers

Figure 9-3: Requirements Users [1]

Functional Requirements

Statements of services the system should provide, how the system should react to particular
inputs and how the system should behave in particular situations.

Part 2: Software Engineering


85 9 Requirements Engineering

May state what the system should not do.

Non-Functional Requirements

Constraints on the services or functions offered by the system such as timing constraints,
constraints on the development process, standards, etc.

Often apply to the system as a whole rather than individual features or services.

Since there are different people involved creating and reading the requirements documents, the
requirements are normally split into “High-Level Requirements” and “Detailed Requirements”
(Figure 9-4).


Figure 9-4: High-Level Requirements vs. Detailed Requirements

High-Level Requirements requirements are for “business” people, while Detailed Requirements
are for developers, etc.

9.1 User Requirements


User Requirements are statements in natural language plus diagrams of the services the system
provides and its operational constraints. User Requirements are written for customers.

9.2 System Requirements


System Requirements is setting out detailed descriptions of the system’s functions, services and
operational constraints. Defines what should be implemented so may be part of a contract
between client and contractor.

9.3 Functional Requirements


Functional Requirements are:

• Describe functionality or system services.

Part 2: Software Engineering


86 9 Requirements Engineering

• Depend on the type of software, expected users and the type of system where the
software is used.

• Functional user requirements may be high-level statements of what the system should do.

• Functional system requirements should describe the system services in detail.

9.4 Non-Functional Requirements


Non-Functional Requirements are:

• These define system properties and constraints e.g. reliability, response time and storage
requirements. Constraints are I/O device capability, system representations, etc.

• Process requirements may also be specified mandating a particular IDE, programming


language or development method.

• Non-functional requirements may be more critical than functional requirements. If these


are not met, the system may be useless.

9.5 SRS
Software Requirements Specifications (SRS) are:

• The software requirements document is the official statement of what is required of the
system developers.

• Should include both a definition of user requirements and a specification of the system
requirements.

• It is NOT a design document. As far as possible, it should set of WHAT the system should do
rather than HOW it should do it.

In practice, requirements and design are inseparable. Many don’t separate SRS and SDD (Software
Design Document) documents, but include everything in a Requirements & Design Document.
Such a document could be called “Software Requirements and Design Document” (SRD).

In Figure 9-5 we see some typical contents of such a SRS/SDD document.

Part 2: Software Engineering


87 9 Requirements Engineering


Figure 9-5: Typical SRS/SDD Contents

In Figure 9-6 we see the different users involved in the SRS document.

Specify the requirements and


System read them to check that they
customers meet their needs. Customers
specify changes to the
requirements.

Use the requirements


Managers document to plan a bid for
the system and to plan the
system development process.

System Use the requirements to


engineers understand what system is
to be developed.

System test Use the requirements to


engineers develop validation tests for
the system.

System Use the requirements to


maintenance understand the system and
engineers the relationships between its
parts.

Figure 9-6: Users of SRS [1]

Part 2: Software Engineering


88 9 Requirements Engineering

In Table 9-1 we see an example of what chapters that we can include in a SRS document.

Table 9-1: Example of Table of Contents for the SRS document [1]

Chapter Description

Preface This should define the expected readership of the document and
describe its version history, including a rationale for the creation of a
new version and a summary of the changes made in each version.

Introduction This should describe the need for the system. It should briefly describe
the system’s functions and explain how it will work with other systems.
It should also describe how the system fits into the overall business or
strategic objectives of the organization commissioning the software.

Glossary This should define the technical terms used in the document. You
should not make assumptions about the experience or expertise of the
reader.

User Requirements Here, you describe the services provided for the user. The
Definition nonfunctional system requirements should also be described in this
section. This description may use natural language, diagrams, or other
notations that are understandable to customers. Product and process
standards that must be followed should be specified.

System Architecture This chapter should present a high-level overview of the anticipated
system architecture, showing the distribution of functions across
system modules. Architectural components that are reused should be
highlighted.

System This should describe the functional and nonfunctional requirements in


Requirements more detail. If necessary, further detail may also be added to the
Specification nonfunctional requirements. Interfaces to other systems may be
defined.

System Models This might include graphical system models showing the relationships
between the system components and the system and its environment.
Examples of possible models are object models, data-flow models, or
semantic data models.

Part 2: Software Engineering


89 9 Requirements Engineering

System Evolution This should describe the fundamental assumptions on which the
system is based, and any anticipated changes due to hardware
evolution, changing user needs, and so on. This section is useful for
system designers as it may help them avoid design decisions that would
constrain likely future changes to the system.

Appendices These should provide detailed, specific information that is related to


the application being developed; for example, hardware and database
descriptions. Hardware requirements define the minimal and optimal
configurations for the system. Database requirements define the
logical organization of the data used by the system and the
relationships between data.

Index Several indexes to the document may be included. As well as a normal


alphabetic index, there may be an index of diagrams, an index of
functions, and so on.

9.6 Project Estimation


To get an overview of the total cost in a software project is important. The features and
requirements need to be broken down into manageable tasks by the team. Each Tasks then needs
to be estimated (Hours).

9.7 Exercises

1. What is Software Requirements?

2. Requirements vs. Design – What is the main difference?

3. List different types of Requirements

4. What is User Requirements?

5. What is System Requirements?

Part 2: Software Engineering


90 9 Requirements Engineering

6. What is Functional Requirements?

7. What is Non-Functional Requirements?

8. Give some examples of Non-Functional Requirements

9. What is SRS?

10. Mention some Requirements Analysis Problems/Challenges?

Part 2: Software Engineering


10 User eXperience(UX)
Designing and creating the graphical user interface is a very important part of software
development. We have different names for it; User eXperience (UX), Graphical User Interface
(GUI) or Human Machine Interface (HMI).

The GUI design has been in constant change since the first computers and software were created.
In Figure 10-1 we see the difference between Windows 1 and Windows 8.


Figure 10-1: User eXperience – UX

It is important that Documents, GUI, Code, etc. have the same “Look and Feel” – Use Common
Templates, APIs, etc.

In software design, look and feel is a term used in respect of a graphical user interface and
comprises aspects of its design, including elements such as colors, shapes, layout, and typefaces
(the "look"), as well as the behavior of dynamic elements such as buttons, boxes, and menus (the
"feel"). The term can also refer to aspects of an API, mostly to parts of an API that are not related
to its functional properties.

91
92 10 User eXperience(UX)

Look and feel in operating system user interfaces serves two general purposes. First, it provides
branding, helping to identify a set of products from one company. Second, it increases ease of use,
since users will become familiar with how one product functions (looks, reads, etc.) and can
translate their experience to other products with the same look and feel.

It is the “UX Designer” that design the GUI, while the Programmer make sure to implement it in
the proper programming language (Figure 10-2).


Figure 10-2: UX Designer

10.1 UX Guidelines
Different platforms have different UX and UX guidelines, so it is important to follow these general
guidelines for the different platforms. The GUI is totally different on, e.g., Windows and Mac OS X.

The different platform vendors create their own guidelines that the developers should follow.

For Windows 8 UX Guidelines, see [13].

Figure 10-3 is an example from the Mac OS X UX Guidelines [14].

Part 2: Software Engineering


93 10 User eXperience(UX)


Figure 10-3: Mac OS X UX Guidelines [14]

10.2 GUI Mockup


Creating so-called GUI mockups are an important part of the process of creating user-friendly GUI.

Mockups and prototypes are not so cleanly distinguished in software and systems engineering,
where mockups are a way of designing user interfaces on paper or in computer images. A software
mockup will thus look like the real thing, but will not do useful work beyond what the user sees. A
software prototype, on the other hand, will look and work just like the real thing. In many cases it
is best to design or prototype the user interface before source code is written or hardware is built,
to avoid having to go back and make expensive changes [15].

In Figure 10-4 we see an example of a GUI Mockup.

Part 2: Software Engineering


94 10 User eXperience(UX)


Figure 10-4: GUI Mockup Example

10.3 Creativity
Be creative - Think outside the box!

“Thinking outside the box” is a metaphor that means to think differently, unconventionally, or
from a new perspective.

Part 2: Software Engineering


11 UML
11.1 Introduction
UML is a modeling language used in software engineering. It is very popular within OOA, OOD,
OOP. UML was developed in the 1990s and adapted as an ISO standard in 2000. UML 2.2 has 14
different types of diagrams.


Figure 11-1: UML Diagrams

We have 2 main categories of diagrams:

• Structure Diagrams
• Behavior Diagrams
o Interaction Diagrams (sub category of Behavior Diagrams)

The diagrams available in UML are:

• Class Diagram
• Component Diagram
• Deployment Diagram
• Object Diagram
• Package Diagram
• Activity Diagram

95
96 11 UML

• Sequence Diagram
• Communication Diagram
• Use Case Diagram
• State Machine Diagram
• Composite Structure Diagram
• Interaction Overview Diagram
• Timing Diagram

Why use UML?

• Design:
o Forward Design: doing UML before coding. Makes it easier to create the code in a
structured manner
o Backward Design: doing UML after coding as documentation
• Code
o Some tools can autoAuto-generate Code from UML diagrams

11.2 UML Software


There exists hundreds of different software for creating UML diagrams, here I mention just a few:

• Visio
• Enterprise Architect
• Visual Studio (Enterprise)

11.2.1 Visual Studio Enterprise


With the Visual Studio Enterprise edition we can create some of the most used UML diagrams, see
Figure 11-2.

These diagrams are available from the “Architecture” menu in Visual Studio.

Part 2: Software Engineering


97 11 UML


Figure 11-2: Create UML diagrams with Visual Studio Ultimate

11.3 Use Case


One of the most used UML diagrams is the Use Case Diagram.

In Figure 11-3 we see a Use Case example.

Part 2: Software Engineering


98 11 UML

Register Export
patient statistics

View Manager
personal info. Generate
Medical receptionist
report

View record

Nurse
Doctor
Edit record

Setup
consultation

Figure 11-3: Use Case example

11.4 Sequence Diagram


In Figure 11-4 we see an example of a Sequence Diagram.


Figure 11-4 Sequence Diagram Example

Part 2: Software Engineering


99 11 UML

11.5 Class Diagram


Figure 11-5 shows a Class Diagram Example.


Figure 11-5: Class Diagram Example

11.6 Summary
You should create Design and Specifications (including UML) before you start Coding. UML
diagrams is a general method/standard to do just that. But UML can also be used to document
your code afterwards (so-called Reverse Engineering).

UML makes it easier to create structured code and a good way to document your code properly.
UML should also be part of the code refactoring process and UML should be as part of the
continuous code improvements process. Note! If you update the code, make sure to update the
UML and vice versa!

11.7 Exercises

1. What is UML?

2. Give example of some types of UML diagrams (in total we have 14 different types)?

Part 2: Software Engineering


100 11 UML

3. Give examples of software used to create UML diagrams

4. List the 2 different categories of UML diagrams we have

5. Create a Class Diagram for a typical School including Classes Teacher, Student, Course, Grade,
etc.

Part 2: Software Engineering


12 Software Implementation
The ultimate goal of most software engineering projects is to produce a working program.

The act of transforming the detailed design into a valid program in some programming language,
together with all its supporting activities is referred to as implementation.

Most of the text in this chapter is taken from [16].

The implementation phase involves more than just writing code. Code also needs to be tested and
debugged as well as compiled and built into a complete executable product (Figure 12-1).

We usually need to use a Source Code Control (SCC) Tool in order to keep track of different
versions of the code.


Figure 12-1: Software Implementation [16]

In many cases the detailed design is not done explicitly (in the Design Phase) but is left as part of
the implementation. Doing the detailed design as part of the implementation is usually faster, but
it may result in a less cohesive and less organized design, because the detailed design of each
module will usually be done by a different person.

In small projects, the detailed design is usually left as part of the implementation. In larger
projects, or when the programmers are inexperienced, the detailed design will be done by a
separate person.

Here are some keyword for good implementation:

• Readability: The code can be easily read and understood by other programmers.
• Maintainability: The code can be easily modified and maintained. Note that this is related
to readability, but it is not exactly the same; for example, this involves the use of e.g.,
Hungarian notation, in which variable names include abbreviations for the type of variable.

101
102 12 Software Implementation

• Performance: All other things being equal, the implementation should produce code that
performs as fast as possible.
• Traceability: All code elements should correspond to a design element. Code can be traced
back to design (and design to requirements).
• Correctness: The implementation should do what it is intended to do (as defined in the
requirements and detailed design).
• Completeness: All of the system requirements are met.

In this chapter we will go through the following topics regarding implementation:

In this chapter we will discuss the following:

• Programming Style and Coding Guidelines

• Comments

• Debugging

• Code Review

• Refactorization

12.1 Programming Style & Coding Guidelines


Almost all software development organizations have some sort of coding guidelines. These
guidelines usually specify issues such as naming, indentation, and commenting styles, etc.

It is strongly recommended that you be consistent in your notation to avoid confusion when
others are debugging or maintaining your code later. Especially in large software projects there
are usually some programming conventions. These conventions may seem to be of little value at
first, but they may become extremely helpful during the maintenance of the code.

Here are some recommendations:

• Naming: This refers to choosing names for classes, methods, variables, and other
programming entities.
• Separating words and capitalization: Many times a name will be composed of more than
one word. In human languages, we use spaces to separate words, but most programming
languages will not allow us to do so. (do_something, doSomething, DoSomething)
• Indentation and spacing: Indentation refers to adding horizontal spaces before some lines
to better reflect the structure of the code. Spacing refers to both spaces and blank lines
inserted in the code.
• Function/method size: Many studies have shown that large functions or methods are
statistically more error-prone than smaller ones.

Part 2: Software Engineering


103 12 Software Implementation

• File-naming issues: Having a standard for specifying how to name the files, which files to
generate for each module, and how to locate a given file from a module is very
advantageous.
• Particular programming constructs: Different programming languages support different
features; although they usually have good reasons to include certain features, there are
many that can be misused and need special precautions.

12.1.1 Naming Convention


We have different naming convention/notation such as:

• Camel notation
• Pascal notation
• Hungarian notation

Camel Notation

For variables and parameters/arguments

Examples: “myCar”, “backColor”

Pascal Notation

For classes, methods and properties

Examples: “ShowCarColor”

Hungarian Notation

For controls on your user interface we either use “Pascal notation” or “Hungarian notation”, but
stick to one of them!

Examples: “txtName”, “lblName”

Acronyms

Examples: “DBRate”, “ioChannel”, “XmlWriter”, “htmlReader”

12.2 Comments
Comments are very important and can significantly aid or hurt readability and maintainability.

There are two main problems with comments:

• they may distract from the actual code and make the program more difficult to read and

Part 2: Software Engineering


104 12 Software Implementation

• they may be wrong.


We may classify comments into 6 different types:

1. Repeat of the code

2. Explanation of the code

3. Marker in the code

4. Summary of the Code

5. Description of the code intent

6. External references

These are explained below:

• Repeat of the code

Part 2: Software Engineering


105 12 Software Implementation

o These kinds of comments tend to be done by novice programmers and should be


avoided.
Bad Example:
// increment i by one
i++;

• Explanation of the code

o Sometimes, when the code is complex, programmers are tempted to explain what
the code does in human language.

o In almost every case, if the code is so complex that it requires an explanation, then
it should be rewritten.

1. Marker in the code

– It is common practice to put markers in the code to indicate incomplete items,


opportunities for improvement, and other similar information.

– We recommend using a consistent notation for these markers, and eliminating all
of them before the code is in production.

– Sometimes programmers put markers in the code to keep track of changes and who
made them. We believe that information is better tracked with version
management software, and recommend doing so.

3. Summary of the code

– Comments that summarize what the code does, rather than just repeating it, are
very helpful in understanding the code, but they need to be kept up to date.

– It is important to ensure that these comments are really summarizing the code, not
just repeating or explaining it.

– In many cases, the code that is being summarized can be abstracted into its own
function, which, if named correctly, will eliminate the need for the comment.

4. Description of the code intent

– These are the most useful kinds of comments; they describe what the code is
supposed to do rather than what it does.

– These are the only kinds of comments that override the code. If the code does not
fulfill its intent, then the code is wrong.

5. External references

Part 2: Software Engineering


106 12 Software Implementation

– These are comments that link the code to external entities, usually books or other
programs.

– Many times these can be viewed as a kind of intent statement, as in, “This function
implements the XYZ algorithm, as explained in . . .,” but we believe such comments
require special attention.

– There may also be external prerequisites for the code, such as the existence of
initializing data in the database tables.

The trade-off that comments imply should be recognized. Comments can help clarify code and
relate it to other sources, but they also represent some level of duplication of the code.

6. Effort is invested in their creation and, above all, in their maintenance.

7. A comment that does not correspond to the actual code that it accompanies can cause
errors that are very hard to find and correct.

8. Another danger comments present is that they can be used to justify bad coding practices.
Many times programmers will be tempted to produce code that is too complicated or too
hard to maintain, and add comments to it, rather than rewrite it to good standards.

9. In fact, many experts recommend avoiding comments completely, and produce what is
called “self-documented code”—that is, code that is so well written that it does not need
any documentation.

10. Comments have their place, especially in the form of describing the programmer’s intent.

12.3 Debugging
Debugging is about different techniques for finding and fixing bugs (errors that make your code
not work as expected) in your code.

1. It is difficult to write code without errors (bugs), but e.g., Visual Studio and other tools
have powerful Debugging functionality (break-points, etc.)

2. The Compiler will also find syntax errors, etc.

3. For more “advanced” bugs other methods are required (Unit Testing, Integration Testing,
Regression Testing, Acceptance Testing, etc.) .

4. The main focus here will be on these methods, while Debugging is something you learned
in Programming courses.

Part 2: Software Engineering


107 12 Software Implementation

In debugging we have 4 phases:

• Stabilization/Reproduction

• The purpose of this phase is to be able to reproduce the error on a particular


configuration, and to find out the conditions that led to the error by constructing a
minimal test case

• Localization

• The process of localization involves finding the sections of the code that led to the
error. This is usually the hardest part, although, if the stabilization phase produces a
very simple test case, it may make the problem obvious.

• Correction

• The process of correction involves changing the code to fix the errors. Hopefully, if
you understand what caused the error, you have a good chance of fixing the
problem.

• Verification

• The process of verification involves making sure the error is fixed, and no other
errors were introduced with the changes in the code. Many times, a change in the
code will not fix the error or may introduce new errors.

12.4 Code Review


We all are human beings. You may do some mistakes irrespective of your experience in a
particular technology or module. If you just review your code by a second eye, those mistakes
might have caught at that time only. This way you can reduce the no. of bugs reported by the
testers or end users (Figure 12-2).

If you are working in a geographically distributed team, your coding conventions may differ and if
you have some strict coding guidelines, this code review process will make it possible to recheck
the standards in the code that you have written.

1. There are some possibilities of repetitive code block which can be caught during a code
review process. Refactoring can be done based on that.

2. Unused code blocks, performance metrics etc. are some additional check points of doing a
review.

3. If you are new to development, this code review process will help you to find out your
mistakes and help you to improve them. This is a perfect knowledge sharing mechanism.

Part 2: Software Engineering


108 12 Software Implementation

4. Find out the defects and correct them at the beginning before it commits to the source
control system.


Figure 12-2: Why you should do reviews


Better code always starts with review process!

Here are some topics that should be checked during the Code Review process [12]:

Part 2: Software Engineering


109 12 Software Implementation

• Readability: The code can be easily read and understood by other programmers.

• Maintainability: The code can be easily modified and maintained. Note that this is related
to readability, but it is not exactly the same; for example, this involves the use of e.g.,
Hungarian notation, in which variable names include abbreviations for the type of variable.

• Performance: All other things being equal, the implementation should produce code that
performs as fast as possible.

• Traceability: All code elements should correspond to a design element. Code can be traced
back to design (and design to requirements).

• Correctness: The implementation should do what it is intended to do (as defined in the


requirements and detailed design).

• Completeness: All of the system requirements are met.

12.5 Refactoring
Even when using best practices and making a conscious effort to produce high-quality software, it
is highly unlikely that you will consistently produce programs that cannot be improved.

Refactoring is defined as

• the activity of improving your code style without altering its behavior

• a change made to the internal structure of software to make it easier to understand and
cheaper to modify without changing its observable behavior

Do you need to refactoring your code? – here are some symptoms:

• Coding Style and Name Conventions not followed

• Proper Commenting not followed

• Duplicated code (clearly a waste)

• Long method (excessively large or long methods perhaps should be subdivided into more
cohesive ones)

• Large class (same problem as long method)

• Switch statements (in object-oriented code, switch statements can in most cases be
replaced with polymorphism, making the code clearer)

• Feature envy, in which a method tends to use more of an object from a class different to
the one it belongs

Part 2: Software Engineering


110 12 Software Implementation

• Inappropriate intimacy, in which a class refers too much to private parts of other classes

Any of these symptoms (and more) will indicate that your code can be improved. You can use
refactoring to help you deal with these problems.

You should Refactoring your continuously and especially after Code Reviews.

Part 2: Software Engineering


13 Testing
13.1 Introduction
Different people have come up with various definitions for Software Testing, but generally, the
goal with testing is:

• To ensure that the software meets the agreed requirements and design
• The application works as expected
• The application doesn’t contain serious bugs
• Meets its intended use as per user expectations

Testing can be performed on different levels and by different persons. Testing is a very important
part of software development. About 50% of the software development is about testing your
software.

Since modern software has become very complex, testing has become a very important part of
software development (see Figure 13-1).


Figure 13-1: Modern Software Testing has become very complex

111
112 13 Testing

Since testing of advanced software systems is quite complex, we need a systematic approach to
testing that involves different levels of testing (see Figure 13-2).


Figure 13-2: Systematic Testing

Since Software Development today involves different platforms, different devices, network,
servers and clients, etc., it has become very complex to test it. Today we have not only ordinary
Desktop Apps, we have Web Apps, Mobile Apps, Apps for TVs, etc.

The software we creates is a layer between the user of the software and the hardware and the
operating system (Figure 13-3).

Part 2: Software Engineering


113 13 Testing


Figure 13-3: Components involved in Software Development & Testing

If we find bugs at the earlier stage, the cost to fix this will be less and thus it will reduce the overall
cost of the application (Figure 13-4).


Figure 13-4: Find Bugs at an early stage

Figure 13-5 illustrates the necessary steps involved in testing.

Part 2: Software Engineering


114 13 Testing


Figure 13-5: Software Testing

Testing is intended to show that a program does what it is intended to do and to discover program
defects before it is put into use. When you test software, you execute a program using artificial
data. You check for the presence of errors NOT their absence.

Testing is part of a more general verification and validation process, which also includes static
validation techniques.

What is the purpose with Testing?

The main purpose with testing is as follows:

• To demonstrate to the developer and the customer that the software meets its
requirements.
• For custom software, this means that there should be at least one test for every
requirement in the requirements document.
• For generic software products, it means that there should be tests for all of the
system features, plus combinations of these features, that will be incorporated in
the product release.
• To discover situations in which the behavior of the software is incorrect, undesirable or
does not conform to its specification.
• This means undesirable system behavior such as system crashes, unwanted
interactions with other systems, incorrect computations and data corruption.

A primary purpose of testing is to detect software failures so that defects may be discovered and
corrected.

If we summarize why we do Testing:

• Finding Bugs in the Software before it is released to the Customer


• Finding unwanted system behaviors
• Verify/Validate that the Software works as expected (according to the Specifications)

Part 2: Software Engineering


115 13 Testing

• Find bugs as soon as possible!

It is commonly believed that the earlier a defect is found the cheaper it is to fix it.

There are different steps involved in the software testing process.

The steps are as follows:

• Design Test Cases


• Prepare Test Data
• Run the Software with the necessary Test Data
• Compare the results with the Test Cases

The final output of this process is a Test Report.

Basically we do the following: Planning the Test, then we execute the Tests, finally we document
the Test results.

Documents used in testing and created in the test process:

• SRS – Software Requirements Specifications: A document stating what at application


must accomplish. The documents is the basic for the test plan, etc.
• SDD – Software Design Document: A document describing the design of a software
application. The documents is the basic for the test plan, etc.
• STP - Software Test Plan: Documentation stating what parts of an application will be
tested, and the schedule of when the testing is to be performed
• STD - Software Test Documentation: Introduction, Test Plan, Test Design, Test Cases, Test
procedures, Test Log, …, Summary

We have the following stages in testing:

1. Development testing, where the system is tested during development to discover bugs
and defects. Development testing includes all testing activities that are carried out by the
team developing the system.
2. Release testing, where a separate testing team test a complete version of the system
before it is released to users.
3. User testing, where users or potential users of a system test the system in their own
environment.

Development testing: Development testing is the responsibility of the software development


team. A separate team should be responsible for testing a system before it is released to
customers.

Part 2: Software Engineering


116 13 Testing

Release testing: Release testing is the process of testing a particular release of a system that is
intended for use outside of the development team.

The primary goal of the release testing process is to convince the supplier of the system that it is
good enough for use. Release testing is usually a black-box testing process where tests are only
derived from the system specification.

User testing: We have different types of user testing:

• Alpha testing
o Users of the software work with the development team to test the software at the
developer’s site.
• Beta testing
o A release of the software is made available to users to allow them to experiment
and to raise problems that they discover with the system developers.
• Acceptance testing
o Customers test a system to decide whether or not it is ready to be accepted from
the system developers and deployed in the customer environment. Primarily for
custom systems.

13.1.1 Test Levels


In Figure 13-6 we see different test levels.


Figure 13-6: Levels of Testing

Part 2: Software Engineering


117 13 Testing

Short overview of the different Test levels in Figure 13-6 (more details later):

• Unit Tests are written by the Developers as part of the Programming. Each part is
developed and Unit tested separately (Every Class and Method in the code)
• Regression testing is testing the system to check that changes have not “broken”
previously working code. Both Manually & Automatically (Re-run Unit Tests)
• Integration testing means the system is put together and tested to make sure everything
works together.
• System or validation testing is Black-box Tests that validate the entire system against its
requirements, i.e., checking that a software system meets the specifications
• Acceptance Testing: The Customer needs to test and approve the software before he can
take it into use. We have 2 types: FAT (Factory Acceptance Testing) and SAT (Site
Acceptance Testing).

13.1.2 Bug Tracking


A software bug is an error, flaw, failure, or fault in a computer program or system that produces
an incorrect or unexpected result, or causes it to behave in unintended ways

They found a bug (actually a moth) inside a computer in 1947 that made the program not
behaving as expected. This was the “first” real bug.

13.1.3 Software versioning


Software versioning is used to separate different version of the same software, both before it has
been released and for subsequent releases. See example in Figure 13-7.

Before the software is released:

• Alpha Release(s)
• Beta Release(s)
• RC - Release Candidate(s)
• RTM – Release To Manufacturing

Maintenance (after the software is released):

• Patches (small fixes)


• SP - Service Packs
(lots of small fixe and patches bundle together)
• …
• Start Planning next release

Part 2: Software Engineering


118 13 Testing


Figure 13-7: Software versioning

Software testing should be performed during the whole Software Development Life Cycle (SDLC)
as shown in Figure 13-8.

Part 2: Software Engineering


119 13 Testing


Figure 13-8: Testing during the Software Development Life Cycle (SDLC)

Sooner or later you have to say enough is enough and release version 1.0 (see Figure 13-9).


Figure 13-9: When is the Software Finished?

Part 2: Software Engineering


120 13 Testing

One must define within the development company, development team or in dialogue with the
customer what is defined as "good enough".

Software will never be 100% complete or error-free (see Figure 13-10)!


Figure 13-10: When are you Finished with Testing?

13.2 Test Categories


We can divide testing into 2 different categories, which is:

• Black-box
• White-box Testing

13.2.1 Black-box Testing


Black-box testing is a method of software testing that examines the functionality of an application
(what the software does) without going inside the internal structure (White-box Testing).

You need no knowledge of how the system is created. Black-box testing can be done by a person
who only know what the software is supposed to do. You may compare to driving a Car – you
don’t need to know how it is built in order to test it.

Part 2: Software Engineering


121 13 Testing

13.2.2 White-box Testing


In White-box Testing you need to have knowledge of how (Design and Implementation) the
system is built. White-box Testing is also called “Glass-box testing”.

In Figure 13-11: Whitebox TestingFigure 13-12 we see how White-box Testing is working.


Figure 13-11: Whitebox TestingFigure 13-12: White-box Testing

13.3 Test Levels


As mention earlier we have different Levels of Testing (see Figure 13-13).

• Unit Testing
• Regression Testing
• Integration Testing
• System Testing
• Acceptance Testing

These are explained more in detail below.

Part 2: Software Engineering


122 13 Testing


Figure 13-13: Software Test Levels

Short explanations of these Test Levels:

• Unit Tests are written by the Developers as part of the Programming. Each part is
developed and Unit tested separately (Every Class and Method in the code)

• Regression testing is testing the system to check that changes have not “broken”
previously working code. Both Manually & Automatically (Re-run Unit Tests)

• Integration testing means the system is put together and tested to make sure everything
works together.

• System testing is typically Black-box Tests that validate the entire system against its
requirements, i.e., Checking that a software system meets the specifications

• Acceptance Testing: The Customer needs to test and approve the software before he can
take it into use. FAT/SAT.

Part 2: Software Engineering


123 13 Testing

13.3.1 Unit Testing


Unit Testing (or component testing) refers to tests that verify the functionality of a specific section
of code, usually at the function level. In an object-oriented environment, this is usually at the class
and methods level.

Unit Tests are written by the developers as part of the programming. They are automatically
executed by the system, e.g., Visual Studio and Team Foundation Server have built-in functionality
for Unit Testing.

Sometimes the Unit Tests are written before you start programming, so-called Test Driven
Development (TDD).


Since Unit testing are part of the development process, so-called Unit Tests Framework are usually
integrated with the IDE.

Unit Tests Frameworks:

• Visual Studio Unit Test Framework. Unit Tests are built into Visual Studio (no additional
installation needed)

Part 2: Software Engineering


124 13 Testing

• JUnit (Java)

• JUnit is a unit testing framework for the Java programming language.

• NUnit (.NET)

• NUnit is an open source unit testing framework for Microsoft .NET. It serves the
same purpose as JUnit does in the Java world

• PHPUnit (PHP)

• LabVIEW Unit Test Framework Toolkit

• etc.

Unit Testing in Visual Studio:

Visual Studio have built-in features for Unit Testing. In the Solution Explorer you just add a “Test
Project” as part of your code (see Figure 13-14).


Figure 13-14: Unit Test Project in Visual Studio

In Figure 13-15 wee se an example of how how you create Unit Tests in Visual Studio and C#.

For Test Classes you need to use [TestClass] and for Test Methods you need to use [TestMethod].
You also need to add a reference to the code under test (select “Add Reference” in the Solution
Explorer and include “using <namespace>”) in your code.

Part 2: Software Engineering


125 13 Testing


Figure 13-15: Unit Test Principle in Visual Studio and C#

The basic concept in Unit Testing is to Compare the results when running the Methods with some
Input Data (“Actual”) with some Known Results (“Expected”).

Example:

Assert.AreEqual(expected, actual, 0.001,”Test failed because...");

Unit Tests – Best Practice:

• A Unit Test must only do one thing

• Unit Test must run independently

• Unit Tests must not be depending on the environment

• Test Functionality rather than implementation

• Test public behavior; private behavior relates to implementation details

• Avoid testing UI components

• Unit Tests must be easy to read and understand

• Create rules that make sure you need to run Unit Tests (and they need to pass) before you
are allowed to Check-in your Code in the Source Code Control System

13.3.2 Regression Testing


Regression testing focuses on finding defects after a major code change has occurred. Specifically,
it seeks to uncover software regressions, or old bugs that have come back.

Part 2: Software Engineering


126 13 Testing

1. Regression testing is testing the system to check that changes have not “broken”
previously working code.
2. In a manual testing process, regression testing is expensive but, with automated testing, it
is simple and straightforward. All tests are rerun every time a change is made to the
program.
3. Tests must run “successfully” before the change is committed.

13.3.3 Integration Testing


Integration testing verifies the interfaces between components against a software design.

13.3.4 System Testing/Validation Testing


System Testing follows Integration Testing. It consists of Black-box Tests that validate the entire
system against its requirements. System Testing is about checking that a software system
meets specifications and that it fulfills its intended purpose. System Testing is often executed by
an independent group (QA group). QA – Quality Assurance.

Since system tests make sure the requirements are fulfilled, they must systematically validate each
requirement in the SRS (Software Requirements Specification).

13.3.5 Acceptance Testing


Customers test a system to decide whether or not it is ready to be accepted from the system
developers and deployed in the customer environment. It is primarily for custom systems.

In Figure 13-16 we see a typical acceptance test process.


Figure 13-16: Acceptance Testing

The steps are:

• Define acceptance criteria


• Plan acceptance testing
• Derive acceptance tests
• Run acceptance tests

Part 2: Software Engineering


127 13 Testing

• Negotiate test results


• Reject/accept system

We have 2 main types of Acceptance Testing:

• FAT – Factory Acceptance Testing


• SAT – Site Acceptance Testing

FAT – Factory Acceptance Testing is usually performed in the Test Environment at the software
company.

SAT – Site Acceptance Testing is performed at the Customer in the actual Production Environment.
This is the final step to determine if the requirements of a specification or contract are met.

If the test is accepted, the software is officially handed over to the customer.

Note! Others terms and definitions are used as well in different literature.

13.4 Test Documentation


In Figure 13-17 we see the steps involved in the software testing process.


Figure 13-17: The Software Testing Process

Documents involved:

• SRS – Software Requirements Specifications: A document stating what at application must


accomplish

Part 2: Software Engineering


128 13 Testing

• SDD – Software Design Document: A document describing the design of a software


application
• STP - Software Test Plan: Documentation stating what parts of an application will be
tested, and the schedule of when the testing is to be performed
• STD - Software Test Documentation: Introduction, Test Plan, Test Design, Test Cases, Test
procedures, Test Log, …, Summary

In addition to write different documents in your test phase, you should have a Bug Tracking
System. With a Bug Tracking System, you can easily store all your bugs in a database system, set
priorities, use search to find bugs, use different statistics, etc. More about Bug Tracking Systems
below.

13.4.1 Test Planning


Test planning involves scheduling and estimating the system testing process, establishing process
standards and describing the tests that should be carried out. As well as helping managers allocate
resources and estimate testing schedules, test plans are intended for software engineers involved
in designing and carrying out system tests. They help technical staff get an overall picture of the
system tests and place their own work in this context.

As well as setting out the testing schedule and procedures, the test plan defines the hardware and
software resources that are required. Test plans are not a static documents but evolve during the
development process. Test plans change because of delays at other stages in the development
process. Test planning is particularly important in large software system development. For small
and medium-sized systems, a less formal test plan may be used, but there is still a need for a
formal document to support the planning of the testing process.

A Software Test Plan (STP) document typically answers the following:

Testing should be based on Requirements & Design Documents

• What shall we test?


• How shall we test?
• Hardware/Software Requirements
• Where shall we test?
• Who shall test?
• How often shall we test (Test Schedule)?
• How shall tests be documented? It is not enough simply to run tests; the results of the
tests must be systematically recorded. It must be possible to audit the testing process to
check that it has been carried out correctly
• System tests: This section, which may be completely separate from the test plan, defines
the test cases that should be applied to the system. These tests are derived from the
system requirements specification.

Part 2: Software Engineering


129 13 Testing

13.5 Bug Tracking Systems


All the results from the testing needs to be documented, stored and tracked.

For this purpose, we use a so-called Bug Tracking System.

Here are some popular Bug Tracking Systems in use today:

• Team Foundation Server


• Jira
• Bugzilla
• Clearquest

More about Bug Tracking Systems in Chapter 23 - Bug Tracking Systems.

We will focus on Team Foundation Server (TFS) in this document. The bug tracking features in TFS
will be discussed in Chapter 24 - Team Foundation Server (TFS).

In TFS we can add requirements, user stories, tasks, new features, bugs, etc. as so-called “Work
Items” (Figure 13-18).

Part 2: Software Engineering


130 13 Testing


Figure 13-18: Team Foundation Server (TFS) – Work Items

13.6 Test Environment


A testing environment is a setup of software and hardware on which the testing team is going to
perform the testing of the newly built software product.

Why do we need a Test Environment? Here are some reasons:

• “It works on my PC” says the Developer

• We need a Clean Environment when testing

• On the Developers PCs we have all kind of Software installed that the Customer don’t have,
e.g. Development Tools like Visual Studio, etc.

• We need to test on different Platforms and Operating Systems

• Customers may use different Web Browsers

Part 2: Software Engineering


131 13 Testing

• Deployment: Test of Installation packages

• Make the software available for Testers

• etc.

This setup consists of the physical setup which includes hardware, and logical setup that includes
Server Operating system, client operating system, database server, front end running
environment, browser (if web application), IIS (version on server side) or any other software
components required to run this software product.

This testing setup is to be built on both the ends – i.e. the server and client.

In order to set up such environments, virtualization is the answer.

More about virtualization below.


Figure 13-19: Development, Test and Production Environment

Part 2: Software Engineering


132 13 Testing

13.6.1 Virtualization
In order to create test environments easily, virtualization is the answer. There exists lots of
different virtualization solutions on the market today.

Here are some examples:

• VMware Workstation/VMware Workstation Player


• VMware vSphere
• Microsoft Hyper-V
• VirtualBox
• VMware Fusion (Mac)
• Parallels Desktop (Mac)
• etc.

Part 2: Software Engineering


133 13 Testing

VMware Workstation Player (Figure 13-20: VMware PlayerFigure 13-21) is probably the simplest
and easiest solution. You may download it for free at no costs.

With VMware Workstation Player or other virtualization solutions you can create so-called Virtual
Machines (VM) where you can install and run all kinds of software.

In this way you can easily test your software without destroying your own computer and you can
easily test in in different operating systems, etc.


Figure 13-20: VMware PlayerFigure 13-21: VMware Workstation Player

Part 2: Software Engineering


134 13 Testing


Figure 13-22: Window Server 2012 running as a virtual machine

13.7 Terms used in Testing


Here we will discuss some terms used in software testing not covered earlier.

13.7.1 Bugs
A software bug is an error, flaw, failure, defect, or fault in a computer program or system that
produces an incorrect or unexpected result, or causes it to behave in unintended ways.

They found a bug (actually a moth) inside a computer in 1947 that made the program not
behaving as expected. This was the “first” real bug.

13.7.2 Debugging
Debugging is about different techniques for finding and fixing bugs (errors that make your code
not work as expected) in your code. It is difficult to write code without errors (bugs), but e.g.,
Visual Studio and other tools have powerful Debugging functionality (break-points, etc.). The
Compiler will also find syntax errors, etc.

For more “advanced” bugs other methods are required (Unit Testing, Integration Testing,
Regression Testing, Acceptance Testing, etc.). The main focus here will be on these methods, while
Debugging is something you learned in Programming courses.

Part 2: Software Engineering


135 13 Testing

13.7.3 Code Coverage


Code coverage is a measure used in software testing. It describes the degree to which the source
code of a program has been tested.

Example:

int foo (int x, int y)


{
int z = 0;
if ((x>0) && (y>0))
{
z = x;
}
return z;
}

When we test this function, it depends on the input arguments which parts of the code will be
executed. Unit Tests should be written to cover all parts of the code.

13.7.4 Eat your own Dog food


“Eating your own dog food”, also called “dog-fooding”, is a slang term used to reference a scenario
in which a company (usually, a computer software company) uses its own product to demonstrate
the quality and capabilities of the product.

Example: Microsoft uses Windows PCs and Visual Studio to create their software.

Part 2: Software Engineering


136 13 Testing

13.7.5 Code/Feature Freeze


The Developer cannot add new features to the software, only fix bugs. When it is very close to
release, they cannot fix bugs either.

13.7.6 Test-Driven Development (TDD)


In TDD coding and testing are done in parallel. The tests are normally written before the code. TDD
was introduced as part of eXtreme Programming (XP).

13.7.7 Development-Driven Testing (DDT)


DDT is all about giving more responsibility to developers specifically, and the development process
in general. It works especially well when using test cases as requirements, and having the
developers write these test cases. But it’s really not DDT unless those tests are written near the
end of the process, when the code is checked in, and the developers figure they’re done.

The advantages of Development-Driven Testing are many. Instead of tests driving the
development, it’s developers driving the tests, so you get just a few tests, and they almost always
all pass. The project team can deliver on time for a change, with zero bugs found in every
iteration. This makes management happy, and isn’t that really the ultimate barometer of
success? Also, velocity is increased dramatically when using this process.

Development-driven testing makes all the sense in the world for those who practice Agile.

Part 2: Software Engineering


137 13 Testing

13.8 The 7 Principles of Testing


The 7 Principles of Testing are as follows:

1. Testing shows the presence of Bugs: Software Testing reduces the probability of
undiscovered defects remaining in the software but even if no defects are found, it is not a
proof of correctness.
2. Exhaustive Testing is impossible: Testing everything is impossible! Instead we need
optimal amount of testing based on the risk assessment of the application.
3. Early Testing: Testing should start as early as possible in the Software Development Life
Cycle (SDLC)
4. Defect Clustering: A small number of modules contain most of the defects/bugs detected.
5. The Pesticide Paradox: If the same tests are repeated over and over again, eventually the
same test cases will no longer find new bugs
6. Testing is Context dependent: This means that the way you test a e-commerce site will be
different from the way you test a commercial off the shelf application
7. Absence of Error is a Fallacy: Finding and fixing defects does not help if the system build is
unusable and does not fulfill the users needs & requirements

Part 2: Software Engineering


138 13 Testing

For more information about these 7 principles of testing, see the following:

http://www.guru99.com/software-testing-seven-principles.html

and

http://www.testingexcellence.com/seven-principles-of-software-testing

13.9 Testing Summary


Figure 13-23 gives an overview of different Test Categories, Test Levels and Test Methods.


Figure 13-23: Test Categories, Test Levels and Test methods

13.10 Exercises

1. Why do we need to test the software?

2. List different Test methods

3. We have 2 main categories of testing. Explain.

4. Explain the difference between a “Bug” and a “Feature”

Part 2: Software Engineering


139 13 Testing

5. What is Code/Feature Freeze?

6. What is “Dog-fooding”?

7. What is a Code Review?

8. What Explain TDD and DDT?

9. What is Unit Testing?

10. What is the difference between Functional and Non-Functional Testing?

Part 2: Software Engineering


14 Deployment and
Installation
14.1 Introduction
Getting software out of the hands of the developers into the hands of the users. More than 50% of
commissioned software is not used, mostly because it fails at deployment stage. 80% of the cost of
(commissioned) software comes at and after deployment.

Software deployment is all of the activities that make a software system available for use.

Examples:

• Get the software out to the customers

• Creating Installation Packages

• Documentation

o Installation Guide, etc.

• Installation

• etc.

Deployment strategies may vary depending of what kind of software we create, etc.

14.2 Releases
Now we are finished with all the development, testing and are ready to start the deployment
process.

Typically we have the following “Internal” releases (see also Figure 14-1):

• Alpha Release(s)

• Beta Release(s)

• RC - Release Candidate(s)

140
141 14 Deployment and Installation

You are finished:

• RTM – Release To Manufacturing

• Your software is good enough and it is ready for Deployment!


Figure 14-1: Software Releases before Deployment

Below we see an example of the Windows 8 life cycle releases:

• Start planning and development of Windows 8, 2008/2009 (the planning started before
Windows 7 was released)

– Internal Builds xxxx…xxxx

– Internal Alpha versions, Alpha 1, 2, 3

– Internal Builds xxxx…xxxx

– Internal Milestone1 Release (build 7850), 2010.09.22

– Internal Milestone2 (build 7955), Milestone3 (build 7989)

• Developer Preview (build 8102), 2011.09.13

Part 2: Software Engineering


142 14 Deployment and Installation

– Internal Builds xxxx…xxxx

• Consumer Preview (build 8250), 2012.02.29

– Internal Builds xxxx…xxxx

• Release Preview (build 8400), 2012.05.28

– Internal Builds xxxx…xxxx

• RTM Release (build 9200), 2012.08.01

14.3 Deployment
What is Deployment?

Software deployment is all of the activities that make a software system available for use.

Examples:

• Get the software out to the customers

• Creating Installation Packages

• Documentation

o Installation Guide, etc.

• Installation

• etc.

Deployment strategies may vary depending of what kind of software we create, etc.

Key Issues around Deployment:

• Business Processes: Most large software systems require the customer to change the way
they work.

• Training: No point in deploying software if the customers can't use it.

• Support: The need goes on, and on, and on.

• Deployment: How do you physically get the software installed.

• Equipment: Is the customer's hardware up to the job?

• Expertise: Does the customer have the IT expertise to install the software?

Part 2: Software Engineering


143 14 Deployment and Installation

• Upgrades: Can't avoid them!

• Integration: Shall the software interact/integrate with other systems of the customer.

• Performance: The Customer may not have the same hardware as in the Development/Test
Environment

14.4 Test and Production Environment


Typically, “everything” works on the the computer that the developer of the code is using, but the
customer’s computer may use another OS, another version of the hardware, another version of a
3. party component or other software that your software relies on, etc. Therefore, it is very
important to test the software on other computers and other environments, different versions of
hardware, different versions of web browsers, etc.

During the software lifecycle we have 3 different environments for the software we are creating:

• Development Environment
• Test Environment
• Production Environment

Figure 14-2 gives an overview of these different software environments.

Part 2: Software Engineering


144 14 Deployment and Installation


Figure 14-2: Development-, Test- and Production Environment


Test/Production Environment is an Infrastructure with Servers, Virtual Servers, Database Servers,
Web Servers, etc.

• Local Infrastructure with Servers & Virtualization

Part 2: Software Engineering


145 14 Deployment and Installation

• Cloud-based Infrastructure (monthly payment), e.g.:

• Windows Azure www.windowsazure.com

• Amazon Web Services (AWS) http://aws.amazon.com

• Google Cloud Platform https://cloud.google.com

• etc.

14.4.1 Development Environment


This is where the developers create the code, typically the developer’s personal computer.

14.4.2 Production Environment


Production environment is a term used mostly by developers to describe the setting where
software and other products are actually put into operation for their intended uses by end users.

A production environment can be thought of as a real-time setting where programs are run and
hardware setups are installed and relied on for organization or commercial daily operations.

14.4.3 Test Environment


A testing environment is a setup of software and hardware on which the testing team is going to
perform the testing of the newly built software product.

This setup consists of the physical setup which includes hardware, and logical setup that includes
Server Operating system, client operating system, database server, front end running
environment, browser (if web application), IIS (version on server side) or any other software
components required to run this software product.

This testing setup is to be built on both the ends – i.e. the server and client.

Part 2: Software Engineering


15 Project Documentation
During the software development a lots of documentation (Figure 15-1) is created in the different
phases of the development.


Figure 15-1: Example of Documentation during the SDLC

Some documents are for internal use inside the software company or inside the development
team, while others documents are important for the stakeholders and customers that are going to
use the software (Figure 15-2: Software DocumentatioFigure 15-3).

146
147 15 Project Documentation


Figure 15-2: Software DocumentatioFigure 15-3: Software Documentation

Some important documents are:

• SDP – Software Development Plan

• SRS – Software Requirements Specifications

o A document stating what at application must accomplish

• SDD – Software Design Document

o A document describing the design of a software application

• STP - Software Test Plan

o Documentation stating what parts of an application will be tested, and the schedule
of when the testing is to be performed

• STD - Software Test Documentation

o Introduction, Test Plan, Test Design, Test Cases, Test procedures, Test Log, …,
Summary

Part 2: Software Engineering


148 15 Project Documentation

See Figure 15-4 for an overview of documentation categories used in a project.


Figure 15-4: Software Project Documentation

Documentation produced during a software Project can be divided into 2 main categories:

• Process Documentation

– These documents record the process of development and maintenance, e.g., Plans,
Schedules (e.g., Gantt Charts), etc.

• Product Documentation

– These documents describe the product that is being developed. Can be divided into
2 sub categories:

• System Documentation

• Used by engineers developing and maintaining the system

• User Documentation

• Used by the people that is using the system

Part 2: Software Engineering


149 15 Project Documentation

Here are some Software Documentation Requirements:

• Should act as a communication medium between members of the Development Team


(Process Documentation)

• Information repository used by Maintenance Engineers (Product Documentation)

• Information for Management to help them Plan, Budget and Schedule the Software
Development Process (Process Documentation)

• Some of the documents should tell users how to use and administer the system (Product
Documentation)

• Documents for Quality Control, System Certification, etc. (Process/Product Documentation)

Satisfying these requirements requires different types of documents from informal working
documents through professionally produced User Manuals

15.1 Process Documentation


Purpose:

1. Process Documentation is produced so that the development of the system can be


managed

2. It is an essential component of plan-driven approaches (e.g., Waterfall)

3. Agile Approaches: The Goal is to minimize the amount of Process Documentation

We have different categories of Process Documentation:

• Plans, estimates and schedules. These are documents produced by managers which are
used to predict and to control the software process.

• Reports. These are documents which report how resources were used during the process
of development.

• Standards. These are documents which set out how the process is to be implemented.
These may be developed from organizational, national or international standards.

• Working papers. These are often the principal technical communication documents in a
project. They record the ideas and thoughts of the engineers working on the project, are
interim versions of product documentation, describe implementation strategies and set
out problems which have been identified. They often, implicitly, record the rationale for
design decisions.

Part 2: Software Engineering


150 15 Project Documentation

• E-mail messages, wikis, etc. These record the details of everyday communications
between managers and development engineers.

15.2 Product Documentation


Purpose:

• Describing the delivered software product

• Unlike most process documentation, it has a relatively long life. It must

• Evolve in step with the product that it describes. Product documentation includes

– User documentation, which tells users how to use the software product,

– System Documentation, which is principally intended for maintenance engineers.

15.2.1 System Documentation


The system documentation describes how the system is designed and how it works in detail.

1. System documentation includes all of the documents describing the system itself from the
requirements specification to the final acceptance test plan.

2. Documents describing the design, implementation and testing of a system are essential if
the program is to be understood and maintained.

3. Like user documentation, it is important that system documentation is structured, with


overviews leading the reader into more formal and detailed descriptions of each aspect of
the system.

In Figure 15-5 we see an overview of different product documentation and readers of such
documents.

Part 2: Software Engineering


151 15 Project Documentation


Figure 15-5: Product Documentation Types & Readers [1]

For large systems that are developed to a customer’s specification, the system documentation
should include:

• The requirements document.

• A document describing the system architecture.

• For each program in the system, a description of the architecture of that program.

• For each component in the system, a description of its functionality and interfaces.

• Program source code listings, which should be commented where the comments should
explain complex sections of code and provide a rationale for the coding method used.

• If meaningful names are used and a good, structured programming style is used,
much of the code should be self documenting without the need for additional
comments.

• This information is now normally maintained electronically rather than on paper


with selected information printed on demand from readers.

• Validation documents describing how each program is validated and how the validation
information relates to the requirements.

• These may be required for the quality assurance processes in the organization.

Part 2: Software Engineering


152 15 Project Documentation

• A System Maintenance Guide, which describes known problems with the system,
describes which parts of the system are hardware and software dependent and which
describes how evolution of the system has been taken into account in its design

15.2.2 User Documentation


Users of a system are not all the same. The producer of documentation must structure it to cater
for different user tasks and different levels of expertise and experience.

It is particularly important to distinguish between end-users and system administrators:

• End-users use the software to assist with some task.

– This may be flying an aircraft, managing insurance policies, writing a book, etc. They
want to know how the software can help them. They are not interested in
computer or administration details.

• System administrators are responsible for managing the software used by end-users.

– This may involve acting as an operator if the system is a large mainframe system, as
a network manager is the system involves a network of workstations or as a
technical guru who fixes end-users software problems and who liaises between
users and the software supplier.

We have different user documentation, such as:

• User Manual
• Installation Guide
• Wiki
• etc.

Part 2: Software Engineering


153 15 Project Documentation


User Manual:

A user guide or user's guide, also commonly known as a manual, is a technical communication
document intended to give assistance to people using a particular system. It is usually written by a
technical writer, although user guides are written by programmers, product or project managers,
or other technical staff, particularly in smaller companies

The sections of a user manual often include:

• A cover page

• A title page and copyright page

• A preface, containing details of related documents and information on how to navigate the
user guide

• A contents page

• A guide on how to use at least the main functions of the system (Text + Screen Shots)

• A troubleshooting section detailing possible errors or problems that may occur, along with
how to fix them

Part 2: Software Engineering


154 15 Project Documentation

• A FAQ (Frequently Asked Questions)

• Where to find further help, and contact details

• A glossary and, for larger documents, an index

15.3 Setup & Distribution


As mentioned earlier we have two categories of software; generics products and customized
products.

If we have a generic product, it is especially important that the customers are able to install the
software you create.

For e.g., web products setup and distribution to the end user computers are not necessary, since
the software is installed on a Web Server and can be accessed through an ordinary web browser.

Installation is about:

• Package the software

• Executable files

• Create installation packages

• InstallShield, etc. (lots of tools available)

• Make it available (nowadays over Internet or on DVD)

• Give the customer turn-key installers, which will:

• Check the system for missing dependencies or drivers etc. (e.g., Your software may
need .NET X.x, etc.)

• Install the software on the system

• Set up any necessary license information, license managers, etc.

Part 2: Software Engineering


16 Software Maintenance
16.1 Introduction
Software Maintenance is about:

• Software has bugs (Bug /Support incidents need to be tracked and followed up -> A good
tool is needed).
• New features are required.
• Circumstances change. Therefore, software is changed. Who changes it?
• Development team broken up, maintenance may be done by different company!
• Repeated change leads to architectural degradation. Old systems may have been degraded
from the start!
• Software rots. Even with no code changes, the systems change, and eventually you can't
compile the software.

Software Maintenance is defined as [12]: “The process of modifying a software system or


component after delivery to correct faults, improve performance or other attributes, or adapt to a
changed environment”.

40-90% of the software life cycle cost is about maintenance.

Examples:

• The Y2K problem


• New versions of the OS require often adjustment to your software
• New requirements and customer needs

We may divide into 2 different types of Maintenance:

• Repair

o Fixing defects/bugs

• Enhancement

o New Requirements

o Change in Design or Implementation (No functional change)

16.2 Categories
155
156 16 Software Maintenance

Again we can divide maintenance into 4 categories:

• Corrective maintenance
• Adaptive maintenance
• Perfective maintenance
• Preventive maintenance

In Figure 16-1 we se an overview of the different software maintenance categories [12].


Figure 16-1: Software Maintenance Categories

In Table 9-1 we the differences between these categories.

Table 16-1: Software Maintenance Overview

Maintenance Description

Corrective Repair of defects relative to existing requirements. These defects are typically
discovered by customers as they start using your software.

Adaptive Adapt your software to changes in the operating environment, e.g., when a
new OS is released or a new version of the hardware. As software systems
evolve, it is very likely that it will occurs changes in the external environment
(OS, hardware, etc.) your software depends on.

Perfective New features based on new user requests. The software must continuously
adapt new needs or your software will become useless.

Preventive Changes in your software to make it easier to maintain. Changes from


Corrective, Adaptive and Perfective makes your software more complex, more
difficult to maintain, etc. Preventive maintenance in form of Refactoring
should be done on a regular basis

Part 2: Software Engineering


157 16 Software Maintenance

While [1] only divide into 3 different categories, see Figure 16-2.


Figure 16-2: Maintenance Categories [1]

Part 2: Software Engineering


Part 3 : Platforms &


Tools
In this part we give an overview of tools used (and needed) in modern software engineering, like
collaboration tools, source code control tools, programming platforms, frameworks and
languages, etc.

158

17 Software Platforms
17.1 Introduction
We have lots of different platforms today, here we will discuss the most common platforms used
today. They are:

• Desktop: We have different Desktop platforms such as Windows, Mac OS X, Linux, etc. In
order to create applications for Windows we can use, e.g., Visual Studio and C#. To create
applications for Mac OS X we can use, e.g., Xcode and Objective-C/Swift. LabVIEW exists for
both Windows, Mac OS X and Linux.
• Mobile: Today we have 3 major Mobile platforms: iOS (iPhone and iPad), Android (running
on different Smartphones and Tablets) and Windows 8 (Tablets)/Windows 8 Phone (Smart
Phones).
• Web: Web applications runs inside a web browser, such as e.g., Internet Explorer, Chrome,
Safari, Opera or Firefox. In the simplest for we can use HTML. For more dynamic web pages
we can use ASP.NET, PHP, JavaScript, AJAX, etc.

Here are some examples:

Desktop

• Windows
• Mac OS
• Linux

Web

• ASP.NET
• PHP
• IIS
• Apache
• HTML
• JavaScript
• AJAX

Mobile Devices

• iOS (iPhone, iPad, iPod)


• Android
• Windows 8

159
160 17 Software Platforms

Server-side

• Databases
• Web Servers

Figure 17-1 shows some advantages and disadvantages with the different Platforms.


Figure 17-1: Advantages/Disadvantages with different Platforms

17.2 Platform Vendors


3 main vendors of such platforms are Microsoft, Apple and Google. They all deliver platforms for
Desktop and Mobile systems, but they have different approaches, see Figure 17-2.


Figure 17-2: Desktop and Mobile platforms Vendors

Part 3: Platforms & Tools


161 17 Software Platforms

17.3 Desktop
On the desktop we have 3 main platforms, namely Windows, Linux and Mac OS X.


Figure 17-3: Desktop Platforms: Windows, Linux and Mac OS X

We have lots of development tools for these platforms, see Figure 17-4: Development Tools
availible for different Desktop PlatformFigure 17-5. These will be discussed more in detailed later.


Figure 17-4: Development Tools availible for different Desktop PlatformFigure 17-5:
Development Tools available for different Desktop Platform

Part 3: Platforms & Tools


162 17 Software Platforms

17.3.1 Windows
Microsoft Windows is a series of graphical interface operating systems developed, marketed, and
sold by Microsoft.


Figure 17-6: Windows Release History

The most popular Windows releases are:

• Windows 3
• Windows 95
• Windows NT
• Windows XP
• Windows 7

In Figure 17-7 we see the first Windows version (Windows 1.0).

Part 3: Platforms & Tools


163 17 Software Platforms


Figure 17-7: Windows 1.0

With Windows Microsoft changes the user experience dramatically, see Figure 17-8.


Figure 17-8: Windows 8

17.3.2 Mac OS X
Mac OS X (Figure 17-9) is developed by Apple Inc. Mac OS X runs only on Mac Computers from
Apple. It is a UNIX-based OS based on NeXT OS (Apple bought NeXT, and Steve Jobs returned to
Apple as CEO) because Apples classic OS from 1984 (the first Macintosh) and later (Mac OS 9) was
lacking behind – they needed a fresh start.

In Mac OS X software can be deployed to Mac App Store for easy installation.

Part 3: Platforms & Tools


164 17 Software Platforms

A popular development platform on Mac OS X is the Xcode IDE and the Objective C programming
language.


Figure 17-9: Mac OS X

The different releases of Mac OS X is named after big cats like Puma, Jaguar, Tiger Leopard, Lion,
see Figure 17-10.


Figure 17-10: Mac OS X Release History

Part 3: Platforms & Tools


165 17 Software Platforms

The Mac OS X 10.9 was called “OS X Mavericks”, so from this version they have stopped using
names from big cats (all the names was taken?).

The latest version is called “OS X El Capitan”, so they have switched from big cats to famous places
in California, USA (Figure 17-11).


Figure 17-11: OS X Yosemite

17.3.3 Linux
Linux is UNIX-like operation system. It is a Free/Open Source software platform. Linus Torvalds is
the founder of the Linux kernel. Linux was originally developed as a free operating system for
Intel x86-based personal computers. It has since been ported to more computer hardware
platforms than any other operating system.

From Figure 17-12 wee see that both Linux and Mac OS X have their origins from the UNIX
platform.

Part 3: Platforms & Tools


166 17 Software Platforms


Figure 17-12: UNIX History

Different Vendors/different versions/distributions, e.g.:

• Fedora
• Red Hat Linux
• SUSE
• Mandriva
• Ubuntu
• etc.

The penguin symbol (Figure 17-13: LinuxFigure 17-14) is typical for Linux.

Part 3: Platforms & Tools


167 17 Software Platforms


Figure 17-13: LinuxFigure 17-14: The Linux Mascot

17.4 Web
Web have become more and more important as a platform for developing software.

Here are some keywords:

• HTML
• JavaScript
• ASP.NET
• PHP
• Internet Information Services (IIS)
• Apache

A Web Browser and HTML are the foundation for web pages. HyperText Markup Language (HTML)
is the main markup language for creating web pages and other information that can be displayed
in a web browser.

In Figure 17-15 we see the typical web architecture, including web browsers, HTML, CSS,
JavaScript and a web server for hosting the web pages.

Part 3: Platforms & Tools


168 17 Software Platforms


Figure 17-15: Web Architecture

In Figure 17-16 we se the triangle of web programming. You cannot create a modern web page
without knowing the basics of HTML, CSS and JavaScript. They are the basic building blocks when
creating web pages.


Figure 17-16: The triangle of Web Programming

HyperText Markup Language (HTML) is the visual appearance of a Web Site. All Web Browser
understand HTML. The latest version is HTML 5. CSS (Cascading Style Sheets) define how to display

Part 3: Platforms & Tools


169 17 Software Platforms

HTML elements. CSS is used to control the style and layout of multiple Web pages all at once.
JavaScript is the programming language of the Web. All modern HTML pages are using JavaScript.

17.4.1 Web Servers


Web Servers are used to host web sites and web pages. The term web server can refer to either
the hardware (the computer) or the software (the computer application) that helps to deliver web
content that can be accessed through the Internet.

The following web servers (software) are very popular today:

• Internet Information Services (IIS) (included with Windows)


• Apache
• Nginx (pronounced "engine x")

See Figure 17-17.


Figure 17-17: Web Server

17.4.2 Web Frameworks


ASP.NET is a web application framework developed by Microsoft to allow programmers to build
dynamic web sites, web applications and web services.

ASP.NET is part of the Visual Studio package.

It was first released in January 2002 with version 1.0 of the .NET Framework, and is the successor
to Microsoft's Active Server Pages (ASP) technology. ASP.NET is built on the Common Language
Runtime (CLR), allowing programmers to write ASP.NET code using any supported .NET language,
such as C# and VB.NET.

Part 3: Platforms & Tools


170 17 Software Platforms

ASP.NET web pages or webpage, known officially as Web Forms], are the main building block for
application development. Web forms are contained in files with an “.aspx” extension.

See Figure 17-18.


Figure 17-18: ASP.NET

For more information about ASP.NET, please see the Tutorial “ASP.NET and Web Programming”
[17].

17.4.3 Web Scripting Languages


A scripting language is a lightweight programming language. JavaScript and PHP is programming
code that can be inserted into HTML pages. JavaScript inserted into HTML pages, can be executed
by all modern web browsers.

JavaScript:

JavaScript is THE scripting language of the Web. JavaScript is used in billions of Web pages to add
functionality, validate forms, communicate with the server, and much more.

Part 3: Platforms & Tools


171 17 Software Platforms

To insert a JavaScript into an HTML page, use the <script> tag. The <script> and </script> tells
where the JavaScript starts and ends. The lines between the <script> and </script> contain the
JavaScript. Below we see an example.

<!DOCTYPE html>
<html>

<head>

<script>

function myFunction()

{

document.getElementById("demo").innerHTML="My First JavaScript Function";

}

</script>

</head>

<body>
<h1>My Web Page</h1>
<p id="demo">A Paragraph</p>
<button type="button" onclick="myFunction()">Try it</button>
</body>

</html>

PHP:

PHP is a server scripting language, and is a powerful tool for making dynamic and interactive Web
pages. PHP is free to use (open source) and it is a widely-used today.

The PHP code is merged between the HTML code, and the PHP code is executed on the web server
and translated to pure HTML syntax. Below we see an example.

<!DOCTYPE html>
<html>
<body>

<h1>My first PHP page</h1>

<?php
echo "Hello World!";
?>

</body>
</html>

Typically, you have a combination of PHP code, HTML and JavaScript on a web page.

PHP runs on different platforms (Windows, Linux, Unix, Mac OS X, etc.) and it is compatible with
almost all web servers used today (Apache, IIS, etc.). PHP has support for a wide range of
databases as well.

17.5 Mobile Devices


Today we have the following Mobile platforms:

Part 3: Platforms & Tools


172 17 Software Platforms

• iPhone/iPad using iOS


• Android
• Windows 8
• Windows Phone

We have several different platforms, but these are the 3 major platforms.

See Figure 17-19.


Figure 17-19: Mobile Platforms

Below we will give a short overview these platforms.

In general we have 2 different kind of apps for mobile devices (Figure 17-20), i.e., we can
distinguish between “native apps” and “web apps”. Web apps are created using HTML 5
technology and runs inside a standard web browser, while native apps are created specifically for
a specific device or platform, such as an iOS device, Android device, etc. If you want to support
more than one platform, you need to develop and maintain one app for each of these platforms.

Different platforms need different programming methods and languages, but native apps provide
better performance and usability compared to web-based apps. Native apps can use APIs that is
provided by the vendor, they have access to built-in sensors, GPS, etc.

Part 3: Platforms & Tools


173 17 Software Platforms


Figure 17-20: Native vs. Web Apps

Web apps are not real applications; they are really websites that, in many ways, look and feel like
native applications, but are not implemented as such. They are run by a browser and typically
written in HTML5. Users first access them as they would access any web page: they navigate to a
special URL and then have the option of “installing” them on their home screen by creating a
bookmark to that page.

Web apps became really popular when HTML5 came around and people realized that they can
obtain native-like–functionality in the browser. Today, as more and more sites use HTML5, the
distinction between web apps and regular web pages has become blurry.

Native Apps vs. Web Apps:

• Native apps live on the device and are accessed through icons on the device home screen.
• Native apps are installed through an application store (such as Google Play or Apple’s App
Store).
• They are developed specifically for one platform, and can take full advantage of all the
device features — they can use the camera, the GPS, the accelerometer, the compass,
contacts list, etc.
• Native apps can use the device’s notification system and can work offline.

17.5.1 iOS
iOS (see Figure 17-21) is a mobile operating system developed and distributed by Apple Inc.
Created in 2007 together with the iPhone. It has been extended to support other Apple devices
such as the iPod touch (2007) and iPad (2010). With iOS 7 and later the OS have gone trough a
large makeover, compared to previous versions.

Part 3: Platforms & Tools


174 17 Software Platforms


Figure 17-21: iOS (left: iOS 6, right: iOS 7)

iOS is derived from OS X, which is the operation system used on Apple Mac computers.

Apps can be downloaded from the App Store. In order to create Apps, you use the Xcode IDE and
the Objective-C or Swift programming language. You need the iOS SDK, which is included with
Xcode.

Xcode is only available for Mac OS X, this means you need a Mac computer in order to create apps
for the iOS platform.

17.5.2 Android
Android (see Figure 17-22) is a Linux-based operating system designed for mobile devices such as
smartphones and tablets. Android is developed by Google.

The first Android phone was sold in 2008.

Part 3: Platforms & Tools


175 17 Software Platforms


Figure 17-22: Android

Android works on hardware from different vendors.

The source code for Android is available under a free and open-source software license, which
means everybody may change it and create their own version of it. Vendors like Samsung, etc. do
this.

You use the Eclipse IDE and the Java programming language to create apps for Android. Apps can
be downloaded from Google Play, Amazon AppStore for Android, etc. Google Play is the official
App Store for Android.

Figure 17-23 gives an overview of the different Android versions:

Part 3: Platforms & Tools


176 17 Software Platforms


Figure 17-23 Android Versions

Notice that all Android versions are named after a dessert, a cake or other sorts of candy. They are
also in alphabetical orders:

• C (Cupcake)
• D (Donut)
• E (Eclair)
• F (Froyo)
• G (Gingerbread)
• H (Honeycomb)
• I (Ice Cream Sandwich)
• J (Jelly Bean)
• K (KitKat) – Android 4.4x
• L (Lollipop) – Android 5.x
• M (Marshmallow) – Android 6


More about Android for Developers here:

Part 3: Platforms & Tools


177 17 Software Platforms

http://developer.android.com/index.html

Here you can get detailed information about Android and download resources, development
tools, etc., including Android Studio, which is thee tool you should use when developing Apps for
the Android platform.

Android Studio is the official IDE for developing Apps for Android, but you may use many others
IDEs as well. Especially, many use the Eclipse software. In that case you need to download and
install the Android SDK Tools.

Figure 17-24 shows data about the relative number of devices running a given version of the
Android platform.


Figure 17-24: Android versions (2015.11.09)

Here you can find more information about the different versions, etc.:

http://developer.android.com/about/dashboards/index.html

Android has become a widely used platform for many different kinds of devices, including
smartphones, tablets, TV’s (Android TV), watches (Android Wear), and even cars (Android Auto).

17.5.3 Windows 8/8.1 and Windows 10


Windows 10 is the newest version of Windows. From version 8, Windows was designed to work on
both ordinary computers as well as tablets. There are 2 main versions of Windows 8.

Part 3: Platforms & Tools


178 17 Software Platforms

• Windows 8 Pro – This version works on both ordinary PCs and tablets. The user interface is
divided into 2 parts; ordinary user interface like Windows 7 and so-called Modern UI
(previously called Metro). Modern GUI (see Figure 17-25) consists of so-called live tiles
• Windows RT – This version works only on tablets. This version uses the ARM architecture.
Windows RT consists of only the Modern UI.


Figure 17-25: Windows 8 Modern UI

Modern UI Apps may be downloaded from Windows Store which is integrated into Windows 8.

In order to create Modern UI Apps, you need to use a Windows 8 computer with the Visual Studio
2012 IDE installed.

In Figure 17-26 we see an overview of the Windows release history, from Windows 1.0 released in
1985 to Windows 8/Windows RT released in 2012.

Part 3: Platforms & Tools


179 17 Software Platforms


Figure 17-26: Windows Release History

17.5.4 Windows Phone


Windows Phone (Figure 17-27) is the new smartphone OS created by Microsoft. Windows Phone
replaces the old Windows Mobile OS.


Figure 17-27: Windows Phone

Windows Phone uses so-called live tiles, as shown in Figure 17-27.

Part 3: Platforms & Tools


180 17 Software Platforms

17.6 Cloud Computing


Cloud computing (Figure 17-28) is the use of computing resources (hardware and software) that
are delivered as a service over a network (typically the Internet)

Examples:

1. Team Foundation Service

2. iCloud

3. Windows Azure

4. Amazon Web Services

5. Google Cloud Platform

6. etc.


Figure 17-28: Cloud Computing (Wikipedia)

Part 3: Platforms & Tools


181 17 Software Platforms

17.7 Open Source


http://en.wikipedia.org/wiki/Open-source_software

Part 3: Platforms & Tools


18 Software Frameworks &


Languages
There exists probably thousands of different programming languages. Each of these programming
languages has good and bad qualities and is preferable in different situations. Some language is
good to use when you need to communicate with a database, while others are good to use when
you want to develop web applications, etc. So in most situations you probably need to know and
use more than one programming language.

In this chapter we will discuss some of the most used (probably) programming languages today.

18.1 Object-Oriented Programming (OOP)


Object-oriented programming (OOP) is a programming language model organized around
"objects" rather than "actions" and data rather than logic. Historically, a program has been viewed
as a logical procedure that takes input data, processes it, and produces output data.

The first step in OOP is to identify all the objects you want to manipulate and how they relate to
each other, an exercise often known as data modeling. Once you've identified an object, you
generalize it as a class of objects and define the kind of data it contains and any logic sequences
that can manipulate it. Each distinct logic sequence is known as a method. A real instance of a
class is called an “object” or an “instance of a class”. The object or class instance is what you run in
the computer. Its methods provide computer instructions and the class object characteristics
provide relevant data. You communicate with objects - and they communicate with each other.

Important features with OOP are:

• Classes and Objects


• Inheritance
• Polymorphism
• Encapsulation

Simula was the first object-oriented programming language. Simula was developed in the 1960s
by Kristen Nygaard from Norway.

Java, Python, C++, Visual Basic .NET and C# are popular OOP languages today.

182
183 18 Software Frameworks & Languages

Since Simula-type objects are reimplemented in C++, Java and C# the influence of Simula is often
understated. The creator of C++ (1979), Bjarne Stroustrup (from Denmark), has acknowledged that
Simula was the greatest influence on him to develop C++.

18.2 Popular Programming Languages



There exist probably thousands of different programming languages today. In Figure 18-1:
Programming LanguagescodeFigure 18-2 we some of them.


Figure 18-1: Programming LanguagescodeFigure 18-2: Programming Languages

Here is a list of some of the most popular programming languages in use today:
Note! The list is in
random order and based on my personal opinion. The list is not necessarily based on data like
"Number of installations", "Number of programmers using it", or "Total number of lines of code",

etc.

• C, C++
• C#
• Java
• Visual Basic
• Perl
• Python
• PHP
• JavaScript
• SQL
• MATLAB
• LabVIEW

Part 3: Platforms & Tools


184 18 Software Frameworks & Languages

Each of these programming languages has good and bad qualities and is preferable in different
situations. Some language is good to use when you need to communicate with a database, while
others are good to use when you want to develop web applications, etc. So in most situations you
probably need to know and use more than one programming language.

Some programming languages are interpreted (“interpreted language”), while others are compiled
(“compiled language”). Compiled languages need to be compiled and transform to “machine
code” before you can run the program. Interpreted languages translate the code step-by-step at
run-time.

Compiled languages are known in general to be faster than interpreted languages. Compiled
languages can also easily be compiled into executable programs that can run on their own, while
interpreted languages normally need to be run inside the development environment.

Visual Basic, C, C++ and C# are typically compiled languages, while Python, PHP, MATLAB are
typically interpreted languages.

Figure 18-3 shows the Top 20 list from RedMonk (this is just on of many similar lists).


Figure 18-3: Popular Programming Languages – Top 20

Below we will give a very short introduction to some of the most popular programming languages.

18.2.1 C
C is a general-purpose computer programming language developed between 1969 and 1973 by
Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system.


Part 3: Platforms & Tools


185 18 Software Frameworks & Languages

C is one of the most popular programming languages of all time and there are very few computer
architectures for which a C compiler does not exist.

C has greatly influenced many other popular programming languages, most notably C++, which
began as an extension to C.
C is a procedural language, i.e. no object-oriented programming. C is a
compiled language.



18.2.2 C++
C++ is a compiled, general-purpose object-oriented programming language. It is regarded as an
intermediate-level language, as it comprises a combination of both high-level and low-level
language features.

It was developed by Bjarne Stroustrup in 1979 as an extension to C.
C++ is one of the most
popular programming languages and its application domains include systems software (such as
Microsoft Windows), application software, device drivers, embedded software, high-performance
server and client applications, and entertainment software such as video games.

Several groups provide both free and proprietary C++ compiler software.



18.2.3 C#
C# is pronounced “see sharp”. C# is an object-oriented programming language and part of the
.NET family from Microsoft. The most recent version is C# 4.5.1 and it is part of Visual Studio
2013.
C# is intended to be a simple, modern, general-purpose, object-oriented programming
language. Its development team is led by Anders Hejlsberg.


C# is very similar to C++ and Java. C# is developed by Microsoft and works only on the Windows
platform.
C# is based on the .NET Framework (pronounced “dot net”).

.NET is a software framework that runs primarily on Microsoft Windows.
The .NET Framework 1.0
and C# 1.0 was released in 2002 as part of Visual Studio .NET 2002.


Visual Studio is the Integrated Development Environment (IDE) you use when programming in C#
and the .NET platform.



“Hello World” C# Example:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

Part 3: Platforms & Tools


186 18 Software Frameworks & Languages

namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)


{

textBox1.Text = "Hello World";

}
}

For an introduction to basic C#, please see [18].


18.2.4 Java
Java is a programming language originally developed by James Gosling at Sun Microsystems (now
owned by Oracle Corporation) and released in 1995 as a core component of Sun Microsystems'
Java platform. The language derives much of its syntax from C and C++ but has a simpler object
model and fewer low-level facilities.


Java is currently one of the most popular programming languages in use, and is widely used from
application software to web applications.
Java applications are typically compiled and it runs on
any Java Virtual Machine (JVM) regardless of the computer architecture. Java is a general-purpose
object-oriented. It is intended to let application developers “write once, run anywhere”.

A common IDE for programming with Java is the Eclipse IDE.
Java and Eclipse are used to create
Android Apps.

Part 3: Platforms & Tools


187 18 Software Frameworks & Languages

18.2.5 Objective-C
Objective-C is a general-purpose, high-level, object-oriented programming language that is based
on the C programming language.

It is the main programming language used by Apple for the OS X and iOS and their respective APIs,
Cocoa and Cocoa Touch.

Originally developed in the early 1980s, it was selected as the main language used by NeXT for its
NeXTSTEP operating system, from which OS X and iOS are derived.

18.2.6 Visual Basic


Visual Basic (VB) is the third-generation event-driven programming language and integrated
development environment (IDE) from Microsoft. The first version appeared in 1991. Visual Basic is
relatively easy to learn and use and it is a good language for beginners.


Visual Basic was derived from BASIC and enables the rapid application development (RAD) of
graphical user interface (GUI) applications, access to databases using Data Access Objects, Remote
Data Objects, or ActiveX Data Objects, and creation of ActiveX controls and objects.

Scripting languages such as VBA (Visual Basic for Applications) and VBScript are syntactically
similar to Visual Basic, but perform differently.


The final release was version 6 in 1998 (VB6). The successor is Visual Basic .NET (now known
simply as Visual Basic).
The .NET Framework 1.0 and Visual Basic .NET 1.0 (VB.NET or just Visual
Basic) was released in 2002 as part of Visual Studio .NET 2002.




18.2.7 Perl
Perl is a high-level, general-purpose, interpreted, dynamic programming language. Perl was
originally developed by Larry Wall in 1987 as a general-purpose Unix scripting language to make
report processing easier. Since then, it has undergone many changes and revisions and become
widely popular amongst programmers.



Part 3: Platforms & Tools


188 18 Software Frameworks & Languages

18.2.8 Python
Python is an interpreted high-level programming language and object-oriented programming and
structured programming are fully supported.
The reference implementation of Python (CPython)
is free and open source software and has a community-based development model. In addition,
Python has alternative implementations.



Python interpreters are available for many operating systems, and Python programs can be
packaged into stand-alone executable code for many systems using various tools.
Guido van
Rossum is the creator of Python (1989).



Python example:

>>> x = int(input("Please enter an integer: "))


Please enter an integer: 42
>>> if x < 0:
... x = 0
... print('Negative changed to zero')
... elif x == 0:
... print('Zero')
... elif x == 1:
... print('Single')
... else:
... print('More')
...
More

Part 3: Platforms & Tools


189 18 Software Frameworks & Languages

18.2.9 PHP
PHP is a general-purpose scripting language originally designed for web development to produce
dynamic web pages (server-side scripting). For this purpose, PHP code is embedded into the HTML
source document and interpreted by a web server which generates the web page document.



PHP can be deployed on most web servers and as a standalone interpreter, on almost every
operating system and platform free of charge.

PHP was originally created by Rasmus Lerdorf in 1995.
PHP is installed on more than 20 million
websites and 1 million web servers including Facebook.
PHP originally stood for “Personal Home
Page”, while it is now said to stand for “PHP: Hypertext Preprocessor”. PHP is a free open source
software.
Some of the contents of this web site is created in PHP.



18.2.10 JavaScript
JavaScript is an object-oriented scripting language that is dynamic, weakly typed. JavaScript is
primarily used in the form of client-side JavaScript, implemented as part of a web browser in order
to provide enhanced user interfaces and dynamic websites.

As in most scripting languages, types are associated with values, not with variables. For example, a
variable x could be bound to a number, then later rebound to a string.
JavaScript uses syntax
influenced by that of C.

JavaScript copies many names and naming conventions from Java, but the two languages are
otherwise unrelated and have very different semantics.
JavaScript was first shipped in 1995.

JavaScript very quickly gained widespread success as a client-side scripting language for web
pages.
JavaScript is officially managed by Mozilla Foundation.



18.2.11 SQL
SQL often referred to as Structured Query Language, is a database computer language designed
for managing data in relational database management systems (RDBMS).

Part 3: Platforms & Tools


190 18 Software Frameworks & Languages

SQL has become he most widely used database language today. All popular Database Systems
supports SQL, such as Oracle, SQL Server, etc.
SQL was developed at IBM by Donald D. Chamberlin
and Raymond F. Boyce in the early 1970s.


SQL Support all kind of CRUD (Create, Read, Update, Delete) operations on database systems.



Example of SQL Syntax:

insert into STUDENT (Name , Number, SchoolId)


values ('John Smith', '100005', 1)

select SchoolId, Name from SCHOOL

select * from SCHOOL where SchoolId > 100

update STUDENT set Name='John Wayne' where StudentId=2

delete from STUDENT where SchoolId=3

For more information about SQL, please see [19] and Chapter 25.

18.2.12 MATLAB
MATLAB (matrix laboratory) is a numerical computing environment and fourth-generation
programming language. Developed by MathWorks, MATLAB allows matrix manipulations, plotting
of functions and data, implementation of algorithms.


MATLAB is intended primarily for numerical computing. MATLAB is widely used in academic and
research institutions, but also in the industry.

MATLAB is an interpreted language. MATLAB is written in C and Java. MATLAB is a weakly


dynamically typed programming language.



In Figure 18-4 we see the MATLAB IDE.

Part 3: Platforms & Tools


191 18 Software Frameworks & Languages


Figure 18-4: MATLAB

For more information about MATLAB, please see [20].

MATLAB Training:

http://home.hit.no/~hansha/?training=matlab

18.2.13 LabVIEW
LabVIEW is a graphical programming language.
LabVIEW (short for Laboratory Virtual
Instrumentation Engineering Workbench) is a platform and development environment for a visual
programming language from National Instruments.


LabVIEW was originally released for the Apple Macintosh in 1986 and it is commonly used for data
acquisition, instrument control, and industrial automation on a variety of platforms including
Microsoft Windows, various versions of UNIX, Linux, and Mac OS X.

Part 3: Platforms & Tools


192 18 Software Frameworks & Languages

In LabVIEW you can create and run executable files. In order to do so you need to have the
LabVIEW Run-time Engine installed on the target computer.
LabVIEW can be extended with
additional modules and Toolkits. LabVIEW MathScript is an add-on which is a miniature version of
MATLAB.

In Figure 18-5 we see a typical LabVIEW Program.


Figure 18-5: LabVIEW Program

For more information about LabVIEW, please see [21].

LabVIEW Training:

http://home.hit.no/~hansha/?training=labview

18.3 Naming Convention


There is different name convention for how to specify your variables, classes and Methods, etc.

Camel notation:

For variables and parameters/arguments we normally use “Camel notation”.

Examples:

string myCar;
int number;
string backColor;

→ In Camel casing the first letter of an identifier is lowercase and the first letter of each
subsequent concatenated word is capitalized.

Part 3: Platforms & Tools


193 18 Software Frameworks & Languages

Pascal notation:

For classes, methods and properties, we normally use “Pascal notation”.

Examples:

class Car
{
void ShowCarColor()
{

}
}

→ In Pascal casing the first letter in the identifier and the first letter of each subsequent
concatenated word are capitalized.

For Namespaces we use Pascal casing and a dot separator.

Examples:

System.Drawing
System.Collections.Generics

Controls:

For controls on your user interface we either use “Pascal notation” or “Hungarian notation”, but
stick to one of them!

Examples:

“Pascal notation”:

LoginName
LoginPassword

“Hungarian notation”:

txtName
txtPassword
lblName
btnCancel

Where “txt” means it is a Text Control, “lbl” a Label Control, “btn” a Button Control, etc.

Acronyms:

Casing of acronyms depends on the length of the acronym. All acronyms are at least two
characters long. If an acronym is exactly two characters, it is considered a short acronym. An
acronym of three or more characters is a long acronym.

In general, you should not use abbreviations or acronyms. These make your names less readable.
Similarly, it is difficult to know when it is safe to assume that an acronym is widely recognized.

Part 3: Platforms & Tools


194 18 Software Frameworks & Languages

But if you must, the rules are as follows:

Short acronym Examples (two characters):

DBRate

A property named DBRate is an example of a short acronym (DB) used as the first word of a Pascal-
cased identifier.

ioChannel

A parameter named ioChannel is an example of a short acronym (IO) used as the first word of a
camel-cased identifier.

Long acronym Examples (three or more characters):

XmlWriter

A class named XmlWriter is an example of a long acronym used as the first word of a Pascal-cased
identifier.

htmlReader

A parameter named htmlReader is an example of a long acronym used as the first word of a
camel-cased identifier.

18.4 Defensive Programming


In programming error and exception handling is very important. C# has built-in and ready to use
mechanism to handle this. This mechanism is based on the keywords try, catch, throw and finally.

Exceptions are unforeseen errors that happen in your programs. Most of the time, you can, and
should, detect and handle program errors in your code. For example, validating user input,
checking for null objects, and verifying the values returned from methods are what you expect, are
all examples of good standard error handling that you should be doing all the time.

However, there are times when you don't know if an error will occur. For example, you can't
predict when you'll receive a file I/O error, run out of system memory, or encounter a database
error. These things are generally unlikely, but they could still happen and you want to be able to
deal with them when they do occur. This is where exception handling comes in.

18.4.1 Error Handling


Error handling is an important part of the coding process, to make the applications robust when
some unexpected things happens.

Part 3: Platforms & Tools


195 18 Software Frameworks & Languages

Exception Handling:

When exceptions occur, they are said to be “thrown”. C# uses the keywords try, catch, throw and
finally. It works like this: A method will try to execute a piece of code. If the code detects a
problem, it will throw an error indication, which your code can catch, and no matter what
happens, it finally executes a special code block at the end.

The syntax in C# is as follows:

MyMethod()
{

try
{
... //Do Something that can cause an Exception
}
catch
{
... //Handle Exceptions
}

finally
{
... //Clean Up
}

Example:

public void WriteDaqData(double analogDataOut)


{

Task analogOutTask = new Task();

AOChannel myAOChannel;

try
{

myAOChannel = analogOutTask.AOChannels.CreateVoltageChannel(
aoChannel,
"myAOChannel",
0,
5,
AOVoltageUnits.Volts
);

AnalogSingleChannelWriter writer = new


AnalogSingleChannelWriter(analogOutTask.Stream);

writer.WriteSingleSample(true, analogDataOut);
}
catch (Exception e)
{
string errorMessage;

errorMessage = e.Message.ToString();

Part 3: Platforms & Tools


196 18 Software Frameworks & Languages

finally
{
analogOutTask.Stop();
}

18.5 Software Frameworks


Some popular software frameworks are:

• .NET Framework
• WPF (Windows Presentation Foundation)
• Silverlight (obsolete, but still in use many places)
• etc.

They will be discussed in more details below.

18.5.1 .NET Framework


The .NET Framework (pronounced “dot net”) is a software framework that runs primarily on
Microsoft Windows. It includes a large library and supports several programming languages which
allow language interoperability (each language can use code written in other languages). The .NET
library is available to all the programming languages that .NET supports. Programs written for the
.NET Framework execute in a software environment, known as the Common Language Runtime
(CLR), an application virtual machine that provides important services such as security, memory
management, and exception handling. The class library and the CLR together constitute the .NET
Framework.

18.5.2 WPF
Developed by Microsoft, the Windows Presentation Foundation (or WPF) is a computer-software
graphical subsystem for rendering user interfaces in Windows-based applications. WPF is part of
the .NET Framework

WPF is intended to take over for the traditional Windows Forms.

The graphical user interface in WPF is designed using XAML (Extensible Application Markup
Language). Following the success of markup languages for web development, WPF introduces a
new language known as eXtensible Application Markup Language (XAML), which is based on XML.
XAML is designed as a more efficient method of developing application user interfaces

Part 3: Platforms & Tools


197 18 Software Frameworks & Languages

WinForms vs. WPF:

• WPF is the successor to Windows Forms


• Windows Forms is basically "dead" technology - it's maintained, but it's no longer
improved.
• WPF does not rely on Win32
• In addition to a Graphical Designer, the GUI can be created in a XML based language called
XAML (Extensible Application Markup Language)
• WPF is more flexible
• Both ASP.NET and Windows 8/Windows Store Apps use the same approach as WPF
• Visual Studio is actually created using WPF!

In Figure 18-6 we see the WPF Project Template in Visual Studio.


Figure 18-6: The WPF Project Template in Visual Studio

In Figure 18-7 we see an example of a WPF application in Visual Studio. In addition to the graphical
designer we are able to create and modify the GUI using XAML.

Part 3: Platforms & Tools


198 18 Software Frameworks & Languages


Figure 18-7: Creating WPF Apps in Visual Studio

18.5.3 Silverlight
Microsoft Silverlight is an application framework for writing and running browser plug-ins or other
rich internet applications, with features and purposes similar to those of Adobe Flash. The run-
time environment for Silverlight is available as a plug-in for most web browsers. Silverlight is also
one of the two application development platforms for Windows Phone 7/8.

Silverlight is based on WPF, so in Silverlight applications, user interfaces are declared in Extensible
Application Markup Language (XAML) and programmed using a subset of the .NET Framework.

Part 3: Platforms & Tools


19 Software Architecture
When creating software, we use different architecture depending on the platform and the
purpose with the software.

In this document we will focus on client-server, 3-tier architecture and creating and using Web
Services and APIs.


Figure 19-1: Software Architecture

In Figure 19-2 we see how a typical software application is interacting with the surrounding
environments, such as the users of the software and the underlying operating system (which is
also software) and hardware.

199
200 19 Software Architecture


Figure 19-2. Software Interaction with the Environment

Based on the fundamental interaction between the software and the environments we have
different kinds of software architecture.

Software Architecture Examples:

• Client – Server
• n-tier architecture, 3-tier architecture
• Model-View-Controller (MVC)
• Web Services
• Interfaces
• APIs

In Figure 19-3: Network/Software Architecure ExamplesFigure 19-4 we see some examples of


different network and software architecture typically used in software development.

Part 3: Platforms & Tools


201 19 Software Architecture


Figure 19-3: Network/Software Architecure ExamplesFigure 19-4: Network/Software
Architecture Examples

19.1 API
API - Application Programming Interface. An API is a specification of how some software
components should interact with each other. Typically, it is a library with functions, etc. you can
use in your code.

Examples:

• Windows API
• Java API

But you can also create your own API that you use internally in the team or expose to others

Creating APIs is good practice and makes it easy to reuse your code in other components or
applications. If all the developers in the team create the same code without thinking of reusing
code from others or create code in such manners it can’t be used by others, the software project is
doomed to fail.

Software Design without APIs [22]:

Part 3: Platforms & Tools


202 19 Software Architecture

Here are some pros and cons:

Pros:

• Fast to implement in small projects.

• Agile – can serve as a starting point for API design.

• No need to consider how code interfaces with other software.

• Can be appropriate for small “dead end” projects.

Cons:

• Inappropriate for large projects.

• Code has a limited (as opposed to general) functionality.

• Code is not reusable.

• Code is hard to maintain/modify.

• Prone to errors and bugs.

Why a Good API is hard to Design?

Here are some examples:

• Forces designer to anticipate future usage of code.

• Requirements are incomplete (may never be complete).

• Requires abstraction.

• Requires modularization.

• Requires skills in programming languages.

• Requires code rewrites – time consuming and labor intensive.

Part 3: Platforms & Tools


203 19 Software Architecture


When an API is used in a project, it

• Allows to focus on the project.

• Saves development time.

• Reduces errors and debugging.

• Facilitates modular design.

• Provides a consistent development platform.

API driven design requires planning and programming skills. API driven design is costly initially, but
it pays in the long run. So, obviously, creating APIs is good software practice in most cases.

It is impossible to imagine how anyone would design a car today without taking advantage of
existing modules or vehicle subsystems – it is the same with software!

19.2 Client-Server
Client/server describes the relationship between two computer programs in which one program,
the client, makes a service request from another program, the server, which fulfills the request.
Although the client/server idea can be used by programs within a single computer, it is a more
important idea in a network. In a network, the client/server model provides a convenient way to
interconnect programs that are distributed efficiently across different locations.

Part 3: Platforms & Tools


204 19 Software Architecture

19.3 Web Services


The “problem”: How do we share data between different devices in a network (see Figure 19-5)?


Figure 19-5: Data sharing between devices in a network

Direct connection between the database and the clients that need the data is normally not
possible, due to security, compatibility issues, etc. (firewalls, hacker attacks, etc.). Direct
connection in a local network (behind the firewall) is normally OK – but not over the Internet (see
Figure 19-6: Limited acces to the database in a networkFigure 19-7).


Figure 19-6: Limited acces to the database in a networkFigure 19-7: Limited Access to the
Database in a Network

The solution: Web Services. Web Services uses standard web protocols like HTTP, etc. HTTP is
supported by all Web Browser, Servers and many Programming Languages.

Part 3: Platforms & Tools


205 19 Software Architecture

Today Web Services have been very popular. A Web service is a method of communications
between two devices over the World Wide Web, and makes it easy to share data over a network
or the internet.

A Web Service is

• A Web API
• A Standard defined by W3C
• Cross-platform and Platform-independent Communication
• Distributed Application Development

Web Services can be implemented and used in most Programming Languages (C#/ASP.NET, PHP,
LabVIEW, Objective-C, Java, etc.)

Web Services uses standard Web technology (Web protocols) such as HTTP, REST, SOAP, XML,
WSDL, JSON, etc.


Figure 19-8: Web Services

Web Services technology used in Web Services:

• HTTP - Hypertext Transfer Protocol

• XML – Extensible Markup Language

• WSDL - Web Services Description Language

• SOAP - Simple Object Access Protocol

• REST - Representational State Transfer

(we will not go into details)

A Web Service is typically deployed on a web server, similiar as ordinary web pages, see Figure
19-9.

Part 3: Platforms & Tools


206 19 Software Architecture


Figure 19-9: Web Service Infrastructure

We have 2 different types of Web Services:

• Web Services 1.0: SOAP Web Services

“Complex”

• Web Services 2.0: REST Web Services

• Lightweight and Flexible

• A new and simpler version of WS

• All major WS on the Internet today use REST

In Figure 19-10 we summarize Web Services 1.0 vs. 2.0.

Part 3: Platforms & Tools


207 19 Software Architecture


Figure 19-10: Different kind of Web Services

This document only describes the basic principles of Web Services. For practical code examples,
see the Tutorial “Introduction to Web Services” [23].

19.3.1 SOAP Web Services


In Figure 19-11 we see the different “layers” a “SOAP Web Service” consists of.


Figure 19-11: SOAP Web Services Architecture

XML:

XML stands for eXtensible Markup Language. XML is designed to transport and store data.

Below we see an XML document example.

Part 3: Platforms & Tools


208 19 Software Architecture

<?xml version="1.0"?>
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>

19.3.2 REST Web Services


In Figure 19-12 we see the different “layers” a “REST Web Service” consists of.


Figure 19-12: REST Web Services Architecture

19.3.3 Creating Web Services with Visual Studio


Visual Studio has powerful features for creating Web Services (Figure 19-13).

3 ways to do it:

• ASMX Web Service (Traditional Web Service using SOAP)


• WCF Service: A general approach used to create all kind of communication including web
services, both SOAP and REST
• ASP.NET Web API (The modern Web Service using REST, Web 2.0)

Part 3: Platforms & Tools


209 19 Software Architecture


Figure 19-13: Creating Web Services using Visual Studio and ASP.NET

Below we see an example of a Web Service created with Visual Studio and ASP.NET:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;

namespace CalculatorWS
{
/// <summary>
/// Summary description for CalculatorWS
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]

// [System.Web.Script.Services.ScriptService]
public class CalculatorWS : System.Web.Services.WebService
{

[WebMethod]
public string HelloWorld()
{
return "Hello World";
}

[WebMethod]

Part 3: Platforms & Tools


210 19 Software Architecture

public double Add(double a, double b)


{
return a + b;
}

[WebMethod]
public double Substract(double a, double b)
{
return a - b;
}

[WebMethod]
public double Multiply(double a, double b)
{
return a * b;
}

[WebMethod]
public double Divide(double a, double b)
{
return a / b;
}
}
}

A Web Service can be accessed through a web browser (see Figure 19-14) or other clients.


Figure 19-14: Web Service Example

A Web Service is typically hosted on a web server, e.g., IIS (Internet Information Services).

Part 3: Platforms & Tools


211 19 Software Architecture


Figure 19-15: Web Service hosted in IIS

In order to use a Web Service we need to add a Service Reference to the project where we want to
consume or use the Web Service (see Figure 19-16).

Part 3: Platforms & Tools


212 19 Software Architecture


Figure 19-16: Add Web Service Reference in Visual Studio

Then we can consume the Web Service like this

CalculatorWS.CalculatorWSSoapClient myWS = new CalculatorWS.CalculatorWSSoapClient();

MessageBox.Show(myWS.HelloWorld());

In this simple example we just called the “HelloWorld” Web Service Method.

19.4 3-tier Architecture


In general, we have so-called n-tier architecture, but the most common is version is a 3-tier
architecture.

3-tier architecture is a client-server architecture in which the functional process logic, data access,
computer data storage and user interface are developed and maintained as independent modules
on separate platforms. Three-tier architecture is a software design pattern and a well-established
software architecture. Its three tiers are the presentation tier, application tier and data tier.

The 3 tiers or layers are as follows:

• Presentation Layer
• Business/Application Layer

Part 3: Platforms & Tools


213 19 Software Architecture

• Data Access Layer

These layers may be on the same computer, but normally they are distributed on different
computers.


Figure 19-17: Software Architecture

A short description of the different layers:

Presentation Tier:

This is the topmost level of the application. The presentation tier displays information related to
such services as browsing merchandise, purchasing and shopping cart contents. It communicates
with other tiers by which it puts out the results to the browser/client tier and all other tiers in the
network.

In simple terms it is a layer which users can access directly such as a web page, or an operating
systems GUI

Application tier:

(Other terms used: Business logic, logic tier, data access tier, or middle tier) The application tier is
pulled out from the presentation tier and, as its own layer. It controls an application’s
functionality by performing detailed processing.

Data tier:

Part 3: Platforms & Tools


214 19 Software Architecture

This tier consists of database servers. Here information is stored and retrieved. This tier keeps data
neutral and independent from application servers or business logic. Giving data its own tier also
improves scalability and performance.

Figure 19-18 shows a sketch of the typical logical layers or tiers in a 3-tier/layer architecture.


Figure 19-18: 3-tier Architecture

Figure 19-19 gives an overview of the 3-tier architecture and gives a short description of the
different layers.

In the web development, 3-tier is often common, including the following

• A Web Server
• An Application Server
• A Database

Web Services could be used for communication between the different layers.

Part 3: Platforms & Tools


215 19 Software Architecture


Figure 19-19: 3-tier Overview

In Figure 19-20 we see an example of 3-layer architecture software.

Part 3: Platforms & Tools


216 19 Software Architecture


Figure 19-20: Example of 3-layer Architecture Software

Part 3: Platforms & Tools


20 Integrated Development
Environment (IDE)
What is an IDE? What is the difference between an IDE and a Programming Language?

Popular IDEs:

• Visual Studio
• Xcode
• Eclipse
• Android Studio

20.1 Visual Studio


Microsoft Visual Studio (see Figure 20-1) is an integrated development environment (IDE) from
Microsoft.


Figure 20-1: Visual Studio

217
218 20 Integrated Development Environment (IDE)

It can be used to develop console and graphical user interface applications along with Windows
Forms applications, web sites, web applications, and web services in both native code together
with managed code for all platforms supported by Microsoft Windows, Windows Phone, Windows
CE, .NET Framework, .NET Compact Framework and Microsoft Silverlight.

For more information about Visual Studio and C#, see [18].

20.2 Xcode
Xcode (see Figure 20-2) is the IDE created by Apple for developing software for Mac OS X and the
iOS platform (iPhone, iPad).

He programming languages used within the Xcode environment is Objective-C.

Objective-C is a general-purpose, high-level, object-oriented programming language that is based


on the C programming language.

It is the main programming language used by Apple for the OS X and iOS and their respective APIs,
Cocoa and Cocoa Touch. Actually Apple released a new programming language, called Swift. Swift
has now replaced Objective-C as the official language for iOS and Mac programming.

Originally developed in the early 1980s, it was selected as the main language used by NeXT for its
NeXTSTEP operating system, from which OS X and iOS are derived.


Figure 20-2: Xcode

Part 3: Platforms & Tools


219 20 Integrated Development Environment (IDE)

20.3 Eclipse
Eclipse (see Figure 20-3) is a multi-language Integrated Development Environment (IDE). It is
written mostly in Java. It can be used to develop applications in Java, C, C++, JavaScript, Perl, PHP,
Python, Ruby, etc.


Figure 20-3: Eclipse

Eclipse is the main IDE used for Android programming. Then you will need the Android SDK plug-
in.

Eclipse is available on Windows, Mac and Linux.

20.4 Android Studio


Google has released a new IDE for Android development called Android Studio (see Figure 20-4). It
is created to make it easier to develop Android Apps.

Android Studio is available on Windows, Mac and Linux.

Part 3: Platforms & Tools


220 20 Integrated Development Environment (IDE)


Figure 20-4: Android Studio

Part 3: Platforms & Tools


21 UML Software
There exists hundreds of different software for creating UML diagrams, here we mention just a
few:

• Visio
• Enterprise Architect
• Visual Studio (Enterprise)
• StarUML
• Rational Rose
• etc.

We will focus on Visio and Visual Studio Ultimate.

21.1 Visio
In Figure 21-1 we see the available UML diagram in Visio.


Figure 21-1: UML Diagrams in Visio

221
222 21 UML Software

21.2 Visual Studio (Enterprise)


In Figure 21-2 we see the available UML diagram in Visual Studio Enterprise.


Figure 21-2: UML Diagrams in Visual Studio Ultimate

Part 3: Platforms & Tools


22 Source Code Control (SCC)


22.1 Introduction
What is it Source Code Control (SCC) or a version control system? A version control system keeps
track of all work and all changes in a set of files. It Allows several developers (potentially widely
separated in space and time) to collaborate.

In this chapter we will give a short overview of some of the most popular source code control
(SCC) systems on the market today.

Here are a list with some of the most popular SCC systems on the market today:

• Team Foundation Server (TFS)


• CVS
• SVN (Subversion)
• Git
• Mercurial
• Bazaar
• LibreSource
• Monotone
• BitKeeper

The main focus will be on Team Foundation Server from Microsoft because this software is tightly
connected to Visual Studio. In addition, it has lots of other features in addition to SCC.

Typical SCC Features:

• Checkout, Checkin/Commit
• Branching, Merging
• File Locking (avoid concurrent access)
• Label/Tag
• Change/Change List
• Conflict
• Revision, Iteration

We hav to main kinds of SCC systems:

• Centralized/client–server architecture
• Distibuted Version Control System (DVCS)

223
224 22 Source Code Control (SCC)

In Figure 22-1 we see an overview of which architecture the different SCC systems are using.


Figure 22-1: SCC Architecture

Centralized/Client–Server architecture:

A server stores the current version(s) of a project and its history, and clients connect to the server
in order to “check out” a complete copy of the project, work on this copy and then later “check in”
their changes.

Distributed Version Control System (DVCS):

With a distributed version control system, there isn’t one centralized code base to pull the code
from. Different branches hold different parts of the code. Git is a DVCS. Other version control
systems, such as SVN and CVS, use centralized version control, meaning that only one master copy
of the software is used. DVCS systems use a peer-to-peer approach.

In some cases, the SCC system is integrated in a so-called Application Lifecycle Management
system.

Application Lifecycle Management (ALM) systems are systems that take care of all aspects in
software development from planning, requirements, coding, testing, deployment and
maintenance.

ALM is short for Application Lifecycle Management. An ALM tool typically facilitate and integrate
things like:

• Requirements Management

Part 3: Platforms & Tools


225 22 Source Code Control (SCC)

• Architecture
• Coding
• Testing
• Bug Tracking
• Release Management
• etc.

22.2 Team Foundation Server


Team Foundation Server (TFS) is an Application Lifecycle Management (ALM) system, i.e., the
system takes care of all aspects in software development from planning, requirements, coding,
testing, deployment and maintenance.

Team Foundation Server is a separate server product designed specifically for software
engineering teams with developers, testers, architects, project managers, etc.

TFS is a Source Code Control (SCC), Bug Tracking, Project Management, and Team Collaboration
platform. TFS is tightly integrated with Visual Studio as Microsoft is the vendor of both Visual
Studio and TFS. For more information, see [24].

Here are some main features:

• SDLC Management (SDLC – Software Development Life Cycle)


• Software Team Collaboration
• Source Code Management
• Supports Agile, Scrum, CMMI
• Integrated Test Tools
• Automated Builds
• Built in Team Foundation Version Control (TSVC) + Support for Git repositories
• Built-in support for TFS in Visual Studio (Team Explorer)
• Plug-in for Eclipse (Team Explorer Everywhere)
• MSSCCI Provider for other IDEs like LabVIEW
• etc.

we will go through TFS in more detail in a later chapter.

22.3 SVN
SVN or Subversion uses an Open Source License. SVN was established in 2000. Subversion is
probably the version control system with the widest adoption today. Many different Subversion
clients are available (Tortoise SVN, Mac: Versions, Xcode (built-in support for SVN)).

Part 3: Platforms & Tools


226 22 Source Code Control (SCC)

SVN uses a Centralized/Client–Server architecture.

22.4 CVS
CVS, or Concurrent Versions System was established between 1986-1990. It is free of charge. CVS
uses a client–server architecture. It is widely supported in different IDEs (Eclipse, Xcode, etc.).

22.5 Git
Git has become very popular today. Git is a Distributed Version Control System (DVCS). It was
initially designed and developed by Linus Torvalds (Linux Guru) in 2005. Git is free of use.

22.6 Others
Above we have discussed the most popular SCC systems today. Here are some others systems as
well:

• Mercurial
• Bazaar
• LibreSource
• Monotone
• BitKeeper

Look them up if you are interested!

22.7 Cloud-based SCC Hosting Services


For those who don’t want to install their own SCC repository in their own network, can use the
services in the cloud, either for free or for monthly payments.

Below we list some popular SCC hosting services:

• Visual Studio Team Services (formerly known as Visual Studio Online/Team Foundation
Services)
• GitHub
• Bitbucket

22.7.1 Visual Studio Team Services (VSTS)

Part 3: Platforms & Tools


227 22 Source Code Control (SCC)

Visual Studio Team Services (VSTS) is an online SCC hosting service based on the Team Foundation
Server (TFS) platform.

You can either use the built-in SCC repository (called TFVC) or a Git repository.

You can use this solution for free for up to 5 users, then you need to pay a monthly fee for
additional users.

Web site: www.visualstudio.com

22.7.2 GitHub
GitHub uses (as the name says) a Git repository.

Web site: www.github.com

22.7.3 Bitbucket
With Bitbucket you can either use a Mercurial or a Git repository. It is free to use for 5 users.

Web Site: www.bitbucket.org

Part 3: Platforms & Tools


23 Bug Tracking Systems


A software bug is an error, flaw, failure, or fault in a computer program or system that produces
an incorrect or unexpected result, or causes it to behave in unintended ways

They found a bug (actually a moth) inside a computer in 1947 that made the program not
behaving as expected. This was the “first” real bug.

A “bug tracking system” or “defect tracking system” is a software application that is designed to
help keep track of reported software bugs in software development efforts.

Having a bug tracking system is extremely valuable in software development, and they are used
extensively by companies developing software products.


Here are some popular Bug Tracking Systems in use today:

• Team Foundation Server


• Jira
• Bugzilla
• Clearquest

We will focus on Team Foundation Server in this document. The bug tracking features in TFS will
be discussed in chapter 24 - Team Foundation Server (TFS).

228

24 Team Foundation Server


(TFS)
Team Foundation Server (TFS) is an Application Lifecycle Management (ALM) system, i.e., the
system takes care of all aspects in software development from planning, requirements, coding,
testing, deployment and maintenance.

Team Foundation Server is a separate server product designed specifically for software
engineering teams with developers, testers, architects, project managers, etc.

TFS (see Figure 24-1) is a Source Code Control (SCC), Bug Tracking, Project Management, and Team
Collaboration platform. TFS is tightly integrated with Visual Studio as Microsoft is the vendor of
both Visual Studio and TFS. For more information, see [24].


Figure 24-1: Team Foundation Server (TFS)

Here are some main features:

229
230 24 Team Foundation Server (TFS)

• SDLC Management (SDLC – Software Development Life Cycle)


• Software Team Collaboration
• Source Code Management
• Supports Agile, Scrum, CMMI
• Integrated Test Tools
• Automated Builds
• Built in Team Foundation Version Control (TSVC) + Support for Git repositories
• Built-in support for TFS in Visual Studio (Team Explorer)
• Plug-in for Eclipse (Team Explorer Everywhere)
• MSSCCI Provider for other IDEs like LabVIEW
• etc.

The following diagram (Figure 24-2) demonstrates that team members on different platforms can
collaborate by using Team Foundation Server.


Figure 24-2: TFS Everywhere

TFS has plenty of competitors. The main benefit with TFS is that all the systems mentioned above
is integrated in one package, normally you would need a lots of different software for this.

TFS is something you install on a server, but to get access to the functionality there exists different
kinds of client tools (see also Figure 24-3):

• Team Explorer (integrated with Visual Studio)


• MS Excel Add-in (part of Team Explorer installation)

Part 3: Platforms & Tools


231 24 Team Foundation Server (TFS)

• MS Project Add-in (part of Team Explorer installation)


• Windows Explorer Integration (part of Power Tools). Very useful when working with Team
Foundation Server outside of Visual Studio or Eclipse
• TFS MSSCCI Provider (makes it possible to use TFS within tools that do not support TFS,
such as e.g., LabVIEW, SQL Server, etc.)
• Team Explorer Everywhere
• 3.party software that integrates with TFS (using available web services)


Figure 24-3: Team Foundation Server - Client Tools

24.1 Source Code Control (SCC)


With TFS you may use different source code repositories:

1. TFVC: Team Foundation Version Control (TFVC) uses a single, centralized server repository
to track and version files. Local changes are always checked in to the central server where
other developers can get the latest changes.
2. Git: Git is a Distributed Version Control System (DVCS) that uses a local repository to track
and version files. Changes are shared with other developers by pushing and pulling changes
through a remote, shared repository.

Part 3: Platforms & Tools


232 24 Team Foundation Server (TFS)

We will focus on TFVC, since this is the default choice within TFS. Before you start adding code or
other documents to your repository, it is a good idea to create a proper folder structure. Open
Visual Studio and connect to your TFS, then open the Team Explorer. From the Team Explorer,
select the Source Control Explorer (see Figure 24-4).


Figure 24-4: Start by creating a proper folder structure within your new TFS project

24.2 Areas and Iterations


Figure 24-5 shows an example of different Areas in TFS. The different software modules could be
divided into different Areas.


Figure 24-5: TFS Areas

Part 3: Platforms & Tools


233 24 Team Foundation Server (TFS)

Figure 24-6 shows an example of different Iterations in TFS. We can create Iterations for the
different releases/milestones, such as Alpha, Beta1, 2, 3, RC, RTM.


Figure 24-6: TFS Iterations

24.3 Work Items


Work Items (Figure 24-7) are an important part of TFS. You may use Work Items to register your
requirements, user stories, bugs, tasks, etc.

Part 3: Platforms & Tools


234 24 Team Foundation Server (TFS)


Figure 24-7: Work Items in TFS

In TFS you can create different Work Items, such as:

• Task
• Bug
• Feature
• Scenario
• Issue
• User Story
• Test Case
• etc.

These Work Items will be used at different level in your development cycle. When the Testers
reports bugs, they will, e.g., use the “Bug” Work Item, etc.

In Figure 24-8 we sww how we can enter new Work Items using the Work Item Editor.

Part 3: Platforms & Tools


235 24 Team Foundation Server (TFS)


Figure 24-8: Work Item – New Bug

24.3.1 Queries
Queries are used to find existing Work Items. You may create different Queries to make it easy
to find the Work Items you need. Queries may be personal or visible for everybody in the project

You can use the Query Editor (Figure 24-9) in order to tailoring your own queries.


Figure 24-9: Query Editor

Part 3: Platforms & Tools


236 24 Team Foundation Server (TFS)

24.4 Taskboard
In Agile development and Scrum the Taskboard feature (Figure 24-10) is very useful.


Figure 24-10: Taskboard

24.5 Visual Studio Team Services (VSTS)


Visual Studio Team Services, formerly named “Visual Studio Online”/“Team Foundation Service”
(Figure 24-11) is a cloud based version of Team Foundation Server. It is free to use for up to 5
users and it is a good choice for small teams that don’t want to install and maintain a local Team
Foundation Server installation. It is also handy for personal use or students.

Visual Studio Team Services is located here: http://visualstudio.com

Part 3: Platforms & Tools


237 24 Team Foundation Server (TFS)


Figure 24-11: Visual Studio Team Services

Getting started with Visual Studio Team Services:

• Goto http://visualstudio.com
• Create an Account (You need a Windows Live ID) and specify an URL for your account
• Create a New Team Project
• You are ready to start
o Connect to Team Foundation Service from Visual Studio (similar as connection to a
Team Foundation Server)
o Or use the Web based interface provided (except for SCC)
• Assign Team members
• Add Areas, Iterations, etc.
• Add your Source Code
• Check-in/Check-out your code

Figure 24-12 shows the startup screen in Visual Studio Online.


Figure 24-12: Visual Studio Online – Getting Started

Part 3: Platforms & Tools


238 24 Team Foundation Server (TFS)

When creating a New Team Project we can select between different templates, see Figure 24-13,
such as Agile Development and Scrum Development.


Figure 24-13: New Team Project - Templates

When we have created a new Project (or clicked on an existing Project) the following web page
appears (Figure 24-14):

Part 3: Platforms & Tools


239 24 Team Foundation Server (TFS)


Figure 24-14: Visual Studio Team Services – Project Home Page

24.6 Client Tools


When you use the different client tools, it doesn’t matter if you use the Team Foundation Server
or Visual Studio Online.

Below we give an overview of the different client tools available for Team Foundation Server:

• Team Explorer (integrated with Visual Studio)


• MS Excel Add-in (part of Team Explorer installation)
• MS Project Add-in (part of Team Explorer installation)
• Windows Explorer Integration (part of Power Tools)
Very useful when working with Team Foundation Server outside of Visual Studio or Eclipse
• TFS MSSCCI Provider (makes it possible to use TFS within tools that do not support TFS,
such as e.g., LabVIEW, SQL Server, etc.)
• Team Explorer Everywhere
• 3.party software that integrates with TFS (using available web services)

24.6.1 Team Explorer

Part 3: Platforms & Tools


240 24 Team Foundation Server (TFS)

Team Explorer is integrated with Visual Studio. In Figure 24-15 we see Visual Studio with Team
Explorer. In addition to Team Explorer we have the Source Control Explorer, which is handy when
we want to make a good structure, create folders, etc. We can check-in and check-out files using
the Source Control Explorer.


Figure 24-15: Visual Studio with Team Explorer

The process of check-in and check-out files can also be done from the Solution Explorer in Visual
Studio (see Figure 24-16).

Part 3: Platforms & Tools


241 24 Team Foundation Server (TFS)


Figure 24-16: Visual Studio and Solution Explorer

24.6.2 MS Excel Add-in


MS Excel Add-in (see Figure 24-17) is part of the Team Explorer installation.


Figure 24-17: MS Excel Add-in for TFS

24.6.3 MS Project Add-in


MS Project Add-in is part of the Team Explorer installation.

Part 3: Platforms & Tools


242 24 Team Foundation Server (TFS)

24.6.4 Windows Explorer Integration


The Windows Explorer integration (see Figure 24-18) is part of “TFS Power Tools”. Very useful
when working with Team Foundation Server outside of Visual Studio or Eclipse, etc.


Figure 24-18: Windows Explorer Integration in TFS

24.6.5 TFS MSSCCI Provider


The TFS MSSCCI Provider makes it possible to use TFS within tools that do not support TFS, such as
e.g., LabVIEW, SQL Server, etc.

Part 3: Platforms & Tools


243 24 Team Foundation Server (TFS)


Figure 24-19: TFS MSSCCI used together with LabVIEW

In LabVIEW we select Tools è Options in order to configure the TFS MSSCCI Provider for use
within the LabVIEW environment, then select the “Source Control” tab (see Figure 24-20). If you
have installed the TFS MSSCCI Provider properly you should be able to find it in the list of available
providers.


Figure 24-20: Configuration of TFS MSSCCI Provider in LabVIEW

24.6.6 Team Explorer Everywhere


3.party software that integrates with TFS (using available web services)

Part 3: Platforms & Tools


244 24 Team Foundation Server (TFS)

24.7 Agile (Scrum) Development in TFS


TFS has built-in Templates for Agile Development and Scrum.

We have the Product Backlog and the Sprint Backlog features (see Figure 24-21).


Figure 24-21: Product Backlog and Sprint Backlog in TFS

We also have a digital Taskboard available, see Figure 24-22.


Figure 24-22: Using a Taskboard in TFS

Part 3: Platforms & Tools


245 24 Team Foundation Server (TFS)

24.7.1 Product Backlog Items in TFS


In order to create the Product Backlog, we can add them in TFS as so-called Work Items. If you use
the Agile/Scrum templates a predefined Work Item Type “Product Backlog Item” is used for this
purpose.


Figure 24-23: Create the Product Backlog in TFS

You may also group the items in the Product Backlog into “Features”.

24.7.2 Sprint Backlog Items in TFS


In order to create the Sprint Backlog, you just drag them to the proper Iteration.


Figure 24-24: Create the Sprint Backlog in TFS

Part 3: Platforms & Tools


246 24 Team Foundation Server (TFS)

In order to make that happen, you need to configure the different sprints as “Iterations” in TFS
(Figure 24-25). You also need to right-click and select “Set as Teams Backlog iteration”.


Figure 24-25: Configure Iterations and Sprints in TFS

Break Sprint Backlog Items down into Tasks:

Finally, you break the Sprint Backlog Items into Tasks. In the Sprint Backlog click the sign in
order to add Tasks to the specific Backlog Item (see Figure 24-26).


Figure 24-26: Break Sprint Backlog Items down into Tasks

Then give the Task a name, and estimate the work it will take (Remaining Work).

The final results may look something like this (Figure 24-27):

Part 3: Platforms & Tools


247 24 Team Foundation Server (TFS)


Figure 24-27: The Sprint Backlog divided into a hierarchical structure with Features, Backlog
Items and Tasks

24.7.3 Taskboard
Based on the Sprint Backlog Items and the Tasks created for each Sprint Backlog Items we can
start using the Taskboard features inside TFS.

The Taskboard is the heart of Daily Scrum Meetings. We can easily move tasks (drag and drop with
the mouse) on the task board to reflect their current state.

Part 3: Platforms & Tools


248 24 Team Foundation Server (TFS)


Figure 24-28: Updating the Sprint Taskboard in TFS

We can also easily Assign/reassign people to the different tasks in addition to updating the
“Remaining Work” field before the Daily Scrum Meeting, see Figure 24-29.

Figure 24-29: Using the Taskboard to update the Sprint Tasks before/under the Daily Scrum
Meeting

24.8 Software Testing in TFS


Team Foundation server (TFS) or Visual Studio Team Services (VSTS) is a great tool for testing, for
planning tests and it has advanced features for bug reporting and bug tracking (see Figure 24-30).

Part 3: Platforms & Tools


249 24 Team Foundation Server (TFS)


Figure 24-30: Software Testing in TFS/Visual Studio Team Services

24.8.1 Test Planning in TFS


In TFS you can create Test Plans and create Test Cases, see Figure 24-31.


Figure 24-31: Test Planning in TFS

Part 3: Platforms & Tools


25 Databases
Almost any kind of software program uses a database for back-end storage, e.g., Facebook, etc.

Popular Database Systems:

• Microsoft SQL Server


• Oracle
• MySQL
• SQLite
• MS Access
• MariaDB

The main focus in this chapter will be Microsoft SQL Server. For more information about database
systems, please see [25].

25.1 SQL Server


SQL Server consists of a Database Engine and a Management Studio. The Database Engine has no
graphical interface - it is just a service running in the background of your computer (preferable on
the server). The Management Studio is graphical tool for configuring and viewing the information
in the database. It can be installed on the server or on the client (or both).


Figure 25-1: SQL Server

250
251 25 Databases

In Figure 25-2 we see the SQL Server Management Studio.


Figure 25-2: SQL Server Management Studio

25.2 ER Diagram
ER Diagram (Entity-Relationship Diagram) is used for design and modeling of databases. It specifies
tables and relationship between them (Primary Keys and Foreign Keys), see Figure 25-3.


Figure 25-3: ER diagram with Primary Keys and Foreign Keys relationships
252 25 Databases

We can use a lot of different tools to create such ER diagram. In this document I will only focus on
the following:

• MS Visio
• ERwin

Se below for more information about these tools.

25.2.1 MS Visio
In Figure 25-4 we see a typical ER diagram created in Visio.


Figure 25-4: ER Diagram Example

25.2.2 ERwin
ERwin is a very good tool for creating ER diagrams, but it is expensive. But there exists a free
edition called “CA ERwin Data Modeler Community Edition” – this is a free edition that contains a
subset of the standard product.

In Figure 25-5 we see the same database model in ERwin as the example shown in Figure 25-4.
253 25 Databases


Figure 25-5: Database Modelling with ERwin

25.3 Structured Query Language


Here we will only give a short introduction to Structured Query Language. For more information
about SQL, please see [19].

SQL is a A Database Computer Language designed for Managing Data in Relational Database
Management Systems (RDBMS). In SQL we have 4 different types of queries:

• INSERT
• SELECT
• UPDATE
• DELETE

Below we see some examples of typical SQL queries:

insert into STUDENT (Name, Number, SchoolId)


values ('John Smith', '100005', 1)

select SchoolId, Name from SCHOOL

select * from SCHOOL where SchoolId > 100

update STUDENT set Name='John Wayne' where StudentId=2


254 25 Databases

delete from STUDENT where SchoolId=3

These are refered to as CRUD – Create (Insert), Read (Select), Update and Delete.

25.3.1 Best Practice


Here are some “Best practice” recommendations for creating tables in a database system:

• Tables: Use upper case and singular form in table names – not plural, e.g., “STUDENT” (not
students)
• Columns: Use Pascal notation, e.g., “StudentId”
• Primary Keys:
– If the table name is “COURSE”, name the Primary Key column “CourseId”, etc.
– “Always” use Integer and Identity(1,1) for Primary Keys
• Specify Required Columns (NOT NULL) – i.e., which columns that need to have data or not
• Data Types: Standardize on these Data Types: int, float, varchar(x), datetime, bit
• Use English for table and column names
• Avoid abbreviations! (Use RoomNumber – not RoomNo, RoomNr, ...)

26 Unit Testing
Unit Testing (or component testing) refers to tests that verify the functionality of a specific section
of code, usually at the function level. In an object-oriented environment, this is usually at the class
and methods level. Unit Tests are written by the developers as part of the programming. Unit tests
are automatically executed (e.g., Visual Studio and Team Foundation Server have built-in
functionality for Unit Testing).

Here are some “best practice” rules regarding Unit Testing:

• A Unit Test must only do one thing


• Unit Test must run independently
• Unit Tests must not be depended on the environment
• Test Functionality rather than implementation
• Test public behavior; private behavior relates to implementation details
• Avoid testing UI components
• Unit Tests must be easy to read and understand
• Create rules that make sure you need to run Unit Tests (and they need to pass) before you
are allowed to Check-in your Code in the Source Code Control System

26.1 Unit Tests Frameworks


Unit Tests are built into Visual Studio. Other Unit Tests Framework:

1. JUnit is a unit testing framework for the Java programming language.

2. Nunit: NUnit is an open source unit testing framework for Microsoft .NET. It serves the
same purpose as JUnit does in the Java world

3. LabVIEW Unit Test Framework Toolkit

4. etc.

26.2 Unit Testing in Visual Studio


Visual Studio has integrated possibilites for Unit Testing. In Figure 26-1 we see the Unit Test
Project that is built into Visual Studio.

Note! Some of the more advanced test features in Visual Studio is only availible in the Ultimate or
Premium editions.

255
256 26 Unit Testing


Figure 26-1: Unit Test Project used in Visual Studio

A typical Test Class in Visual Studio looks like this:

using System;

using Microsoft.VisualStudio.TestTools.UnitTesting;

using BankAccount; //The Code that is going to be tested

namespace BankTest
{
[TestClass]
public class BankAccountTests
{
[TestMethod]
public void TestMethod1()
{

}

}
}

A test method must meet the following requirements:

• The method must be decorated with the [TestMethod] attribute.

• The method must return void.

• The method cannot have parameters.

Example of a Unit Test written in C#:

Part 3: Platforms & Tools


257 26 Unit Testing

[TestMethod]
public void Debit_WithValidAmount_UpdatesBalance()
{
// arrange
double beginningBalance = 11.99;
double debitAmount = 4.55;
double expected = 7.44;
BankAccount account = new BankAccount("Mr. Bryan Walton",
beginningBalance);
// act
account.Debit(debitAmount);
// assert
double actual = account.Balance;
Assert.AreEqual(expected, actual, 0.001, "Account not debited
correctly");
}

We get an overview of all the Tests in the Test Explorer (Figure 26-2):


Figure 26-2: Test Explorer inside Visual Studio

When you build the test project, the tests appear in the Test Explorer. If the Test Explorer is not
visible, choose Test on the Visual Studio menu, choose Windows, and then choose Test Explorer.

Part 3: Platforms & Tools


258 26 Unit Testing

As you run, write, and rerun your tests, Test Explorer displays the results in default groups of
Failed Tests, Passed Tests, Skipped Tests and Not Run Tests.

You can choose to run the tests manually or automatically, e.g., every time you build the code, etc.
If you use Team Foundation Server together with Unit Testing in Visual Studio you can alos choose
to fource Unit Testing before you are allowed to check-in the code.

26.3 Code Coverage


Code coverage is a measure used in software testing. It describes the degree to which the source
code of a program has been tested.

Example:

int foo (int x, int y)


{
int z = 0;
if ((x>0) && (y>0))
{
z = x;
}
return z;
}

When we test this function, it depends on the input arguments which parts of the code will be
executed. Unit Tests should be written to cover all parts of the code.

In Visual Studio (Ultimate or Premium) these features are built-in (see Figure 26-3).

Part 3: Platforms & Tools


259 26 Unit Testing


Figure 26-3: Code Coverage in Visual Studio

26.4 Exercises

1. Explain the difference between unit testing and integration testing (or interface testing in
Sommerville)

2. Suggest “test cases” for the use case “Take out Money” from an ATM, i.e., give examples of
Unit Tests and Integration Tests

Part 3: Platforms & Tools


27 Deployment in Visual
Studio
Is it a Generic Software Product or a Tailor-made Software Solution?

– Different Deployment/Installation preparations required!!

– Generic Software:

– Many Customers

– The Customers install the Software itself

– Tailor-made:

– Typically only one Customer

– The Developer Company typically installs the software (at least server-side
components)

– If many Desktop Clients: A Setup is required

Different Deployment/Installation preparations required depending on what type of Apps you are
Developing.

Desktop Apps

– You need to create an .exe file and a Setup Package

– Setup packages can then be distributed on CDs/DVDs or downloaded from a Web


Page

– You are use the Setup in order to install the software on all the clients

– Time consuming, cumbersome, depends on local components that might not be


installed, version conflicts, etc. This makes it difficult (and a lot of work and testing)
to create robust setup packages

– Mac: You can deploy to Mac App Store, Windows 8: You can deploy to Windows
Store

Web Apps

• No client installation needed!

260
261 27 Deployment in Visual Studio

• Installed on a Web Server (IIS, Apache)

• Accessed on the Clients using only a Web Browser

• Easy, simple to deploy new versions, bugfixes, etc. (Customer dont need to do
anything)

• But make sure you App supports all major Web Browsers (Internet Explorer,
Chrome, FireFox, Opera, Safari)

Mobile Apps

• Deployed to "App Stores" like Apple App Store, Google Play, Windows Store
(Windows 8)

Server-side (Database, Web Services, etc.)

• Typically a setup package that installs this, or manually if it is a tailor-made solution

27.1 Setup Creation Software


Here are some examples:

• InstallShield Professional/Premium

– InstallShield is a professional software for creating installers, Price €2000+

• WiX Toolset (Windows Installer XML)

– Used to create Windows Installer packages ("MSI files)

– The WiX toolset builds Windows installation packages from XML source code.

– Free and Open Source

– Used by e.g., Microsoft to create Setup packages for Office, SQL Server, Visual
Studio, etc. Apple, etc. also use it.

• Inno Setup

– Free of charge Installer for Windows programs

• NSIS (Nullsoft Scriptable Install System)

– Professional open source system to create Windows installers.

• etc.

Part 3: Platforms & Tools


262 27 Deployment in Visual Studio

27.2 Visual Studio


In Visual Studio we have the following options:

• InstallShield Limited Edition (InstallShield Professional is a professional software for


creating installers, Price €2000+)

– Tool for creating setup packages

– "Included" (free), but needs to be enabled and downloaded

– Integrates with Visual Studio (Prof. ed can be used independently)

• WiX Toolset (Windows Installer XML)

– Used to create Windows Installer packages ("MSI files)

– Can be used in Visual Studio or independently

• ClickOnce Deployment. Publishing Desktop Apps to a Web Server. Users can then install
them with a single click.

• Deployment to Windows Azure ("Windows in the Cloud"). Monthly Payment

• Web Apps (Web Deploy)

– Create a “Web Deployment Package” which can be imported using IIS

• Mobile Apps: Windows Store Apps

– Built-in Deployment inside Visual Studio to Windows Store

27.2.1 InstallShield Limited Edition


To enable InstallShield Limited Edition:

• On the menu bar, choose File, New, Project.

• In the New Project dialog box, expand the Other Project Types node, and then choose the
Setup and Deployment node.

• In the template list, choose Enable InstallShield Limited Edition, and then choose the OK
button.

• In the browser window that opens, read the instructions, and then choose the Go to the
download web site link.

In Figure 27-1 we see InstallShield Limited Edition and how it integrates into Visual Studio.

Part 3: Platforms & Tools


263 27 Deployment in Visual Studio


Figure 27-1: InstallShield Limited Edition

27.2.2 WiX Toolset


Download Wix Toolset from: http://wixtoolset.org

See how WiX is integrated in Visual Studio in Figure 27-2.

Part 3: Platforms & Tools


264 27 Deployment in Visual Studio


Figure 27-2: WiX in Visual Studio

Part 3: Platforms & Tools


Part 4 : Additional
Resources
In this part additional resources, references and appendices are available.

265

28 Tutorials
If you want to go more in details on some of the topics in this document, please see the following
Tutorials:

1. Introduction to Visual Studio and C#


2. Using SQL Server in C#
3. Data Acquisition in C#
4. ASP.NET and Web Programming
5. Introduction to Web Services
6. Introduction to Database Systems
7. Structured Query language (SQL)
8. etc.

They are available from:

http://home.hit.no/~hansha/?page=tutorial

You will find additional resources on this web page:

http://home.hit.no/~hansha/?tutorial=software_development

Here you will also find lots of hands-on exercises and training resources, e.g.:

• Create a Desktop App (WinForm)


• Create a Web App (ASP.NET Web Forms)
• Create a Mobile App (Windows Store App)
• Create Database Design & Implementation (ERwin & SQL Server)
• Create ASP.NET WebForm Database App
• Create Web Services
• Create 3-tier Applications
• Create a Virtual Test Environment
• Create Unit Tests
• Deployment in Visual Studio

Additional information is located here:

http://home.hit.no/~hansha

266

29 Glossary
Below we will give a short overview of some important topics in software development.

Term Description

Agile Agile software development is a group of software development methods


Development based on iterative and incremental development.

Agile Manifesto The philosophy behind Agile methods is reflected in the Agile Manifesto.

ALM Application Lifecycle Management. An ALM system takes care of all


aspects in software development from planning, requirements, coding,
testing, deployment and maintenance. TFS is an example of an ALM
system.

API Application Programming Interface. API specifies how some software


components should interact with each other.
In practice in most of the cases an API is a library of different classes,
methods/functions, etc. that a Developer can use.

Burn Down A burn down chart is a graphical representation of work left to do versus
Chart time. The outstanding work (or backlog) is often on the vertical axis, with
time along the horizontal. That is, it is a run chart of outstanding work. It
is useful for predicting when all of the work will be completed.
It is often used in agile software development methodologies such as
Scrum. However, burn down charts can be applied to any project
containing measurable progress over time.

Code No changes in the code can be made, except bugs.


Freeze/Feature
Freeze

Code Review Code inspections to check if code is properly written, and useful to avoid
bugs in your code.

Daily Scrum In Scrum Development they have daily 15 minutes meetings within the
Software Team. The Meeting is usually a Stand-up meeting.

DDT Development-Driven Testing

267
268 29 Glossary

Dog-fooding Computer software company uses its own product to demonstrate the
quality and capabilities of the product.

GUI Graphical User Interface. The part of the software the user sees and
interact with.

HA High Availability. Some software needs to run 24-7.

HMI Human Machine Interface. Another term for Graphical User Interface.

IDE Integrated Development Environment. A software application that helps


developers to create, edit, compile and run their code.

Internal Server Typical errors from web pages. The Web server (running the Web Site)
Error encountered an unexpected condition that prevented it from fulfilling the
request by the client.

Pair 2 developers working together.


Programming

QA Quality Assurance. QA refers to the engineering activities implemented in


a quality system so that requirements for a product or service will be
fulfilled.

Refactoring Code refactoring is used in software development to improve existing


code without changing its functionality. The goal is to make the code
more robust and easier to maintain.

SCC Source Code Control or Version Control. A version control system keeps
track of all work and all changes in a set of files. Allows several
developers (potentially widely separated in space and time) to collaborate
and share code.

SDD Software Design Document. A document describing the design of a


software application.

SDK Software Development Kit. A SDK is typically a set of software


development tools that allows for the creation of applications for a
certain software package, software framework, hardware platform,
computer system, operating system, or similar devlopment platform.

SDLC Software Development Life Cycle. The process of creating software.

Software Waterfall, Agile, etc.


Development
Process

Part 4: Additional Resources


269 29 Glossary

Software The discipline for creating software applications. A systematic approach to


Engineering the design, development, testing, and maintenance of software.

SRS Software Requirements Specifications. A document stating what at


application must accomplish.

STD Software Test Documentation. Contents: Introduction, Test Plan, Test


Design, Test Cases, Test procedures, Test Log, …, Summary.

STP Software Test Plan. Documentation stating what parts of an application


will be tested, and the schedule of when the testing is to be performed.

TDD Test-driven development (TDD) is a software development process that


relies on the repetition of a very short development cycle: first the
developer writes an (initially failing) test case that defines a desired
improvement or new function, then produces the minimum amount of
code to pass that test, and finally refactors the new code to acceptable
standards.

TFS Team Foundation Server. TFS is a Source Code Control (SCC), Bug Tracking,
Project Management, and Team Collaboration platform from Microsoft

UML Unified Modeling Language. A Language used in Software modeling.

XP eXtreme Programming. XP is an Agile Software Development method. Its


based on Unit Testing, Code Reviews and Pair Programming.

Part 4: Additional Resources


References
[1] I. Sommerville, Software Engineering, 9 ed.: Pearson, 2010.

[2] Wikipedia. (2013). Software Requirements Specification. Available:


http://en.wikipedia.org/wiki/Software_Requirements_Specification
[3] Wikipedia. (2013). Software Development Process. Available:
http://en.wikipedia.org/wiki/Software_process

[4] Wikipedia. (2013). Waterfall Model. Available: http://en.wikipedia.org/wiki/Waterfall_model

[5] Wikipedia. (2013). V-Model (Software Development). Available: http://en.wikipedia.org/wiki/V-


Model_(software_development)
[6] Wikipedia. (2013). Agile Software Development. Available:
http://en.wikipedia.org/wiki/Agile_software_development

[7] Agile. (2013). Agile Manifesto. Available: http://agilemanifesto.org

[8] Wikipedia. (2013). Pair Programming. Available:


http://en.wikipedia.org/wiki/Pair_programming
[9] Wikipedia. (2013). Scrum Development. Available:
http://en.wikipedia.org/wiki/Scrum_(development)
[10] Wikipedia, "Unified Process," 2014.

[11] K. Schwaber and J. Sutherland. (2011, The Scrum Guide. Available: scrum.org

[12] E. J. Braude and M. E.Bernstein, Software Engineering: Modern Approaches, 2 ed.: Wiley, 2011.

[13] Microsoft. (2013). Windows 8 UX Guidelines. Available: http://msdn.microsoft.com/en-


US/library/windows/apps/hh465424

[14] Apple. (2013). Mac OS X UX Guidelines. Available: https://developer.apple.com/library/mac/ -


documentation/userexperience/conceptual/applehiguidelines/UEGuidelines/UEGuidelines.
html

[15] Wikipedia. (2015). GUI Mockups. Available: http://en.wikipedia.org/wiki/Mockup

[16] F. Tsui, O. Karam, and B. Bernal, Essentials of Software Engineering, 3 ed.: Jones & Barlett Learning,
2014.

[17] H.-P. Halvorsen. (2014). ASP.NET and Web Programming. Available:


http://home.hit.no/~hansha/?tutorial=asp_net
[18] H.-P. Halvorsen. (2014). Introduction to Visual Studio and C#. Available:
http://home.hit.no/~hansha/?tutorial=csharp

270
271 References

[19] H.-P. Halvorsen. (2014). Structured Query Language. Available:


http://home.hit.no/~hansha/?tutorial=sql
[20] H.-P. Halvorsen. (2013). So You Think You Can MATLAB? Available:
http://home.hit.no/~hansha/?lab=matlab
[21] H.-P. Halvorsen. (2014). LabVIEW Resources. Available:
http://home.hit.no/~hansha/?page=labview

[22] L. Malka. (2013). API. Available: http://www.lior.ca/publications/api_design.pdf

[23] H.-P. Halvorsen. (2014). Introduction to Web Services. Available:


http://home.hit.no/~hansha/?tutorial=webservice
[24] E. Blankenship, M. Woodward, G. Holliday, and B. Keller, Professional Team Foundation Server
2012: Wiley, 2013.

[25] H.-P. Halvorsen. (2014). Introduction to Database Systems. Available:


http://home.hit.no/~hansha/?tutorial=database

Part 4: Additional Resources


Hans-Petter Halvorsen, M.Sc.


E-mail: [email protected]
Blog: http://home.hit.no/~hansha

University College of Southeast Norway


www.usn.no

You might also like