Docsity

Software Engineering Processes: A Comprehensive Guide, Lecture notes of Software Engineering

Toggle sidebar
bg1
Software Engineering Topic 2 Page 1
Software Engineering Processes
A software engineering process is the model chosen for managing the creation of
software from initial customer inception to the release of the finished product.
The chosen process usually involves techniques such as
• Analysis,
• Design,
• Coding,
• Testing and
• Maintenance
Several different process models exist and vary mainly in the frequency, application
and implementation of the above techniques, for example, different process models
use different analysis techniques, other models attempt to implement the solution to a
problem in one big-bang approach, while others adopt an iterative approach whereby
successively larger and more complete versions of the software are built with each
iteration of the process model.
The Software Engineering Process - The Software Life Cycle
The illustration below highlights the various phases of what is probably the oldest
software development process in existence, namely the classic life-cycle paradigm,
sometimes called the "waterfall model,". This paradigm implies a systematic,
sequential approach (rarely achieved in practice) to software development that
begins at the system level and progresses through analysis, design, coding, testing
and maintenance.
Modelled after the conventional engineering cycle, the life-cycle paradigm
encompasses the above activities. Let’s take a look at each of these phases in turn
and explain what is involved.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a

Partial preview of the text

Download Software Engineering Processes: A Comprehensive Guide and more Lecture notes Software Engineering in PDF only on Docsity!

Software Engineering Processes

A software engineering process is the model chosen for managing the creation of software from initial customer inception to the release of the finished product. The chosen process usually involves techniques such as

  • Analysis,
  • Design,
  • Coding,
  • Testing and
  • Maintenance

Several different process models exist and vary mainly in the frequency, application and implementation of the above techniques, for example, different process models use different analysis techniques, other models attempt to implement the solution to a problem in one big-bang approach, while others adopt an iterative approach whereby successively larger and more complete versions of the software are built with each iteration of the process model.

The Software Engineering Process - The Software Life Cycle

The illustration below highlights the various phases of what is probably the oldest software development process in existence, namely the classic life-cycle paradigm, sometimes called the " waterfall model ,". This paradigm implies a systematic, sequential approach (rarely achieved in practice) to software development that begins at the system level and progresses through analysis, design, coding, testing and maintenance.

Modelled after the conventional engineering cycle, the life-cycle paradigm encompasses the above activities. Let’s take a look at each of these phases in turn and explain what is involved.

System Engineering and Analysis.

Because software almost always forms part of a much larger system, work begins by establishing requirements for all components of the system, identifying not only the role played by the software but, more importantly, its interface and interaction with the outside world.

This ‘ system view’ is essential when software must interface with other elements such as hardware, people , databases and computers outside of, and beyond the control of the system designer. In essence Systems engineering involves exploring some of the following issues:

  1. Where does the software solution fit into the overall picture? The software being proposed may be one small cog in a very large wheel. Maybe the software is a calculating employee pay or tax, or perhaps has to co-ordinate the activities of several distributed systems controlling a production/manufacturing plant or warehouse distribution system. Until the overall picture is clear, no analysis of the software can begin.
  2. What does the system do? Is it required to control or monitor some process or activity or is it simply performing analysis of data?
  3. What environment will the system be placed in?
    • Hostile, such as an elevator subject to vibration and dust, or friendly, such as a cosy air-conditioned office?
    • Will the system be ‘ real time ’, ‘on-line’, ‘ batch’ , ‘ safety critical ’, ‘ fault tolerant ?’
    • Is it required to be mobile or does it require an electricity main outlet?
    • Is it embedded?
    • Does it require a man-machine interface?
    • Who or what does it interact with

All of these factors could severely influence, restrict and or dictate the form of the solution.

  1. What inputs and outputs are required/produced and what is the form of that data: Paper, Database, Disk file, Graphics, Network, Analogue to digital converter outputs?

In answering the above question, a list of external devices is uncovered and can be explored further, e.g. what size of paper, what resolution graphics, what format is the data accepted/displayed, what capacity of disk, what resolution of Analogue to digital converter etc.

Software Requirements Analysis.

Requirements Analysis is the 1 st^ essential step towards creating a specification and a design. Attempting to design a solution to a (perceived) problem without fully understanding the nature and needs of the user, will surely end in tears. It has been shown that more than 90% of all software that is rejected by the customer after delivery, is done so because the software does not meet the customer needs, expectation or requirements so it is important to understand these fully. Furthermore, 50+% of all money spent on a project relates to the maintenance of it after it has been delivered. So what is requirements analysis?

  • Requirements analysis is an iterative process conducted jointly by an analyst and the customer and represents an attempt, to uncover the customer’s needs, whilst at the same time assessing the viability of a software solution.
  • Analysis provides the designer with a representation of the information processed by the system and the nature of the processing. That is, what does the system do with/to the information it processes. After all a computer can be thought of as nothing more than a system that takes in data, transforms or processes it and produces output.
  • Analysis enables the designer to pinpoint the software’s function and performance. For example how is analogue data gathered from an A/D converter used to control a manufacturing process? What range of data is acceptable, how fast should the system respond?
  • Where the customer is not too sure how the system will eventually behave, the analyst may explore the concept of a prototype. This is a part functional model of the software solution for the customer to assess.
  • Where safety critical software is being designed, a more formal specification may be required in terms of mathematical notation such as ‘Z’ or VDM, so that the resultant code can be shown to comply with the agreed specification.
  • The analyst may, where appropriate, require the customer to produce ‘ verification’ data. That is, data which can be used to test the program. The customer would have to provide test inputs and corresponding results, which could be used to assess the correctness of the software.
  • Analysis is often complicated by the fact that the customer may only be able to express the problem in terms that he/she understands. That is, they can only express the problem from a ‘ users point of view ’. Indeed, they may have little or no understanding of computers or software and may not even have a complete picture of how the system will behave at the initial stages of analysis.

Once the analysis is complete, a project plan can be drawn up to include, estimates of cost, manpower, resources, time scales etc.

Analysis Summary

The objective of requirements analysis then, is to create a “requirements specification document ” or a “ target document ”, that describes in as much detail and in an unambiguous a manner as possible, exactly what the product should do. This requirements document will then form the basis of the subsequent design phase. The requirements document may well contain

  • A Project plan including details of delivery times and cost estimates.
  • A model of the software’s functionality and behaviour in the form of ‘ data flow/ UML diagrams’ and, where appropriate, any performance and data considerations, any input/output details etc.
  • The results of any prototyping so that the appearance of the software and how it should behave can be shown to the designer. This may include a users manual.
  • Any formal Z/VDM specifications for the system requirements.
  • Any verification test data that may be used to determine that the finished product conforms to the agreed specification.

Analysis then can be summed by the activities in the following diagram

The Importance of Correct Analysis

The effects of incorrect or inaccurate analysis can have far reaching/devastating effects on the software time scale, usefulness and cost. This can be seen below, where the cost of maintaining or fixing incorrect software can be 100 times greater than the original cost of getting it right.

A structured illustration of the design process is shown above. The results of analysis, that is, the specification and model, feed into the design stage where an attempt is made to turn the ‘ model’ the system into a data structure and program, architecture which can be translated eventually into code

Software Testing and Debugging

Once the constituent software components/modules have been written, testing and debugging can begin. Testing involves the following techniques (amongst others)

  • Verification and Validation. That is, checking that the software meets the agreed specification and checking that the software is correct in its operation.
  • Black and white box testing techniques. That is, testing the insides of the modules for correct operation and testing the interfaces to the module.
  • Integration Testing : Testing that the modules all work together.
  • Acceptance Testing : Letting the customer test the product.
  • Debugging : The ‘art’ of identifying the cause of failure in a piece of software and correcting it.

Software Maintenance

Software maintenance reapplies each of the preceding life cycle steps to an existing program rather than a new one in order to correct or add new functionality.

Life Cycle Summary

The classic life cycle model of software development is perhaps the oldest and the most widely used technique for software engineering. However, it has a number of drawbacks:

  1. Real projects rarely follow the sequential flow that the classic life cycle model proposes. Iteration always seems to occur and creates problems in the application of the technique. Primarily, because development takes a finite amount of time and the customers needs change during that time. For example, the laws relating to tax are subject to change with every budget, while new competitors and even the company itself may change the way things are done.
  2. It is often difficult for the customer to state all requirements explicitly. The classic life cycle requires this and has difficulty accommodating the natural uncertainty that exists at the beginning of many projects.
  3. The customer must have patience. A working version of the program will not be available until late in the project time span. A major blunder, if undetected until the working program is reviewed, can be disastrous.

However, the classic life-cycle technique has a definite and important place in software engineering work. It provides a template into which methods for analysis, design, coding, testing, and maintenance can be placed and remains the most widely used procedural model for software engineering. While it does have weaknesses, it is significantly better than a haphazard approach to software development.

The benefit of the iterative model is the customer gets a core set of functions delivered early and thus can work with them quicker than if he/she waits for delivery of the whole system. Furthermore, software can be customer tested more quickly and thus any obvious errors in say the business models are detected early. Perhaps the best know iterative development processes are typified by the Extreme programming paradigm and the Rational Unified Process. Payment to the developer is also incremental

Iterative/Evolutionary Models – The Spiral Model

The spiral model for software engineering has been developed to encompass the best features of the iterative classic life cycle, while at the same time adding a new element, risk analysis. The model, represented by the spiral below, defines four major activities represented by the four quadrants:

  1. Planning-- determination of objectives, alternatives and constraints for the release
  2. Risk analysis--analysis of alternatives and identification/resolution of risks
  3. Engineering-- development of the "next-iteration/level" of the product
  4. Customer evaluation -- assessment of the results of engineering

With each iteration around the spiral (beginning at the centre and working outward), progressively more complete versions of the software are built. In other words, the product is delivered not as one complete monolithic monster, but as a series of iterative developments each of which delivers to the customer an executable program comprising progressively more functionality than the previous iteration.

During the first circuit around the spiral, objectives, alternatives, and constraints are defined and risks are identified and analysed. If risk analysis indicates that there is uncertainty in requirements, prototyping may be used in the engineering quadrant to assist both the developer and the customer. Simulations and other models may be used to further define the problem and refine requirements.

The customer evaluates the engineering work (the customer evaluation quadrant) and makes suggestions for modifications. Based on customer input, the next phase of planning and risk analysis occur. At each loop around the spiral, the culmination of risk analysis results in a " go, no-go " decision. If risks are too great, the project can be terminated. The spiral model paradigm for software engineering is currently the most realistic approach to the development for large-scale systems and software. It uses an evolutionary approach to software engineering, enabling the developer and customer to understand and react to risks at each evolutionary level.

Overview of the Rational Unified Process (RUP)

The RUP is both an iterative and an incremental process. What does this mean?

Iterative and incremental approaches treat software development as a number of small mini-projects or “roll outs”, each of which results in a working version of the software that can be delivered to the customer for use or test. In other words, it is not an attempt to build a complete system, but one that gradually evolves.

Each iteration is an attempt to add additional functionality to the system as dictated by a prioritised list of requirements. In UML terminology we refer to these as use- cases and they document the systems operation from the point of view of a user interacting with the system with some measurable return, i.e. the user gets value out of the interaction. For example, a cash dispenser (ATM) can be specified in terms of a number of use-cases such as

¾ Withdraw Cash ¾ Check Balance ¾ Order new check book ¾ Order Statement

Each of these use-cases represents major functionality and is thus a good candidate for an iteration. The 1 st^ roll out of the software might only implement the ‘Withdraw Cash’ use case while subsequent releases implement the others.

What are the various Phases of the RUP?

¾ Inception ¾ Elaboration ¾ Construction ¾ Transition

What is meant by Inception?

Inception establishes the case for the viability of the proposed system, e.g.

¾ What are the objectives of the project? ¾ Can we make it? ¾ How much will it cost? ¾ What risks are involved? ¾ What is the window of opportunity for the product? ¾ What return will the customer see on their investment? ¾ Does it make sense from a business point of view?

It also attempts to produce an outline architecture for the system, in other words, what components will be used to build the system and how will they interact?

What is meant by Elaboration?

Elaboration expands upon the work done during inception and attempts to

¾ Establish if the system can meet the expectations outlined during inception, e.g. deal with risk, cost, effect of technology and constraints. ¾ Capture full functional requirements, i.e. get a detailed description of what the system mush do. ¾ Create a detailed architecture to realise the requirements ¾ Prioritise risks and come up with a plan to address them (higher risks are usually dealt with earlier in the project) ¾ Finalise a business case, i.e. convince the customer you can deliver the goods on time and on budget.

What is meant by Construction?

Simply build a system, i.e. design and code a solution to the problems of inception and elaboration, prioritise the requirements and produce and decide on the functionality of the 1 st^ release of the software.

What is meant by Transition?

Roll out the next version of the system to the customer Correct defects and unidentified problems

Analysis Techniques

Now that we have seen each phase of the engineering design process described in simple terms, let us explore each phase in more detail.

The chances of a product being developed on time and within budget are somewhat slim unless the members of the software development team agree on what the software product will do. Only after a clear picture of the present situation has been gained can the team attempt to answer the critical question:

“What must the new product be able to do?”

The real objective of the requirements phase is to determine what software the client needs. This problem is exacerbated by the fact that many clients do not know what they need.

Furthermore, even if the client has a good idea of what is needed, he or she may have difficulty in articulating these ideas to the developers, because most clients are less computer literate than the members of the development team. There is a famous quote uttered by a US politician back in the 60’s as he realised he’d dropped a gaff and was rapidly trying to back-peddle his way out.

"…I know you believe you understood what you think I

said, but I am not sure you realise that what you heard

is not what I meant!"

This excuse applies equally well to the issue of requirements analysis. The developers hear their client's requests, but what they hear is not what the client should be saying.

Analysis Techniques

The principle objective of analysis is to uncover an understanding of the flow of information or data in the system, and/or its behaviour. That is, we seek an understanding of how information is transformed by the system, during its passage from input to output. We also seek to understand the systems interface characteristics and constraints e.g. this vending machine does not accept 'quarters'.

Analysis then attempts to uncover ‘ what’ the product does, and ‘ how it should behave ’ it does not concentrate in any way on how the software will be implemented. That comes later. For example, analysis might concentrate on the following issues

  • What data or events are input/recognised by the system?
  • What functions/transformations must the system provide?
  • What interfaces have been defined?
  • What constraints/limits apply?

Analysis Techniques

There is no one single analysis technique that is guaranteed to work and lead to a professional developed end product. Rather, several different techniques exist that are often combined, with each yielding up new information and understanding to the analyst. Here are some the most popular techniques that have a proven track record.

Technique 1 - Meetings and Discussions

One of the best initial analysis techniques is communication. Hold frequent discussions and reviews with the customer. This may sound obvious, but it is important to ask the right questions if it is going to be of use. Try using a combination of both open and closed questions with your customer. For example, an open question might ask them to explain what is wrong with their present arrangement, or to explain how the system should work. This will get them talking about the system and its solution from their point of view. You could also ask them to take you through a step-by-step sequence of typical operations, actions and/or calculations performed by the system, from initial input to final output to help understand the flow and sequence of data.

Closed questions are designed to seek detailed clarification of specific points. For example, what resolution graphics card will be required? What is the format of the report produced by the program? How fast should the system be in dealing with data? As your understanding of the system grows, you will be able to pose lots of ‘What should happen when ‘X’ takes place’ questions to uncover the systems behaviour.

Both types of questions can lead to an increased understanding of the system for both customer and developer alike. The result of such meetings is usually a written report, which the developer and customer agree or refine.

Most important of all, don’t make assumptions about how the software should work, in the absence of a clear explanation. If necessary, go back to the customer, discuss any problems with them and seek clarification of any ambiguities.

Technique 2 - Generate a Questionnaire

Another way of gaining understanding is to send a questionnaire to the relevant members of the client organisation. This technique is useful when the opinions of, say, hundreds of individuals need to be determined like a microsoft product.

Furthermore, a carefully thought-out written answer may be more accurate than an immediate verbal response to a question posed by an analyst. However, a meeting conducted by a methodical interviewer who listens carefully and poses questions that expand on initial responses will usually yield far better information than a thoughtfully worded questionnaire. However, because questionnaires are not interactive, there is no way that a new or modified question can be posed in response to an answer.

In essence these things identify the operations the software must perform and act on the objects identified previously. A similar process occurs in an attempt to identify any constraints imposed on the system for example:

“The system only accepts 5, 10, 20 and 50p coins”.

Lastly, performance criteria are assessed, For example:

“The system must generate a response within 20mS”.

  • Stage 3 - The members of the team (users, customers and developers) then meet and sit around a table and each in turn presents their findings. Common elements of each list are grouped together and refined into more detail in an attempt to elaborate the description of the item.

This process may help uncover new objects,behaviour, constraints and performance criteria, or highlights ambiguities and/or deficiencies in existing elements. The discussion may raise issues that may not be answerable at that meeting, thus an issues list is kept to record all unresolved details or questions for future meetings.

  • Stage 4 - Each member of the team then produces validation criteria against which the finished product can be assessed. That is data and results that can be used to check that the system performs according to the specification.
  • Stage 5 - Finally, someone from the team is given the job of drafting a mini- specification taking on board all aspects of the meeting.

The outcome of a FAST meeting is a mini-specification document as shown below.

Technique 5 - Design a Prototype.

A powerful technique for uncovering detail from the customer is to explore the concept of a prototype. Here the analyst presents a prototype model for the customer to evaluate. This could be something as simple as a paper and pencil model of the system showing how the user interacts with it. It could include a sequence of screen shots showing the appearance of the system performing critical operations, and perhaps the users input and the system responses to it.

At a more detailed level, it could include a part-working prototype showing how the system might behave (although you should be careful to ensure that the customer realises that this is not the finished product). If the system is an enhanced version of a previous one, the prototype might then consist simply of a discussion of the enhancements/changes to the product.

Prototyping begins with requirements gathering. Developer and customer meet and define the overall objectives for the software, identify whatever requirements are known, and outline areas where further definition is required. A " quick design " then occurs. The quick design focuses on a representation of those aspects of the software that will be visible to the user. For example, inputs, outputs, operation and behaviour. Performance is not usually assessed at this stage.

The quick design leads to the construction of a prototype. The prototype is evaluated by the customer/user and is used to refine requirements for the software to be developed. A process of iteration occurs

Reasons for Prototyping

  • Customers often understand (or think they understand) the problem domain, that is, what they want to achieve with the system, but often have little appreciation of what the finished product will look like or how it will behave. Creating a prototype educates the customer and gives them an indication of what they can expect from the finished system.
  • Customers hate surprises and frequently reject software based on how they see the software working and how effectively it solves their problems, not on how clever the code or the designers have been in creating it. Again, creating a prototype educates the customer and gives them an indication of what they can expect from the finished system.
  • Seeing a prototype often serves to enhance an understanding of the problem domain and to uncover anomalies and ambiguities in its behaviour/operation. The earlier this is detected, the better for everyone.