Software Engineering CS340 The software is instruction or computer program that when executed provide desired features, function, and performance. A data structure that enables the program to adequately manipulate information and document that describe the operation and use of the program. Characteristic of software: There is some characteristic of software which is given below: 1. 2. 3. 4. 5. 6. Functionality Reliability Usability Efficiency Maintainability Portability Changing Nature of Software: Nowadays, seven broad categories of computer software present continuing challenges for software engineers .which is given below: 1. System Software: System software is a collection of programs which are written to service other programs. Some system software processes complex but determinate, information structures. Other system application process largely indeterminate data. Sometimes when, the system software area is characterized by the heavy interaction with computer hardware that requires scheduling, resource sharing, and sophisticated process management. 2. Application Software: Application software is defined as programs that solve a specific business need. Application in this area process business or technical data in a way that facilitates business operation or management technical decision making. In addition to convention data processing application, application software is used to control business function in real time. Software Crisis Software crisis is a term used in the early days of computing science for the difficulty of writing useful and efficient computer programs in the required time. The software crisis was due to the rapid increases in computer power and the complexity of the problems that could now be tackled. With the increase in the complexity of the software, many software problems arose because existing methods were inadequate. The term "software crisis" was coined by some attendees at the first NATO Software Engineering Conference in 1968 at Garmisch. The causes of the software crisis were linked to the overall complexity of hardware and the software development process. The crisis manifested itself in several ways: • • • • • • • Projects running over-budget Projects running over-time Software was very inefficient Software was of low quality Software often did not meet requirements Projects were unmanageable and code difficult to maintain Software was never delivered The main cause is that improvements in computing power had outpaced the ability of programmers to effectively use those capabilities. Various processes and methodologies have been developed over the last few decades to improve software quality management such as procedural programming and object-oriented programming. However, software projects that are large, complicated, poorly specified, or involve unfamiliar aspects, are still vulnerable to large, unanticipated problems. Software Engineering Software Engineering is the systematic approach for development, operation, maintenance and retirement of software. Or "The systematic application of scientific and technological knowledge, methods, and experience to the design, implementation, testing, and documentation of software" Or "The application of a systematic, disciplined, quantifiable approach to the development, operation, and maintenance of software" Software Process A software development process is the process of dividing software development work into smaller, parallel or sequential steps or subprocesses to improve design, product management, and project management. It is also known as a software development life cycle (SDLC). The methodology may include the pre-definition of specific deliverables and artifacts that are created and completed by a project team to develop or maintain an application. Most modern development processes can be vaguely described as agile. Other methodologies include waterfall, prototyping, iterative and incremental development, spiral development, rapid application development, and extreme programming. Process Models A software process model is an abstraction of the software development process. The models specify the stages and order of a process. So, think of this as a representation of the order of activities of the process and the sequence in which they are performed. A model will define the following: • • • • The tasks to be performed The input and output of each task The pre and post conditions for each task The flow and sequence of each task The Waterfall Model The Waterfall Model was the first Process Model to be introduced. It is also referred to as a linear-sequential life cycle model. It is very simple to understand and use. In a waterfall model, each phase must be completed before the next phase can begin and there is no overlapping in the phases. The Waterfall model is the earliest SDLC approach that was used for software development. The waterfall Model illustrates the software development process in a linear sequential flow. This means that any phase in the development process begins only if the previous phase is complete. In this waterfall model, the phases do not overlap. Waterfall Model - Design Waterfall approach was first SDLC Model to be used widely in Software Engineering to ensure success of the project. In "The Waterfall" approach, the whole process of software development is divided into separate phases. In this Waterfall model, typically, the outcome of one phase acts as the input for the next phase sequentially. The sequential phases in Waterfall model are − • • • • • • Requirement Gathering and analysis − All possible requirements of the system to be developed are captured in this phase and documented in a requirement specification document. System Design − The requirement specifications from first phase are studied in this phase and the system design is prepared. This system design helps in specifying hardware and system requirements and helps in defining the overall system architecture. Implementation − With inputs from the system design, the system is first developed in small programs called units, which are integrated in the next phase. Each unit is developed and tested for its functionality, which is referred to as Unit Testing. Integration and Testing − All the units developed in the implementation phase are integrated into a system after testing of each unit. Post integration the entire system is tested for any faults and failures. Deployment of system − Once the functional and non-functional testing is done; the product is deployed in the customer environment or released into the market. Maintenance − There are some issues which come up in the client environment. To fix those issues, patches are released. Also to enhance the product some better versions are released. Maintenance is done to deliver these changes in the customer environment. Advantages of the Waterfall Model are as follows − • • • • • • • • Simple and easy to understand and use Easy to manage due to the rigidity of the model. Each phase has specific deliverables and a review process. Phases are processed and completed one at a time. Works well for smaller projects where requirements are very well understood. Clearly defined stages. Well understood milestones. Easy to arrange tasks. Process and results are well documented. Waterfall Model - Disadvantages The disadvantage of waterfall development is that it does not allow much reflection or revision. Once an application is in the testing stage, it is very difficult to go back and change something that was not well-documented or thought upon in the concept stage. The major disadvantages of the Waterfall Model are as follows − • • • • • • • No working software is produced until late during the life cycle. High amounts of risk and uncertainty. Not a good model for complex and object-oriented projects. Poor model for long and ongoing projects. Not suitable for the projects where requirements are at a moderate to high risk of changing. So, risk and uncertainty is high with this process model. It is difficult to measure progress within stages. Cannot accommodate changing requirements. The Incremental Model Incremental Model is a process of software development where requirements divided into multiple standalone modules of the software development cycle. In this model, each module goes through the requirements, design, implementation and testing phases. Every subsequent release of the module adds function to the previous release. The process continues until the complete system achieved. The various phases of incremental model are as follows: 1. Requirement analysis: In the first phase of the incremental model, the product analysis expertise identifies the requirements. And the system functional requirements are understood by the requirement analysis team. To develop the software under the incremental model, this phase performs a crucial role. 2. Design & Development: In this phase of the Incremental model of SDLC, the design of the system functionality and the development method are finished with success. When software develops new practicality, the incremental model uses style and development phase. 3. Testing: In the incremental model, the testing phase checks the performance of each existing function as well as additional functionality. In the testing phase, the various methods are used to test the behavior of each task. 4. Implementation: Implementation phase enables the coding phase of the development system. It involves the final coding that design in the designing and development phase and tests the functionality in the testing phase. After completion of this phase, the number of the product working is enhanced and upgraded up to the final system product When we use the Incremental Model? • • • • • When the requirements are superior. A project has a lengthy development schedule. When Software team are not very well skilled or trained. When the customer demands a quick release of the product. You can develop prioritized requirements first. Advantage of Incremental Model • • • • • Errors are easy to be recognized. Easier to test and debug More flexible. Simple to manage risk because it handled during its iteration. The Client gets important functionality early. Disadvantage of Incremental Model • • • Need for good planning Total Cost is high. Well defined module interfaces are needed. Evolutionary Model Evolutionary model is a combination of Iterative and Incremental model of software development life cycle. Delivering your system in a big bang release, delivering it in incremental process over time is the action done in this model. Some initial requirements and architecture envisioning need to be done. The Evolutionary development model divides the development cycle into smaller, incremental waterfall models in which users are able to get access to the product at the end of each cycle. Feedback is provided by the users on the product for the planning stage of the next cycle and the development team responds, often by changing the product, plan or process. Therefore, the software product evolves with time. Evolutionary model suggests breaking down of work into smaller chunks, prioritizing them and then delivering those chunks to the customer one by one. The number of chunks is huge and is the number of deliveries made to the customer. The main advantage is that the customer’s confidence increases as he constantly gets quantifiable goods or services from the beginning of the project to verify and validate his requirements. The model allows for changing requirements as well as all work in broken down into maintainable work chunks. Advantages: • • In evolutionary model, a user gets a chance to experiment partially developed system. It reduces the error because the core modules get tested thoroughly. Disadvantages: • Sometimes it is hard to divide the problem into several versions that would be acceptable to the customer which can be incrementally implemented and delivered. Concurrent Process Models Concurrent models are those models within which the various activities of software development happen at the same time, for faster development and a better outcome. The concurrent model is also referred to as a parallel working model. Advantages of the concurrent development model • • • • This model is applicable to all types of software development processes. It is easy for understanding and use. It gives immediate feedback from testing. It provides an accurate picture of the current state of a project. Disadvantages of the concurrent development model • • It needs better communication between the team members. This may not be achieved all the time. It requires to remember the status of the different activities. Component Based Development Component Based development is defined as a set of reuse-enabling technologies, tools and techniques that allow application development (AD) organizations to go through the entire AD process (i.e., analysis design, construction and assembly) or through any particular stage via the use of predefined component-enabling technologies (such as AD patterns, frameworks, design templates) tools and application building blocks. components-based development (CBD), is a branch of software engineering that emphasizes the separation of concerns with respect to the wide-ranging functionality available throughout a given software system. It is a reuse-based approach to defining, implementing and composing loosely coupled independent components into systems. A simple example of several software components - pictured within a hypothetical holiday-reservation system. Formal Methods Model The formal methods model is an approach to software engineering that applies mathematical methods or techniques to the process of developing complex software systems. The approach uses a formal specification language to define each characteristic of the system. The language is very particular and employs a unique syntax whose components includes objects, relations, and rules. When used together, these components can validate the correctness of each characteristic. Formal Methods Model: Steps There are two steps that comprise the formal methods model. Those steps are the property-based specification and the model-based specification. Property-Based Specification Property-based specification describes two main elements in the system; those elements are the operations that can be performed on the system and the relationships between the operations. For example, consider a simple instant messaging application for your cell phone. Then some operations might be: • • • • • Start up Send message Receive message Display message, and Shut down The relationships between these operations might include: • • • Startup must come before any other operation. Shut down must be the last operation performed. Display message comes during each send message and after each receive message. Model-Based Specification Model-based specification describes the states the system can be in and how the operations can transition the system from state to state. Consider the instant messaging application example mentioned earlier. States the system may be in might include the very similar-sounding states: • • • • • Starting up Sending message Receiving message Displaying message, and Shutting down Aspect Oriented Software Development Aspect-oriented software development (AOSD) is a software design solution that helps address the modularity issues that are not properly resolved by other software approaches, like procedural, structured and object-oriented programming (OOP). AOSD complements, rather than replaces, these other types of software approaches. AOSD is also known as aspect-oriented programming (AOP). AOSD features are as follows: • • • • • • • • • • Considered a subset of post-object programming technologies Better software design support through isolating application business logic from supporting and secondary functions Provides complementary benefits and may be used with other agile processes and coding standards Key focus - Identification, representation and specification of concerns, which also may be cross-cutting Provides better modularization support of software designs, reducing software design, development and maintenance costs Modularization principle based on involved functionalities and processes Because concerns are encapsulated into different modules, localization of crosscutting concerns is better promoted and handled Provides tools and software coding techniques to ensure modular content support at the source code level Promotes reusability of code used for the modularization of cross-cutting concerns Smaller code size, due to tackling cross cutting concerns Cross Cutting Concerns Cross cutting concerns are parts of a program that rely on or must affect many other parts of a system. The Unified Process The Unified Software Development Process or Unified Process is an iterative and incremental software development process framework. The best-known and extensively documented refinement of the Unified Process is the Rational Unified Process (RUP). Other examples are OpenUP and Agile Unified Process. The Unified Process is not simply a process, but rather an extensible framework which should be customized for specific organizations or projects. Unified Process Characteristics • Iterative and incremental • Architecture-centric • Risk-focused The Unified Process divides the project into four phases: • • • • Inception Elaboration (milestone) Construction (release) Transition (final production release) Inception phase Inception is the smallest phase in the project, and ideally, it should be quite short. If the Inception Phase is long then it may be an indication of excessive up-front specification, which is contrary to the spirit of the Unified Process. The following are typical goals for the Inception phase: • • • • Establish Prepare a preliminary project schedule and cost estimate Feasibility Buy or develop it Elaboration phase During the Elaboration phase, the project team is expected to capture a healthy majority of the system requirements. However, the primary goals of Elaboration are to address known risk factors and to establish and validate the system architecture. Common processes undertaken in this phase include the creation of use case diagrams, conceptual diagrams and package diagrams. Construction phase Construction is the largest phase of the project. In this phase, the remainder of the system is built on the foundation laid in Elaboration. System features are implemented in a series of short, timeboxed iterations. Each iteration results in an executable release of the software. It is customary to write full-text use cases during the construction phase and each one becomes the start of a new iteration. Transition phase The final project phase is Transition. In this phase the system is deployed to the target users. Feedback received from an initial release (or initial releases) may result in further refinements to be incorporated over the course of several Transition phase iterations. The Transition phase also includes system conversions and user training. Agile Software Development In software development, agile (sometimes written Agile) is a set of practices intended to improve the effectiveness of software development professionals, teams, and organizations. It involves discovering requirements and developing solutions through the collaborative effort of self-organizing and cross-functional teams and their customer(s)/end user(s).[2] It advocates adaptive planning, evolutionary development, early delivery, and continual improvement, and it encourages flexible responses to changes in requirements, resource availability, and understanding of the problems to be solved. The Manifesto for Agile Software Development Agile software development values Based on their combined experience of developing software and helping others do that, the seventeen signatories to the manifesto proclaimed that they value:[5] • • • • Individuals and interactions over processes and tools Working software over comprehensive documentation Customer collaboration over contract negotiation Responding to change over following a plan Agile software development principles Agile software development principles The Manifesto for Agile Software Development is based on twelve principles: 1. Customer satisfaction by early and continuous delivery of valuable software. 2. Welcome changing requirements, even in late development. 3. Deliver working software frequently (weeks rather than months) 4. Close, daily cooperation between business people and developers 5. Projects are built around motivated individuals, who should be trusted 6. Face-to-face conversation is the best form of communication (co-location) 7. Working software is the primary measure of progress 8. Sustainable development, able to maintain a constant pace 9. Continuous attention to technical excellence and good design 10. Simplicity—the art of maximizing the amount of work not done—is essential 11. Best architectures, requirements, and designs emerge from self-organizing teams 12. Regularly, the team reflects on how to become more effective, and adjusts accordingly. Overview Iterative, incremental, and evolutionary Most agile development methods break product development work into small increments that minimize the amount of up-front planning and design. Iterations, or sprints, are short time frames (timeboxes) that typically last from one to four weeks. Each iteration involves a cross-functional team working in all functions: planning, analysis, design, coding, unit testing, and acceptance testing. At the end of the iteration a working product is demonstrated to stakeholders. This minimizes overall risk and allows the product to adapt to changes quickly. An iteration might not add enough functionality to warrant a market release, but the goal is to have an available release (with minimal bugs) at the end of each iteration. Through incremental development products have room to "fail often and early" throughout each iterative phase instead of drastically on a final release date.[26] Multiple iterations might be required to release a product or new features. Working software is the primary measure of progress. Efficient and face-to-face communication The principle of co-location is that co-workers on the same team should be situated together to better establish the identity as a team and to improve communication. This enables face-to-face interaction, ideally in front of a whiteboard, that reduces the cycle time typically taken when questions and answers are mediated through phone, persistent chat, wiki, or email.[28] No matter which development method is followed, every team should include a customer representative ("Product Owner" in Scrum). This person is agreed by stakeholders to act on their behalf and makes a personal commitment to being available for developers to answer questions throughout the iteration. At the end of each iteration, stakeholders and the customer representative review progress and re-evaluate priorities with a view to optimizing the return on investment (ROI) and ensuring alignment with customer needs and company goals. The importance of stakeholder satisfaction, detailed by frequent interaction and review at the end of each phase, is why the methodology is often denoted as a "Customer Centered Methodology".[29] In agile software development, an information radiator is a (normally large) physical display located prominently near the development team, where passers-by can see it. It presents an up-todate summary of the product development status.[30][31] A build light indicator may also be used to inform a team about the current status of their product development. Very short feedback loop and adaptation cycle A common characteristic in agile software development is the daily stand-up (a daily scrum in Scrum framework). In a brief session, team members report to each other what they did the previous day toward their team's iteration goal, what they intend to do today toward the goal, and any roadblocks or impediments they can see to the goal.[32] Quality focus Specific tools and techniques, such as continuous integration, automated unit testing, pair programming, test-driven development, design patterns, behavior-driven development, domain-driven design, code refactoring and other techniques are often used to improve quality and enhance product development agility.[33] This is predicated on designing and building quality in from the beginning and being able to demonstrate software for customers at any point, or at least at the end of every iteration. Human Aspects of Software Engineering Human Aspects of Software Engineering details software engineering from the perspective of those involved in the software development process: individuals, team, customers, and the organization.