Download SOFTWARE ENGINEERING [LECTURE NOTES Table of Contents and more Schemes and Mind Maps Data Mining in PDF only on Docsity!
SOFTWARE ENGINEERING
[LECTURE NOTES]
- Overview............................................................................................................................................ Table of Contents
- Software Engineering.........................................................................................................................
- Software engineering and the Web:...................................................................................................
- Software Process................................................................................................................................
- Essential attributes of good software...............................................................................................
- Software Processes...........................................................................................................................
- Software Process Models.................................................................................................................
- Incremental development............................................................................................................
- Reuse-oriented software engineering..........................................................................................
- Process Activities..............................................................................................................................
- Software design and implementation..............................................................................................
- Software validation...........................................................................................................................
- Stages in the testing process:...........................................................................................................
- Software Evolution...........................................................................................................................
- Coping with Change..........................................................................................................................
- Prototyping.......................................................................................................................................
- Incremental Delivery........................................................................................................................
- Boehm’s spiral model.......................................................................................................................
- The Rational Unified Process............................................................................................................
- Phases of RUP:..................................................................................................................................
- Static workflows in the RUP:.............................................................................................................
- Requirements Engineering...............................................................................................................
- Functional and Non-functional Requirements..................................................................................
- The Software Requirements Document...........................................................................................
- Characteristics of High-Quality SRS......................................................................................................
- Structure of a requirements document:...........................................................................................
- Requirements Specification..............................................................................................................
- Natural Language Specification........................................................................................................
- Requirements Engineering Processes...............................................................................................
- Elicitation and analysis..................................................................................................................
- The requirements elicitation and analysis process:..........................................................................
- Requirements discovery:..................................................................................................................
- Requirements Management.............................................................................................................
- System Modeling..............................................................................................................................
- System models:................................................................................................................................
- Context models................................................................................................................................
- UML activity diagrams:.....................................................................................................................
- Interaction models...........................................................................................................................
- Sequence diagrams..........................................................................................................................
- Structural models.............................................................................................................................
- Class diagrams..................................................................................................................................
- Generalization..................................................................................................................................
- Behavioral models............................................................................................................................
- Data-driven modeling.......................................................................................................................
- It is maintained and changed throughout its life. Software engineering is intended to
- support professional software development, rather than individual programming
- Include techniques that support program specification, design, and evolution Many people think that software is simply another word for computer programs. However talking about software engineering:
- Software is not just the programs themselves but also all associated documentation and configuration data required to make these programs operate correctly.
- Is not a single program but a professionally developed system consisting of a number of separate programs and configuration files that are used to set up these programs.
- It may include system documentation, which describes the structure of the system; user documentation, which explains how to use the system, and websites for users to download recent product information. Question Answer What is software? Computer programs and associated documentation. Software products may be developed for a particular customer or may be developed for a general market. What are the attributes of good software? Good software should deliver the required functionality and performance to the user and should be maintainable, dependable and usable. What is software engineering? Software engineering is an engineering discipline that is concerned with all aspects of software production. What are the fundamental software engineering activities? Software specification, software development, software validation and software evolution. What is the difference between software engineering and computer science? Computer science focuses on theory and fundamentals; software engineering is concerned with the practicalities of developing and delivering useful software. What is the difference between software engineering and system engineering? System engineering is concerned with all aspects of computer-based systems development including hardware, software and process engineering. Software engineering is part of this more general process. What are the key challenges facing software engineering? Coping with increasing diversity, demands for reduced delivery times and developing trustworthy software. What are the costs of software engineering? Roughly 60% of software costs are development costs, 40% are testing costs. For custom software, evolution [Type text]
costs often exceed development costs. What are the best software engineering techniques and methods? While all software projects have to be professionally managed and developed, different techniques are appropriate for different types of system. For example, games should always be developed using a series of prototypes whereas safety critical control systems require a complete and analyzable specification to be developed. You can’t, therefore, say that one method is better than another. What differences has the web made to software engineering? The web has led to the availability of software services and the possibility of developing highly distributed service-based systems. Web-based systems development has led to important advances in programming languages and software reuse. Software engineers are concerned with developing software products which can be sold to a customer). There are two kinds of software products:
1. Generic products - These are stand-alone systems that are produced by a development organization - Sold on the open market to any customer who is able to buy them. Example: databases, word processors, drawing packages, and project-management tools. - It also includes so-called vertical applications designed for some specific purpose such as library information systems, accounting systems, or systems for Maintaining dental records. - the organization that develops the software controls the software specification 2. Customized products: - Requested by a particular customer. - A software contractor develops the software especially for that customer. Examples of this type of software include control systems for electronic devices, systems written to support a particular business process, and air traffic control systems. - The specification is usually developed and controlled by the organization that is buying the software.
Software Engineering
Definition: Software engineering is an engineering discipline that is concerned with all aspects of software production from the early stages of system specification through to maintaining the system after it has gone into use.
1. Engineering discipline: - Engineers make things work. - They apply theories, methods, and tools where these are appropriate. - They use them selectively and always try to discover solutions to problems - Engineers also recognize that they must work to organizational and financial constraints so they look for solutions within these constraints.
2. Business and social change - Business and society are changing incredibly quickly as emerging economies require new technologies - They need to change their existing software and to rapidly develop new software. - Many traditional software engineering techniques are time consuming and delivery of new systems often takes longer than planned. - The engineers need to evolve so that the time required for software to deliver value to its customers is reduced. 3. Security and trust - As software is intertwined with all aspects of our lives, it is essential that we can trust that software. This is especially true for remote software systems accessed through a web page or web service interface. - We have to make sure that malicious users cannot attack our software and that information security is maintained. Software engineering is a systematic approach to the production of software that takes into account practical cost, schedule, and dependability issues, as well as the needs of software customers and producers. How this systematic approach is actually implemented varies dramatically depending on the organization developing the software, the type of software, and the people involved in the development process. There are no universal software engineering methods and techniques that are suitable for all systems and all companies. 1. Stand-alone applications 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. Examples of such applications are office applications on a PC, CAD programs, photo manipulation software, etc. 2. Interactive transaction-based applications These are applications that execute on a remote computer and that are accessed by users from their own PCs or terminals. Obviously, these include web applications such as e- commerce applications where you can interact with a remote system to buy goods and services. This class of application also includes business systems, where a business provides access to its systems through a web browser or special-purpose client program and cloud- based services, such as mail and photo sharing. Interactive applications often incorporate a large data store that is accessed and updated in each transaction. 3. 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. Examples of embedded systems include the software in a mobile (cell) phone, software that controls anti- lock braking in a car and software in a microwave oven to control the cooking process. 4. 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. Examples of batch systems include periodic billing systems, such as phone billing systems, and salary payment systems.
5. Entertainment systems These are systems that are primarily for personal use and which are intended to entertain the user. Most of these systems are games of one kind or another. The quality of the user interaction offered is the most important distinguishing characteristic of entertainment systems. 6. 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. These are often computationally intensive and require high-performance parallel systems for execution. 7. 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. The software has to interact with sensors and often is installed in a hostile environment such as inside an engine or in a remote location. 8. Systems of systems These are systems that are composed of a number of other software systems. Some of these may be generic software products, such as a spreadsheet program. Other systems in the assembly may be specially written for that environment. Software engineering fundamentals that apply to all types of software system: 1. The software should be developed using a managed and understood development process. 2. The organization developing the software should plan the development process and have clear ideas of what will be produced and when it will be completed. 3. Different processes are used for different types of software. 4. Dependability and performance are important for all types of software systems. 5. Software should behave as expected, without failures and should be available for use when it is required. 6. The software should be safe and secure against external attack. 7. The system should perform efficiently and should not waste resources. 8. Deliver quality software within budget and schedule that will satisfy different types of customers. 9. Where appropriate, reuse existing software rather than write new software.
Software engineering and the Web:
The development of the World Wide Web has had a profound effect on our daily lives. Initially, the Web was primarily a universally accessible information store and it had little effect on software systems. Around 2000, the Web started to evolve and more and more functionality was added to browsers. This meant that web-based systems could be developed where, instead of a special-purpose user interface, these systems could be accessed using a web browser. [Type text]
- Systems engineering: Aspects of development and evolution of complex systems. Specifying the system, defining its overall architecture, integrating the different parts to create the finished system
Essential attributes of good software
1. Maintainability - Evolve to meet the changing needs of customers - Software change is inevitable (see changing business environment) 2. Dependability and security - Includes reliability, security and safety - Should not cause physical or economic damage in case of system failure - Take special care for malicious users 3. Efficiency - Includes responsiveness, processing time, memory utilization - Care about memory and processor cycles 4. Acceptability 5. Acceptable to the type of users for which it is designed - Includes understandable, usable and compatible with other systems Application types - Stand-alone applications - Interactive transaction-based applications - Embedded control systems - Batch processing systems - Entertainment systems - Systems for modeling and simulation - Data collection systems - Systems of systems Software engineering ethics: - Confidentiality: respect confidentiality or employers and clients (whether or not a formal confidentiality agreement has been signed) - Competence: do not misrepresent your level of competence (never accept work being outside of your competence) - Intellectual property rights: be aware of local laws governing the use of intellectual property such as patents and copyright - Computer misuse: do not use technical skills to misuse other people’s computers
Software Processes
Main software processes
- Specification
- Design and implementation
- Validation
- Evolution Software Process Models Waterfall model [Type text]
Incremental development Reuse-oriented software engineering Waterfall model:
1. Requirements analysis and definition - Consult system users to establish system’s services, constrains and goals - They are then defined in detail and serve as a system specification 2. System and software design - Establish an overall system architecture to allocate the requirements to either hardware or software systems - Involves identifying and describing the fundamental software system abstractions and their relationships 3. Implementation and unit testing - Integrate and test individual program units or programs into complete systems - Ensure the software requirements has been met - Software system is delivered to the customer (after testing) 4. Operation and maintenance - Normally the longest life cycle phase - System is installed and put into practical use - Involves correcting errors, improving the implementation of system units and enhancing the system’s services as new requirements are discovered **Incremental development:
- Idea**
- Develop and initial implementation
- Expose this to user comment
- Evolve this through several versions until an adequate system has been developed 2. Characteristics
- Design the framework of the system or reuse an existing framework
- Some new software may have to be designed if reusable components are not available 5. Development and integration
- Develop software that cannot be externally procured
- Integrate components and COTS (commercial off-the-shelf systems)
- System integration may be part of development process rather than a separate activity **6. System validation Types of software components to be used in a reuse-oriented process:
- Web services**
- Developed according to service standards
- Available for remote invocation
- Collections of objects in a package (e.g. from .NET or J2EE)
- Stand-alone software systems that are configured for use in a particular environment 2. Advantages
- Reduce the amount of software to be developed
- Reduce cost and risks
- Usually leads to faster delivery of the software 3. Disadvantages
- May lead to a system that does not meet the real needs of users (requirements compromises are inevitable)
- Lost control over the system evolution as new versions of the reusable components are not under the control of the organization using them
Process Activities
1. Software specification - Definition: the process of understanding and defining what services are required from the system and identifying the constraints on the system’s operation and development - Requirements engineering: critical stage of the software process as errors at this stage inevitably lead to later problems in the system design and implementation 2. Requirements engineering process i Feasibility study - Estimate whether the identified user needs may be satisfied using current software and hardware technologies - Considerations: cost-effective, development within existing budgetary constraints - Should be relatively cheap and quick ii Requirements elicitation and analysis - Derive the system requirements through observation of existing systems, discussions with potential users and procurers, task analysis - Development of one or more system models and prototypes possible - Help to understand the system to be specified iii Requirements specification
- Activity of translating the information gathered during the analysis activity into a document that defines a set of requirements
- User requirements: abstract statements of the system requirements for the customer and end-user of the system
- System requirements: more detailed description of the functionality to be provided iv Requirements validation
- Checks the requirements for realism, consistency and completeness
- Errors are discovered to correct the specification
Software design and implementation
Software implementation : process of converting a system specification into an executable system Characteristics:
- Always involves processes of software design and programming
- May refine software specification if incremental approach is used Software design: a description of the structure of the software to be implemented, the data models and structures used by the system, the interfaces between system components and the algorithms used. Characteristics:
- Designers develop the design interactively
- Add formality and detail as they develop their design with constant backtracking to correct earlier designs
- Process activities are interleaved: feedback from one stage to another and consequent design rework
- Requires detailed knowledge about the software platform (environment in which the software will execute; e.g. operating system, database, middleware etc.)
- Activities in the design process vary, depending on the type of system being developed (see real-time systems vs. services vs. database systems) **Possible activities of the design process of information systems:
- Architectural design**
- Identify the overall structure of the system, the principal components (sub-systems, modules), their relationships and how they are distributed 2. Interface design [Type text]
- Concerned with showing that the system meets its function and non-functional requirements
- Testing the emergent system properties
- May be a multi-stage process for large systems 3. Acceptance testing
- Final stage in the testing process before system is accepted for operational use
- Tested with data supplied by the customer rather than with simulated test data Characteristics:
- Component development and testing processes are interleaved (normally)
- Incremental approach: each increment should be tested as it is developed
- Plan-driven approach: testing is driving by a set of test plans. Use of an independent team of testers
- Acceptance testing is sometimes called ‘alpha testing’
- ‘Beta testing’ involves delivering a system to a number of potential customers who agree to use that system. They report problems to the system developers. This exposes the product to real use and detect errors that may not have been anticipated by the system builders
Software Evolution
Distinction between software development and maintenance is increasingly irrelevant (software engineering as an evolutionary process where software is continually changed over this lifetime in response to changing requirements and customer needs)
Coping with Change
Reasons for change:
- Business procuring the system responds to external pressures and management priorities change
- New technologies become available
- New design and implementation possibilities emerge Rework: work that has been completed has to be redone (software development, design, requirements analysis, redesign, re-test etc.) **Approaches to reduce cost of rework:
- System prototyping**
- Version of the system or part of the system is developed quickly to check the customer’s requirements and feasibility of some design decisions
- Supports change avoidance as it allows users to experiment with the system before delivery (refine their requirements)
- Reduced number requirements change proposals made after delivery [Type text]
2. Incremental delivery - Increments are delivered to the customer for comment and experimentation - Supports both change avoidance and change tolerance - Avoids premature commitment to requirements for the whole system and allows changes to be incorporated into later increments at relatively low costs Refactoring: improving structure and organization of a program (an important mechanism to support change tolerance)
Prototyping
Prototype: an initial version of a software system that is used to demonstrate concepts, try out design options and find out more about the problem and its possible solutions. Rapid, iterative development of the prototype is essential (to control costs; system stakeholders can experiment with the prototype early in the software process) How software prototyping can help:
- Requirements engineering process: elicitation and validation of system requirements
- System design process: explore particular software solutions; support user interface design Get new ideas for requirements
- Find areas of strength and weakness in the software (to propose new system requirements)
- May reveal errors and omissions in the requirements
- Carry out design experiments to check the feasibility of a proposed design
- Essential part of the user interface design process (dynamic nature of user interfaces) Delivering throwaway prototypes is usually unwise:
- May be impossible to tune the prototype to meet non-functional requirements: performance, security, robustness, reliability requirements
- Undocumented prototype due to rapid change during development; prototype code as the only design specification (bad for long-time maintenance)
- Probably degraded system structure due to changes made during prototype development. System will be difficult and expensive to maintain.
- Relaxed organizational quality standards for prototype development Examples:
- Paper-based mock-ups of the system user interface (help users refine an interface design and work through usage scenarios)
- Wizard of Oz prototype (extension to the one above): only the user interface is developed
Incremental Delivery
Boehm’s spiral model
- Is a risk-driven software process framework
- Software process is represented as a spiral
- Each loop in the spiral represents a phase of the software process
- It combines change avoidance with change tolerance
- It assumes that changes are a result of project risks and includes explicit risk management activities to reduce these risks **Each loop is split into four sectors:
- Objective setting**
- To determine specific objectives, alternatives and constraints
- Constraints on the process and the product are identified
- A detailed management plan is drawn up
- Project risks are identified
- Alternative strategies may be planned 2. Risk assessment and reduction
- A detailed analysis for each identified project risk is carried out
- Measurements to reduce these risks 3. Development and validation
- A development model for the system is chosen
- Throwaway prototyping: user interface risks are dominant
- Development based on formal transformations: safety risks are the main consideration
- Waterfall model: main identified risk is a sub-system integration 4. Planning
- Project is reviewed
- Decision: continue with a further loop of the spiral? If so, plans are drawn up for the next phase of the project 5. Advantages:
- Explicit recognition of risk 6. Characteristics:
- Begin of cycle of the spiral: elaborating objectives such as performance and functionality
- Enumerate alternative ways of achieving these objectives and dealing with the constraints
- Development is carried out after risks have been assessed
The Rational Unified Process
- A modern process model that has been derived from work on the UML and the associated Unified software Development Process
- A hybrid process model
- Brings together elements from all of the generic process models, illustrates good practice in specification and design and supports prototyping and incremental delivery
- A phase model that identifies four discrete phases in the software process
- Phases are more closely related to business rather than technical convers (unlike the waterfall model where phases are equated with process activities)
- Separation of phases and workflows
- Recognizes that deploying software in a user’s environment is part of the process
- Phases are dynamic and have goals
- Workflows are static and are technical activities that are not associated with a single phase (used throughout the development to achieve goals of each phase) RUP described from three perspectives:
- Dynamic perspective: shows the phases of the model over time
- Static perspective: shows the process activities that are enacted Called ‘workflows’ in the RUP description 6 core process workflows and 3 core supporting workflows
- Practice perspective: suggests good practices to be used during the process **Phases of RUP:
- Inception**
- Goal: establish a business case for the system [Type text]