Recent Changes - Search:

Software Engineering

This website demonstrates using wikis as teaching and learning tool.

The course instructor is also happy to share the teaching materials here with those who find it readable.

Introduction to Software Engineering

A Software Engineering Lecture by Steven Choy

Lecture Overview: This lecture gives you the basic definitions of many concepts in software engineering. You will learn about the importance of software engineering, the basic of software development activities, and the key roles in software engineering. Since this course requires you to have a good knowledge on object-oriented programming in Java, this lecture also reviews important concepts on object orientation.

Reading: Chapter 1 of the textbook: Introduction to Software Engineering


What's Software Engineering?

  • Software Engineering ≠ Programming
  • Software Engineer ≠ Programmer
Software engineering is a methodological process of developing software such that it can be repeatable in various projects.

Why Study Software Engineering?

Software Engineering is a collection of techniques, methodologies and tools that help

  • Develop quality software
  • for a complex problem
  • within a limited time and budget
  • while things are changing

Common Software Development Problems

  • Inaccurate interpretation of end-user requirements
  • Integration failure with sub-systems
  • Inextensible software system (We only got v1.0, not more v2.0!)
  • Buggy software

Software Development Activities

  • Requirement Elicitation
  • Requirement Analysis
  • System Design
  • Object Design
  • Implementation (Coding)
  • Testing
  • Deployment

Requirement Elicitation

  • Client and developers define the purpose of the system
    • What's the system for?
    • What's the type of interface? Web-based? Standalone application?
    • What's the features of the system?
    • Etc
  • Functional & Non-Functional Requirement
Deliverable
Requirement Specification (by client)
Document that describes all use cases (by developer)

Illustration:
Classifying Customer Input in Requirement Elicitation

Requirement Analysis

  • Produce a model of the system
  • Produce a prototype for the system
  • Translate the use case into object model
Deliverable
Requirement analysis document (RAD) that describes the dynamic and object model of use cases
Requirement Analysis Document - Sample Outline
Requirement Analysis Document Outline

System Design

  • Determine the strategies to build the system
    • Hardware/Software Platform (Linux/Window? Java/.Net?)
    • Architectural Strategies (3 tiers, client/server, n-tier?)
    • Persistent Data Management Strategies
    • Global Logging Strategies
    • Access Control Policy
    • Performance (do we need caching?)
    • Etc

Some example diagrams of software architecture:
LibGo software architecture (simplified)
Software Architecture Example from dittoditto.com

  • Determine if you need to apply any off-the-shelf framework
Deliverable
Well-defined description of the above strategies
Sub-system decomposition
Deployment Diagram of the system
System Design Document - Sample Outline
System Design Document Outline

Object Design

  • Define the object model of the system that attains the design goals such as extensibility and scalability
  • Describe the object/subsystem interfaces precisely
  • Determine if you use any design patterns
Deliverable
Detailed object model with precise description of each object/element
Object Design Document - Sample Outline
Object Design Document Outline

Implementation

  • Based on the object model developed, developers translate it into source code
  • Integrates each components into a single system
Deliverable
A workable system that is expected to provide all features described in requirement

Testing

  • Test if the system developed conforms to the user requirement
  • Reveal as many bugs/faults as possible before rolling out for production
  • Different phases of Testing:
    • Unit Testing
    • Integration Testing
    • Regression Testing
    • System Testing
    • Performance Testing
    • Acceptance Testing
Deliverable
Test Plan
Test Specification
Test Report

Deployment

  • Roll out the system from internal environment to production
    • Installation of system
    • Configuration of system
    • Operation Procedures

Maintenance

  • On-going maintenance includes:
    • Bug fixes
    • Feature Enhancement
    • Server upgrade/adding additional server to existing cluster
    • Performance optimization
    • Etc
  • Involve most software development activities as mentioned

Examples of Roles in Software Engineering

  • Client
    • Responsible for providing high-level requirements of system defining the scope of project (delivery date, budget, etc.)
  • User
    • End-users who will be using the software
    • Provides developers with detailed requirements and domain knowledge
  • Manager
    • Responsible for the work organization including hiring staffs and managing resources for successful project delivery
  • Developer (System Architect/Analyst, programmer, tester)
    • Responsible for construction of system including specification, design, coding and testing
  • Technical Writer
    • Responsible for the documentation delivered for the client
(Source: Photobucket)

Software Methodology

  • The collection of policies, processes and procedures used to practice software engineering
  • a.k.a. System Development Life Cycle
  • Examples
    • SSADM (Structured System Analysis and Design Methodology)
    • RUP (Rational Unified Process)
    • XP (Extreme Programming)

Why Software Projects Fail So Often

Large and complex projects such as construction of highway bridges or construction of aircraft are usually delivered on time and within budget. However, software projects are often not. IEEE Spectrum September 2005 Issue has three feature articles on this issue. One of them is:
Why Software Fails — The reason that software project go away are well know. Yet failures, near-failures, and just plain old bad software will continue to plague us. By Robert N. Charette.
  • The most common factors that cause software projects fail
    • Unrealistic or unarticulated project goals
    • Inaccurate estimates of needed resources
    • Badly defined system requirements
    • Poor reporting of the project’s status
    • Unmanaged risks
    • Poor communication among customers, developers, and users
    • Use of immature technology
    • Inability to handle the project’s complexity
    • Sloppy development practices
    • Poor project management
    • Stakeholder politics
    • Commercial pressures

Basic Concepts of Object Oriented Programming

What’s an Object?

  • An object is an individual entity (Look around now, there are so many objects around).
  • In technical arena, an object is a software bundled with variables and related methods.
  • In OOA (object-oriented analysis) and OOD (object-oriented design), we use software object to model real-world object.

State and Operation

  • Every object has both state and operation
  • State
    • A collection of association an object has (e.g. colour, type)
    • In software object, we use “Attribute” to represent the state
  • Operation
    • An action of an object performs
    • In software object, we use “Method” to implement an operation

What’s a Class?

  • A class is a collection of objects that shares
    • Common structure,
    • Similar properties (attributes), and
    • Common operations (methods)

Relationship between object and class

  • An object is an instance of a class

How objects communicate with each other?

  • Communication via message (i.e. method invocation)
  • Message defines the interface of an object (methods that are known by other)
  • What an object can do is represented by its message interface (public method)

Sample Java class

 public class RaceCar {
	private String brand;
	private String color;
	private int speed;

	public RaceCar(String brand, String color, int speed) {
	   this.brand = brand;
     	   this.color = color;
	   this.speed = speed;
	}

	public void startEngine() {
		// Implementation omitted
	}

	public void stopEngine() {
		// Implementation omitted
	}

	public void accelerate() {
		// Implementation omitted
	}

	public void brake() {
		// Implementation omitted
	}
 }

Main Object Oriented Concepts

  • Abstraction
  • Encapsulation
  • Inheritance
  • Polymorphism

Abstraction

  • Embody the general characteristics of an object
  • Consider our race car example, what are general characteristics of a car?
    • Start Engine
    • Stop Engine
    • Accelerate
    • Brake

Encapsulation

  • The Blackbox paradigm – given an input, the black box generates the corresponding output. But we don’t know how it generates the output!
  • Hide the implementation from clients
  • Think about the “Car” example. When you accelerate the car, it will speed up. But do you know the internal mechanic for accelerating the car?

Inheritance

  • Abstraction concerns about the general characteristics of an object
  • Inheritance is the ability to provide extension (attributes/operations) from the abstract class and construct a more specific class
  • Inheritance promotes reuse of components
  • Example
Car is known as super class Motorcycle, race car and trunk are known as subclass of “Car”

Polymorphism

  • The ability of a child object to exhibit different behaviour based on the type of the object
  • Enables objects from different classes to respond to the same operation in different ways

Terminology in Chinese

  • Software Engineering: 軟體工程
  • Requirement Elicitation 需求擷取
  • Requirement Analysis 需求分析
  • Software Architecture 軟體架構
  • Modeling 塑模
  • Object-Oriented 物件導向
  • Abstraction 抽象化
  • Encapsulation 封裝
  • Inheritance 繼承
  • Polymorphism 同名異式

Extra Materials for Probing Further

The IEEE Computer Society defines software engineering as: “(1) The application of a systematic, disciplined, quantifiable approach to the development, operation, and maintenance of software; that is, the application of engineering to software. (2) The study of approaches as in (1).”

Thanks for Reading

If you would rather like to have this lecture note in printed format, please click the print action link in the top right corner.

If you find any problem in this lecture note, please feel free to tell Steven by steven@findaway.hk

Edit - History - Print - Recent Changes - Search
Page last modified on June 22, 2009, at 12:45 PM