Partial preview of the text
Download Software Engineering lecture Notes and more Lecture notes Software Engineering in PDF only on Docsity!
1. The Evolving Role and Changing Nature of Software Software is a collection of computer programs, data and related documentation that performs useful tasks for users. In the early days of computing, software was mainly written for scientific calculations and basic business operations. Today, software is used in almost every area of human life. Software is used in education, banking, healthcare, transportation, communication, entertainment, business and government services. Modern software is not limited to desktop computers. It also runs on smartphones, web servers, cloud platforms, vehicles, medical devices and embedded systems. The role of software has therefore changed from a supporting tool to an important part of many products and services. -—Changing Role of Software Scientific & Business Programs Personal & Web Software Mobile & Cloud Software Al, loT & Embedded Systems Software as a Core Service 1.1 Software as a Product Software can be developed as a product and sold to many users. The product may be installed on a computer or delivered through the internet. Example: Microsoft Office is a software product used by many organizations and individuals. 1.2 Software as a Service Software can also be provided as an online service. Users access the software through a browser or mobile application. The service provider manages servers, updates and maintenance. Example: Google Docs allows users to create and edit documents through the internet. 1.3 Software in Embedded Systems Embedded software is built into a physical device. It controls the functions of that device. Software Engineering — Unit 4 Page 3 Example: A washing machine uses software to control washing time, water level and spinning. Example: A car uses software for braking assistance, engine control and navigation. 1.4 Software in Mobile and Web Applications Mobile applications run on smartphones and tablets. Web applications run through web browsers and communicate with web servers. Example: A food delivery application uses software for login, restaurant search, order placement, payment and delivery tracking. 1.5 Software in Cloud Computing Cloud software runs on remote servers connected through the internet. Users can access the software from different devices. Cloud systems can increase storage and computing resources when required. Example: Online storage services allow users to save files on cloud servers and access them from a mobile phone or computer. 1.6 Software with Artificial Intelligence Modern software can use artificial intelligence to learn from data and make predictions or decisions. Al-based software is used in recommendation systems, image recognition, language processing and fraud detection. Example: A shopping application can recommend products based on a user's previous searches and purchases. 1.7 Characteristics of Modern Software * Modern software is usually connected to networks and other systems. * It often handles large amounts of data. ¢ It must provide security against unauthorized access. * It must be easy to update when requirements change. * It must work on different devices and platforms when required. ¢ It often needs high availability and good performance. Software Engineering — Unit 4 Page 4 Tools reduce manual work and improve consistency. Tools may support coding, version control, testing, project management and deployment. Example: Visual Studio Code can be used for coding. Git can be used for version control. Selenium can be used for automated web testing. 2.5 Relationship Between the Layers Quality focus supports all other layers. The process organizes the development work. Methods explain how individual activities are performed. Tools help people apply the process and methods efficiently. Software Engineering — Unit 4 Page 6 3. Generic Software Process Framework A software process framework gives a common structure for software development. The framework can be adapted for small, medium or large projects. A commonly used generic framework contains five framework activities: communication, planning, modeling, construction and deployment. Generic Software Process Framework Communication _————————————— Planning LT Modeling oY a Construction =—$<$<___—_t4——__j4 Deployment 3.1 Communication Communication is the first major activity. The development team communicates with customers, users and other stakeholders. The team tries to understand the problem, business goals and user needs. Requirements are discussed and clarified during this activity. Example: For a college attendance system, the team asks teachers how attendance is recorded, what reports are needed and who can edit attendance. 3.2 Planning Planning identifies the work that must be completed. The team estimates time, cost, people and resources. The project schedule and milestones are prepared. Risks are identified and possible responses are planned. Example: The team may plan four weeks for requirements and design, six weeks for coding and three weeks for testing. 3.3 Modeling Modeling helps the team understand the system before detailed coding. Requirements are converted into analysis and design models. Models may include use-case diagrams, class diagrams, data-flow diagrams, database designs and architecture diagrams. Software Engineering — Unit 4 Page 7 4. Software Process Models A software process model describes how software development activities are organized and performed. Different projects require different process models. The major models in this unit are waterfall, incremental, evolutionary and unified process models. 4.1 Waterfall Model The waterfall model is a plan-driven software process model. Development activities are arranged in a sequence. One major phase is completed before the next phase starts. Waterfall Model Requirements Design Implementation Testing Deployment Maintenance In the requirements phase, the team identifies and documents what the system should do. In the design phase, the architecture, database, interfaces and other technical details are designed. In the implementation phase, programmers write the source code. In the testing phase, the software is checked for defects. In deployment, the completed software is delivered to users. In maintenance, changes and corrections are made after delivery. Example: A government payroll system with fixed legal requirements may use a plan-driven approach because requirements need formal approval and documentation. 4.2 Advantages of Waterfall * The phases are easy to understand and manage. * Documentation is usually prepared in detail. * Progress can be measured against planned phases. * It can work well when requirements are stable and clearly known. Software Engineering — Unit 4 Page 9 4.3 Limitations of Waterfall * It is difficult to respond quickly to changing requirements. * Users may see a working product only after major development is completed. ¢ Errors in requirements can become expensive to correct later. * The model is less suitable when the technology or requirements are uncertain. Software Engineering — Unit 4 Page 10 6. Evolutionary Development Evolutionary development is used when requirements are not completely known at the beginning. The software is developed through repeated versions. Each version is evaluated and improved using user feedback. The system evolves toward the final product. Evolutionary Development Cycle Initial Requirements Prototype / Initial Version User Evaluation Improvement New Version 6.1 Prototyping A prototype is an early model of a software system. It may contain only selected functions. The purpose is to understand requirements and user expectations. Users can see the prototype and suggest changes. Example: A hospital wants a new appointment system but is unsure about the screen layout. A prototype can show patient registration, doctor selection and appointment booking before full development. 6.2 Spiral-style Risk-driven Evolution Some evolutionary approaches give special attention to project risks. The team identifies major risks before selecting technical solutions. The software is developed in repeated cycles while risks and requirements are reviewed. Example: If a banking application requires a new payment technology, the team may first build a small proof of concept to check security and technical feasibility. 6.3 Advantages ¢ Useful when requirements are uncertain. * Users can provide feedback early. * Problems can be discovered before full development. * The system can adapt to changing needs. Software Engineering — Unit 4 Page 12 6.4 Limitations * The project can continue for a long time if requirements keep changing. * Frequent changes can make architecture difficult to control. * Management and cost estimation can be harder than in a fully planned project. Software Engineering — Unit 4 Page 13 ¢ It is iterative and incremental. ¢ It is use-case driven in many implementations. * It gives importance to architecture. * Risk is considered throughout development. Software Engineering — Unit 1 Page 15 8. Agile Software Development Agile software development is an approach that focuses on delivering useful software quickly and responding to change. Agile teams work in short development cycles. The customer or product representative provides feedback regularly. Requirements can be changed when business needs change. Working software is delivered frequently. Typical Agile Plan Small Work Develop Test Review with Customer Improve / Next Cycle 8.1 Agile Manifesto — Four Core Values Agile development is based on four important values. Value Meaning Individuals and interactions over Good communication and teamwork are given greater processes and tools importance than depending only on tools or procedures. Working software over comprehensive Useful working software is given priority, while documentation necessary documentation is still maintained. Customer collaboration over contract The development team works closely with the customer negotiation instead of depending only on an initial contract. Responding to change over following a The team accepts useful changes even when they plan require changes to the original plan. 8.2 Agile Principles in Simple Language * Deliver useful software early and continue delivering it regularly. * Accept changing requirements when they provide value to the customer. ¢ Customers and developers should communicate frequently. ¢ Working software should be a major measure of progress. Software Engineering — Unit 4 Page 16 9. Agile Methods Agile is a general development approach. Different agile methods provide specific practices for applying it. Common agile methods include Extreme Programming, Scrum, Kanban and related lightweight practices. 9.1 Extreme Programming (XP) Extreme Programming is an agile method that gives strong importance to software quality, customer feedback and frequent delivery. XP uses short iterations and frequent releases. Developers work closely with customers and other team members. -———Important XP Practi: Pair Te: A Programming Development Continuous 5 Integration Simple Design ] Refactoring Small Releases Collective Ownership 9.2 Pair Programming Two programmers work together at one workstation or through a shared development environment. One programmer writes code while the other reviews the code. They can change roles frequently. Example: One developer writes a login function while the second checks the logic, security and possible errors. 9.3 Test-Driven Development (TDD) In TDD, a test is written before the related production code. The developer first creates a test that fails. The developer writes enough code to make the test pass. The code is then improved without changing its required behavior. Software Engineering — Unit 4 Page 18 TDD Cycle Write Test Test Fails Write Code Test Passes Refactor O_o Repeat 9.4 Continuous Integration Developers integrate their code into a shared repository frequently. Automated builds and tests can run after integration. Problems are detected early instead of waiting until the end. Example: When a developer pushes code to Git, an automated pipeline can build the project and run unit tests. 9.5 Refactoring Refactoring means improving the internal structure of code without changing its intended external behavior. It makes code easier to read, maintain and extend. Example: A long function can be divided into smaller functions with meaningful names while keeping the same output. Software Engineering — Unit 4 Page 19 Feedback is collected and the backlog may be updated. 10.5 Sprint Retrospective The team discusses how the Sprint went. The team identifies what worked well and what should be improved. The team decides on practical improvements for the next Sprint. 10.6 Scrum Roles The Product Owner focuses on product value and backlog ordering. Developers create the product increment. The Scrum Master helps the team understand and apply Scrum and helps remove impediments. Software Engineering — Unit 4 Page 21 11. Plan-Driven Development and Agile Development Plan-driven development and agile development are two different approaches to organizing software work. Plan-driven development emphasizes detailed planning before major development begins. Agile development emphasizes short cycles, working software, customer collaboration and adaptation to change. Aspect Plan-Driven Agile Planning Detailed planning is done early. Planning is repeated and updated Requirements Requirements are expected to be relatively stable. during development. Requirements can change during development. Development Major phases are often planned in Development occurs in short iterations sequence. or increments. Customer Customer involvement may be higher | Customer or product representative is involvement at defined milestones. involved frequently. Delivery A major release may come after along | Working software is delivered development period. frequently. Documentation Detailed documentation is often Necessary documentation is created, emphasized. but working software receives strong priority. Change Changes may require formal change _—_ Useful changes can be included in Best suited for control. Stable and well-understood requirements. 11.1 Example of the Difference future iterations. Changing, uncertain or rapidly evolving requirements. Suppose a company is building a tax calculation system where legal rules are formally defined and change rarely. A plan-driven approach can be suitable because requirements can be specified clearly before development. Now suppose a company is building a new social media application. User preferences and business ideas may change frequently. Agile development can be more suitable because the team can release small features and use feedback to decide the next features. Software Engineering — Unit 4 Page 22