What is a system? Software Engineering Software Processes A purposeful collection of inter-related components working together to achieve some common objective. A system may include software, mechanical, electrical and electronic hardware and be operated by people. System components are dependent on other system components The properties and behaviour of system components are inextricably inter-mingled 1 2 The software process A structured set of activities required to develop a software system Specification; ; Validation; Evolution. A software process model is an abstract representation of a process. It presents a description of a process from some particular perspective. Software process model consists of a set of Process Steps/Stages/Activities - The process Steps are the set of essential activities that must take place to develop a quality product Each Process Step will use a number of methods and tools appropriate to the particular piece of software being Methods and Tools Methods are simply techniques that we apply to accomplish something. - These are the what to do, (the recipe for cake) Tools, more generally, have two meanings - One hand they can refer to software tools used to help in the development of software A compiler or, even a word processor, might be used - On the other, they may refer to the notations that we use to specify problems and design A set of methods are to be used for specifying, designing and constructing a software/system A set of tools are to be used in conjunction with the developed and often to the style of process model used 3 4 method s techniques for the production of outputs Linear Sequential Process Model (I) Linear Sequential Process Model suggest a systematic, sequential approach to software development that begins at the system level and progress through various steps. Linear Sequential Process Model provides a template into which methods for analysis, design, coding, testing, and maintenance can be placed. It remains a widely used procedural model for software engineering. In this model, each step is completed and then another step is started. Therefore, there is no way to back into previous step. Linear Sequential Process Model (II) How do we design our software? Analysis Code Maintain What is the problem? How can it be specified unequivocally? How do we implement our software How do we uncover errors in the software? How will we support our software over the long term? Considered as ideal process model 5 6 1
Linear Sequential Process Model (III) Analysis To understand the nature of the program to be built The analyst must understand the information domain, as well as required function, behavior, performance and interface is the process of translating between the specification of what the system must do into a specification of how the system will accomplish it Code The code process stage results in the actual program being written in a programming language Linear Sequential Process Model (IV) This stage attempts to determine that - the software meets its specification i.e. It behaves as it should - the software does not throw up any nasty surprises i.e. It behaves well under all circumstances ing is surprisingly difficult - For even small software programs it is impossible to test out every combination of input and variable value - Good design and specification of test plans can reduce uncertainty but cannot remove it - ing only finds errors, it does not provide any guarantee that no errors exist 7 8 Linear Sequential Process Model (V) Maintenance A lot of programs undergo change after they have been delivered to the customer changes are required because - errors have been found in the software - the software must be updated to accommodate changes in its environment - the customer s requirements have changed Maintenance is carried out by applying the process model to existing software Successful maintenance requires excellent documentation Software Process Models Waterfall model Incremental model Prototyping Spiral Model An Advanced Software Life Cycle Model 9 10 The Waterfall Process Model The Waterfall Process Model The linear Process Model shown earlier requires that each process stage is correct and complete before the next stage is started In practice, it is likely that a later stage may find errors introduced in an earlier stage The Waterfall Process Model adds a backward path so that problems in a later stage may be addressed by revisiting an earlier stage Analysis Code This model rather assumes that errors can be fixed in the previous stage. This is not always the case Maintain 11 12 2
Advantages of Waterfall Model Simple goal. Simple to understand and use. Clearly defined stages. Well understood milestones. Easy to arrange tasks. Process and results are Well documented. Easy to manage. Each phase has specific deliverable and a review. Works well for projects where requirements are well understood. Works well when quality is more important then cost/schedule. 13 Customers/End users already know about it. Disadvantages of Waterfall Model It is difficult to measure progress within stages. Cannot accommodate changing requirements. No working software is produced until late in the life cycle. Risk and uncertainty is high with this process model. Adjusting scope during the life cycle can end a project Not suitable for complex projects Not suitable for projects of long duration because in long running projects requirements are likely to change. Integration is done as a "big-bang at the very end, which doesn't allow to identify any technological or business bottleneck or challenges early. Users can only judge quality at the end. Attempt to go back 2 or more phases is very costly. Percentage completion of functionality can not be determined in mid of the project because every functionality is undergoing some phase. 14 Very risky, since one process can not start before finishing the other. Linear Sequential Process Model vs Waterfall Model Linear Sequential Process Model Each phase of the linear sequential process model has a welldefined starting and ending point. All requirements are gathered before the project work is started. Later stages may find errors introduced in an earlier stage. This process cannot ensure that the each stage is complete and error free. Waterfall Model Each stage of this model is connected with the previous stage by a backward path. Often the full requirements only become known/ are realized, when user has the software. Problems in a later stage may be addressed by revisiting an earlier stage by the backward path. Waterfall process gives the surety that each stage is correct by Prototyping The prototyping approach is intended to get over the waterfall model s problems - a working system only appearing at the end - difficulties in getting user requirements By providing early versions that exhibit only part of the functionality Analogous to the use of prototypes in other fields motor industry etc. - The intention of the prototype may be to only show certain features So a prototype is - a working model of (possibly parts of ) a software system that emphasizes certain aspects Note that our analogy is a little flawed - In other engineering disciplines there is a high manufacturing cost - In software there is zero - So if we were to produce the full working model it would be equivalent to 15 16 revisiting an earlier stage by the backward path. implementation itself Throw Away Prototyping Process Model Prototyping Loop Spec. Implement Review Specification Derived From Software Spec. Standard Development Process Implement Maintain 17 Throw Away Prototyping (I) Used for - data-oriented applications - applications with considerable emphasis on the user interface - systems where there is a high degree of user interaction Benefits - Requirements become clear as customers actually use the system Misunderstandings are clarified Missing functions can be identified Poor interfaces can be refined Missing requirements can be identified - Working system is produced although limited in functionality and performance 18 - becomes the specification 3
Throw Away Prototyping (II) Problems - The prototype will have features that have been deliberately left out May not be able to prototype all features - System characteristics like performance and reliability will not be addressed - The prototype will not be used in precisely the same way as the real system For example, it may be slower so users will adjust in different ways - Can be difficult to manage Evolutionary Prototyping If you ve built a prototype, there is some temptation to try and evolve this into the software you deliver - In general, this is not a good idea since Certain issues have been ignored Further development may lead to a poorly structured system - Difficult to maintain - However, for certain types of system, particularly those where it is difficult or impossible to develop a specification For example certain AI systems - a prototype that evolves into the final system may be used Called Evolutionary Prototyping or Exploratory Programming 19 20 Evolutionary Prototyping Process Model Spec. Implement Review Final System Advantages -For small or medium-size interactive systems; For parts of large systems (e.g. the user interface); For short-lifetime systems. Problems -difficult to manage - Lack of process visibility; Systems are often poorly structured; Special skills (e.g. in languages 21 for rapid prototyping) may be required. Incremental Process Model The waterfall model has a Big Bang, all software appears at the end of the project - To avoid this a system can be delivered as a set of increments, each increment separated by a pre-planned time period - The idea is that the customer gets software earlier So redirecting the project becomes easier if change is needed - Also this approach tends to reduce overfunctionality Where the customer specifies featurtes that are not really used Rather than deliver the system as a single delivery, the development and delivery is broken down into increments with each increment delivering part of the required functionality. User requirements are prioritised and the highest priority requirements are included in early increments. Once the development of an increment is started, the requirements are frozen though requirements for later increments can continue to evolve. 22 Incremental Process Model A= Analysis D= C= Code T = First Increment (Core Product) Second Increment Third Increment Advantages of Incremental Process Model Some working functionality can be developed quickly and early in the life cycle. Results are obtained early and periodically. Parallel development can be planned. Progress can be measured. Less costly to change the scope/requirements. ing and debugging during smaller iteration is easy. Risks are identified and resolved during an iteration; and each iteration is an easily managed milestone. Easier to manage risk - High risk part is done first. With every increment operational product is delivered. Fourth Increment 23 24 Issues, challenges & risks identified from each increment can be utilized/applied to the next increment. 4
Disadvantages of Incremental Process Model Spiral Model More resources may be required. Although cost of change is lesser but it is not very suitable for changing requirements. More management attention is required. Each phase of an iteration is rigid with no overlaps. System architecture or design issues may arise because not all requirements are gathered. up front for the entire life cycle. Does not allow iterations within an increment. Defining increments may require definition of the complete system. The spiral model (or risk-based model) is an evolutionary model that couples the: - iterative nature of the prototyping approach - with the systematic approach of the waterfall model Process is represented as a spiral rather than as a sequence of activities with backtracking. Each loop in the spiral represents a phase in the process. No fixed phases such as specification or design - loops in the spiral are chosen depending on what is required. Risks are explicitly assessed and resolved throughout the process. 25 26 Spiral model of the software process Spiral model sectors Objective setting Specific objectives for the phase are identified. Risk assessment and reduction Risks are assessed and activities put in place to reduce the key risks. Development and validation A development model for the system is chosen which can be any of the generic models. Planning The project is reviewed and the next phase of the spiral is planned. 27 28 Advantages of Spiral Model Changing requirements can be accommodated. Allows for extensive use of prototypes Requirements can be captured more accurately. Users see the system early. Development can be divided in to smaller parts and more risky parts can be developed earlier which helps better risk management. 29 Disadvantages of Spiral Model Management is more complex. End of project may not be known early. Not suitable for small or low risk projects (expensive for small projects). Process is complex Spiral may go indefinitely. Large number of intermediate stages require excessive documentation. 30 5
An Advanced Software Development Life Cycle New system request Feasibility study (1) Change request Change request definition (8) Requirement definition (2) Implementation (7) System specification (3) ing (6) System design (4) Program & Coding (5) 31 6