the beginning of software engineering

13
The beginning of Software Engineering Chapter 1 Welcome and congratulations on your entry to this course in software engineering. The fact that you are in this course means that you have covered several fundamental topics in programming, data structures, and perhaps user interface. You have been writing computer programs to solve basic and intermediate-level problems. Now you want to take your learning experience to another level: you want to learn how to design, develop and manage complex software systems (small, medium sized and large), which may consist of tens or hundreds of programs all seamlessly integrated into a coherent whole. You will learn all of these and more in this course, but first, we must start at the beginning. This chapter introduces you to the discipline of software engineering. Topics covered include the following: Definitions and Concepts The Organization as a System Information Levels in the Organization Software Life Cycle Categories of Software Alternate Software Acquisition Approaches Software Engineering Paradigms Desirable Features of Computer Software Summary and Concluding Remarks 1.1 Definitions and Concepts Computer software affects almost all aspects of human life. A study of the process of software construction and management is therefore integral to any degree in computer science, computer information systems, multimedia technology, or any other related field. Software systems are not created, and do not exist in a vacuum; rather they are typically Chapter 1 Introduction to Software Engineering 4 created by individuals and/or organizations, for use by individuals and/or organizations. We will therefore start by defining a system, defining software, identifying the relationship between the two, and then showing how they both relate to the organization. 1.1.1 System A system is a set of interacting, interrelated, interdependent components that function as

Upload: griffovix

Post on 07-Dec-2015

2 views

Category:

Documents


1 download

DESCRIPTION

Un introduction of Software Engineering

TRANSCRIPT

Page 1: The Beginning of Software Engineering

The beginning of Software Engineering

Chapter 1

Welcome and congratulations on your entry to this course in software engineering. Thefact that you are in this course means that you have covered several fundamental topicsin programming, data structures, and perhaps user interface. You have been writingcomputer programs to solve basic and intermediate-level problems. Now you want totake your learning experience to another level: you want to learn how to design, developand manage complex software systems (small, medium sized and large), which mayconsist of tens or hundreds of programs all seamlessly integrated into a coherent whole.You will learn all of these and more in this course, but first, we must start at the beginning.This chapter introduces you to the discipline of software engineering. Topics coveredinclude the following:Definitions and ConceptsThe Organization as a SystemInformation Levels in the OrganizationSoftware Life CycleCategories of SoftwareAlternate Software Acquisition ApproachesSoftware Engineering ParadigmsDesirable Features of Computer SoftwareSummary and Concluding Remarks

1.1 Definitions and ConceptsComputer software affects almost all aspects of human life. A study of the process ofsoftware construction and management is therefore integral to any degree in computerscience, computer information systems, multimedia technology, or any other related field.Software systems are not created, and do not exist in a vacuum; rather they are typically Chapter 1 ■ Introduction to Software Engineering4created by individuals and/or organizations, for use by individuals and/or organizations.We will therefore start by defining a system, defining software, identifying the relationshipbetween the two, and then showing how they both relate to the organization.

1.1.1 SystemA system is a set of interacting, interrelated, interdependent components that function asa whole to achieve specific objectives. An effective system must be synergistic. The systemusually operates in an environment external to itself. A system may also be defined asthe combination of personnel, materials, facilities and equipment working together toconvert input into meaningful and needed outputs.Following are some fundamental principles about systems:The components of a s ystem are interrelated and interdependent.The system is usually viewed as a whole.Every system has specific goals.There must be some type of inputs and outputs.Processes prescribe the transformation of inputs to outputs.Systems exhibit entropy, i.e., tendency to become disorganized.Systems must be regulated (planning, feedback and control).Every system has subsystems.Systems exhibit a tendency to a final state.As a personal exercise, you are encouraged to identify examples of systems in areaswith which you are familiar. A good place to start is the human body.

1.1.2 SoftwareSoftware is the combination of program(s), database(s) and documentation in a systemicsuite, and with the sole purpose of solving specific system problems and meetingpredetermined objectives. Software adds value to the hardware components of acomputer system. In fact, without software, a computer is reduced to nothing more thanan electronic box of no specific use to most human beings. Also, it should not surpriseyou that computer software is a special kind of system. This course will teach you how todesign, construct and manage such systems.

Software Engineering

Page 2: The Beginning of Software Engineering

Software engineering is the process by which software systems are investigated, planned,modeled, developed, implemented and managed. It also includes the re-engineeringof existing systems with a view to improving their role, function, and performance. Theultimate objective is the provision or improvement of desirable conveniences and theenhancement of productivity within the related problem domain. Chapter 1 ■ Introduction to Software Engineering5System transformation may take various paths, some of which may be:Improving the internal workings of the systemModifying inputs and outputsModifying the goals and objectives of the systemRedesigning the systemDesigning and developing a new system based on existingproblems

Steps in the Analysis ProcessBefore embarking on any major work in software engineering, a process of research andanalysis takes place. This process may be summarized in the following steps:1. Define the problem.2. Understand the problem (system) — the interrelationshipsand interdependencies; have a picture of the variables at workwithin the system; define the extent of the system (problem).3. Identify alternate solutions.4. Examine alternate solutions.5. Choose the best alternative.6. Pursue the chosen alternative.7. Evaluate the impact of the (new/modified) system.

1.2 The Organization as a SystemTraditionally, many software systems were created by organizations for use inorganizations. To a large extent, this scenario still holds true. For the moment, let ustherefore take a look at the organization, in the context of this approach. An organizationis a collection of individuals that employ available facilities, resources and equipmentto work in pursuit of a predetermined set of objectives. The organization qualifies asa system since it has all the ingredients in the definition of a system: people, facilities,equipment, materials and methods of work.Every organization has certain functional areas (called divisions, departments,sections, etc.). Typical areas include finance and planning, human resource management(HRM), marketing, production and operations (or the equivalent), technical/manufacturing (or the equivalent). These are usually further divided into departments,units and sub-units. Traditionally, a data processing department/unit would be enlistedas a sub-unit of finance. However, more enlightened organizations are now enlistinginformation technology (IT) as a functional area at the senior management level,servicing all other areas. Chapter 1 ■ Introduction to Software Engineering6Figure 1-1 shows what a highly summarized organizational chart for a modernorganization might look like. In tiny or small organizations, each unit that appears underthe president or chief executive officer (CEO) may be a department. In medium-sizedand large organizations, each unit under the president or CEO is typically a division,consisting of several departments and/or sections. It should also be noted that you areunlikely to find IT (or the equivalent) at the senior level in many traditional organizations,as managers still struggle with appreciating the scope and role of IT in the organization.However, in more progressive and forward-thinking organizations, you will find that IT iscorrectly and appropriately positioned at the senior level of the management hierarchy.Figure 1-1. Typical Organizational Chart Chapter 1 ■ Introduction to Software Engineering7

1.2.1 DiscussionWhy should IT (or its equivalent) be positioned at the senior level in the organization? Ifthe answer to this question is not immediately obvious to you, it will be by the time youcomplete this course.

Page 3: The Beginning of Software Engineering

1.3 Information Levels in the OrganizationFigure 1-2 shows the information levels in an organization. Information flows vertically aswell as horizontally. Vertically, channels are very important. The chart also summarizesthe characteristics and activities at each level. Let us examine these a bit closer:Figure 1-2. Information levels in the organization

1.3.1 Top ManagementActivities are strategic and may include:Goal settingLong term planning Chapter 1 ■ Introduction to Software Engineering8Expansion or contraction or consolidationMergingOther strategic issuesFor the individuals that operate at this level, there is always an external perspectivein the interest of organizational image and interest.

1.3.2 Middle ManagementActivities are of a tactical nature and may include:Allocation and control of resourcesMedium range planningDelegationPerformance measurement and analysisFor the individuals that operate at this level, subjectivity is rather high — one’s ownstyle is brought into play. There is an internal perspective.

1.3.3 Junior Management and Operational StaffAt the junior management level, one is mainly concerned with:Job schedulingChecking operational resultsMaintaining discipline and orderOperations at the junior management level are very logical and predictable.The lowest level is the operational staff. The individuals who work at this level carryout the daily routine activities that keep the organization functioning.

1.3.4 Importance of Information Levels inSoftware EngineeringThe information levels are of importance to the software engineer for two reasons:Information gathering and analysis must span the entireorganization; therefore communication at the appropriate level isimportant.The information needs vary with each level. An effective softwaresystem must meet the need at each level. Chapter 1 ■ Introduction to Software Engineering9

DiscussionWhat kind of information would be required at each level? Propose an integrated softwaresystem (showing main subsystems) for a university, a variety store, and a hardware storerespectively.

1.3.5 Alternate Organizational SettingsNot all software systems are developed within a structured setting as portrayed inthe foregoing discussion. In many cases, software systems are developed by softwareengineering firms, and marketed to the consuming public. These organizations tend to bemore flexible in the way they are structured, often favoring more highly skilled employees,and a more flattened structure. This approach is more fully discussed in chapter 19.Software systems may also be constructed by amorphously structured organizations.This classification includes individuals operating independently, or as collaborative groups.The open source community is an excellent example of this kind of amorphous operation.Whatever the circumstance, each software system is only relevant if it fulfills a need thatpeople recognize. It must help solve a problem, and it typically has a period of relevance.

1.4 Software Life Cycle

Page 4: The Beginning of Software Engineering

Every software system has a life cycle — a period over which it is investigated/conceived,designed, development and remains applicable or needed. Various life cycle models havebeen proposed; we shall examine seven:Waterfall ModelPhased Prototype ModelIterative Development ModelRapid Prototype ModelFormal Transformation ModelComponent-Based ModelAgile Development ModelIrrespective of the model is used, however, a software system passes through thefive phases, as depicted in figure 1-3 (related deliverables also shown). These phasesconstitute the software development life cycle (SDLC).Figure 1-3. SDLC Phases and Related Deliverables Chapter 1 ■ Introduction to Software Engineering10

1.4.1 Waterfall ModelThe waterfall model is the traditional approach to software engineering; it may besummarized in the following points:It assumes that total knowledge of the requirements of a systemcan be obtained before its development.Each phase of the system life cycle is signed off with the usersbefore advancing to the next phase.The process is irreversible - retracting is not allowed until thesystem is completed.The model has the following advantages:It ensures a comprehensive, functional, well-integrated system.It minimizes the level user complaints.It ensures user participation (since the user must signoff on eachphase).It is likely to result in a well-documented system.The model is not void of major disadvantages:System development is likely to take a long time; users maybecome impatient.The requirements of the system may change before the system iscompleted.One may therefore have a well-designed, well-documentedsystem that is not being used, due to its irrelevance.

1.4.2 Phased Prototype ModelThis model (also referred to as the evolutionary development model) may be summarizedin the following steps:1. Investigate and fully define the system, identifying the majorcomponents.2. Take a component and model it; then develop and implement it.3. Obtain user feedback.4. Revise the model if necessary.5. If the system is not completed, go back to step 2. Chapter 1 ■ Introduction to Software Engineering11The advantages of phased prototype model are:The user gets a feel of the system before its completion.Improved user participation over the waterfall model.The likelihood of producing an acceptable system is enhanced.The disadvantages of the phased prototype model include:The increased likelihood of a poorly documented system.The system may be poorly integrated.The system will therefore be more difficult to maintain.

1.4.3 Iterative Development ModelThe iterative development model is in some respects a refinement of the phasedprototype model. In this approach, the entire life cycle is composed of several iterations.Each iteration is a mini-project in and of itself, consisting of the various lifecycle phases(investigation and analysis, design, construction, implementation, and management).

Page 5: The Beginning of Software Engineering

The iterations may be in series or in parallel, but are eventually integrated into a release ofthe project. The final iteration results in a release of the complete software product.The advantages of the iterative development model are identical to those of thephased prototype model. However, due to the precautions inherent in the approach,disadvantages (of the phased prototype model) are minimized.In many respects, the iterative development approach to software constructionhas been immortalized by the Rational Unified Process (RUP). RUP is an iterativedevelopment lifecycle framework that has become a very popular in the softwareengineering industry. RUP was first introduced by the pioneers of Rational Software —Grady Booch, James Rumbaugh and Ivar Jacobson. Since 2003, the company has beenacquired by International Business Machines (IBM). IBM currently markets the Rationalproduct line as one of its prime product lines.

1.4.4 Rapid Prototype ModelRapid prototyping is a commonly used (perhaps overused) term in software engineering.It refers to the rapid development of software via the use of sophisticated softwaredevelopment tools, typically found in CASE (computer aided software engineering) toolsand DBMS (database management system) suites. Another term that keeps flying aroundis rapid application development (RAD).The line of distinction of a RAD tool from a CASE tool is not always very clear: inboth cases, we are talking about software systems that facilitate development of othersoftware systems by providing among others, features such as:Automatic generation of codeConvenient, user friendly (and typically graphical) user interfaceExecutable diagrams Chapter 1 ■ Introduction to Software Engineering12To further blur the distinction, contemporary DBMS suites provide those featuresalso. These tools will be further discussed in chapter 2.The rapid prototype model may be summarized in the following steps:Obtain an idea of the system requirements from user.Develop a prototype (possibly under the observation of the user).Obtain user feedback.Revise if necessary.One point of clarification: RAD tools, CASE tools, DBMS suites and the like may beemployed in any software engineering project, irrespective of the model being followed.Rapid prototyping describes a process, not the tools used.Rapid prototyping provides us with two significant advantages:The system developed is obtained quickly if the first prototype iscorrect.The approach is useful in the design of expert systems as well assmall end-user applications.The main disadvantages of rapid prototyping are the following:The system may be poorly documented.The system may be difficult to maintain.System development could take long if the prototypes are wrong.

1.4.5 Formal Transformation ModelThe formal transformation model produces software from mathematical systemspecifications. These transformations are “correctness preserving” and therefore ensuresoftware quality. A number of formal specification languages have been proposed.However, much to the chagrin of its proponents, software development via this method isnot as popular as hoped. Formal methods will be further discussed in chapter 12.The main advantage of the formal transformation model is the production ofprovable software i.e. software generated based on sound mathematical principles. Thismeans that the reliability and quality of the software is high.The model suffers from three haunting disadvantages:The approach (of formal methods) is not always relevant to theproblem domain.The approach uses abstract specifications with which the softwareengineer must become familiar.Due to the use of quite abstract notations, end user participationis not likely to be high, thus violating an essential requirement forsoftware acceptance. Chapter 1 ■ Introduction to Software Engineering

Page 6: The Beginning of Software Engineering

13

1.4.6 Components-Based ModelThe component-based approach produces software by combining tested and provencomponents from other software products. As the discipline of software engineeringbecomes more established and more software standards are established, this approachis expected to be more widely used. The approach is commonly called component-basedsoftware engineering (CBSE).The main advantages of CBSE are the following:Improvement in the quality and reliability of softwareSoftware construction can be fasterThe main disadvantage of the approach is that like the formal transformation model,it is not always relevant to the problem domain. The reason for this is that softwareengineering, being a relatively new discipline, has not established enough standards forsolving the many and varied software needs that are faced by the world.

1.4.7 Agile Development ModelThe agile development model pulls ideas from phased prototyping, iterativedevelopment, and rapid prototyping into a model that champions the idea ofemphasizing the results of the software engineering effort over the process of getting tothe results. The traditional approach of investigation and analysis, design, development,implementation, and management is deemphasized. In contrast, the agile approachemphasizes construction and delivery.Agile development calls for small, highly talented, highly responsive teams thatconstruct software in small increments, focusing on the essential requirements. Thechief architects of the methodology have articulated 12 principles that govern the agiledevelopment approach [Beck, 2001]. They are paraphrased below:1. Place the highest priority on customer satisfaction throughearly and continuous delivery of valuable software systems.2. Welcome changing requirements that enhance the customer’scompetitive, irrespective of the stage in the development.3. Deliver working software frequently, and within a shorttimeframe.4. Get the business people and the software developers to worktogether on a consistent basis throughout the project.5. Build projects around motivated individuals. Give them therequired resources and trust them to get the job done.6. The most efficient and effective method of communicationwithin a software engineering team is face-to-faceconversation. Chapter 1 ■ Introduction to Software Engineering147. The primary measure of progress and success is a workingsoftware system or component.8. The agile development process promotes sustainabledevelopment. The sponsors, developers, and users should beable to maintain a constant pace indefinitely.9. There should be continuous attention to technical excellenceand good design.10. There should be great emphasis on simplicity as an essentialmeans of maximizing the amount of work not done.11. The best architectures, requirements, and designs emergefrom self-organizing teams.12. The software engineering team should periodically reflect onhow to become more effective, and then refine its behavioraccordingly.The advantages of agile development are similar to those of phased prototyping:The user gets a version of the required software system in theshortest possible time.By merging business personnel and software developer in a singleproject, there is improved user participation.The likelihood of producing an acceptable system is enhanced.Like the advantages, the disadvantages of the agile development model arecomparable to those of the phased prototyping model:There is an increased likelihood of a poorly documented system.In fact, some extreme proponents of agile development go as far

Page 7: The Beginning of Software Engineering

as to deemphasize the importance of software documentation.The system may be poorly integrated.A system that is poorly designed, documented, and poorlyintegrated is likely to be more difficult to maintain, thusincreasing the said cost that agile development seeks to control.

1.5 Categories of SoftwareSoftware engineering is a very wide, variegated field, constrained only by one’s ownimaginations and creativity. There are, however, some observable categories of software.Figure 1-4 provides a list of common software categories. Most of the software productsthat you are likely to use or be involved with fall into one or more of these categories. Chapter 1 ■ Introduction to Software Engineering15

1.6 Alternate Software Acquisition ApproachesSoftware may be acquired by any of the following approaches, each with its advantagesand challenges:Traditional waterfall approach (in-house or via contracted work)Prototyping (phased or rapid, in-house or via contracted work)Iterative development (in-house or via contracted work)Figure 1-4. Common Software Categories Chapter 1 ■ Introduction to Software Engineering16Assembly from re-usable components (in-house or via contractedwork)Formal transformation (in-house or via contracted work)Agile development (in-house or via contracted work)Customizing an application software packageEnd-user developmentOutsourcingWhatever the acquisition approach that is employed, a software engineeringobjective of paramount importance is the production of software that has a significantlygreater value than its cost. This is achieved by packing quality in the product from theoutset — a principle that is emphasized throughout the text.

1.6.1 DiscussionAs a personal exercise, determine what scenario(s) would warrant each approach.

1.7 Software Engineering ParadigmsThere are two competing paradigms of software construction: the (traditional) functionoriented(FO) approach and the (more contemporary) object-oriented (OO) approach.The two approaches, though sometimes divergent, are not mutually exclusive — anexperienced software engineer can design and construct software systems using aspectsof both approaches. This leads to a third alternative — the hybrid approach — whichideally borrows the strong points from both approaches, while avoiding the vulnerablepoints in either (see [Foster, 2010]).This course pursues a balance between the object oriented paradigm and thefunction oriented paradigm, with a strong focus on the fundamentals, and an evidentbias to the object-oriented paradigm. A full treatment of the object-oriented approachis (best) treated in another course — object-oriented software engineering (OOSE) orobject-oriented methodologies (OOM). However, in keeping with the bias, the appendicescontain useful additional information on OOM.

1.8 Desirable Features of Computer SoftwareThe following are some desirable features of computer software:Maintainability: How easily maintained is the software? This willdepend on the quality of the design as well as the documentation.Documentation: How well documented is the system?Efficiency: How efficiently are certain core operations carriedout? Of importance are the response time and the systemthroughput. Chapter 1 ■ Introduction to Software Engineering

Page 8: The Beginning of Software Engineering

17User Friendliness: How well designed is the user interface? Howeasy is it to learn and use the system?Compatibility: with existing software products.Security: Are there mechanisms to protect and promoteconfidentiality and proper access control?Integrity: What is the quality of data validation methods?Reliability: Will the software perform according to requirementsat all times?Growth potential: What is the storage capacity? What is thecapacity for growth in data storage?Functionality and Flexibility: Does the software provide theessential functional features required for the problem domain?Are there alternate ways of doing things?Differentiation: What is unique about the software?Adaptability: How well are unanticipated situations handled?Productivity: How will productivity be affected by the softwaresystem?Comprehensive Coverage: Is the problem comprehensively andappropriately addressed?These features are often referred to as software quality factors and for good reasons,since they affect the quality of the software products. In this course, you will learn howto research, plan, design, and construct software of a high quality. You will do so in adeliberately methodical manner. As such, we will revisit these quality factors later, andshow how they can be used to guide the software engineering process.

1.9 Summary and Concluding RemarksLet us summarize what has been covered in this chapter:A system is a s et of interacting, interrelated, interdependentcomponents that function together as a whole to achieve specificobjectives.Software is the combination of program(s), database(s) anddocumentation in a systemic suite, with the sole purpose ofsolving specific system problems and meeting predeterminedobjectives.Software engineering is the process by which an informationsystem or software is investigated, planned, modeled, developed,implemented and managed. Chapter 1 ■ Introduction to Software Engineering18The organization is a complex system consisting of personnel,facilities, equipments, materials and methods.Software systems are created specifically for organizational usageand benefits.Every software system has a life cycle — a period over whichit is investigated/conceived, designed, development andremains applicable or needed. Various life cycle models havebeen proposed; this chapter examined the following sevenmodels: waterfall, phased prototyping, iterative development,rapid prototyping, formal transformation, component-baseddevelopment, and agile development.Irrespective of the life cycle model employed, computer softwaregoes through the phases of investigation and analysis, design,development, implementation, and management. These phasesare referred to as the software development life cycle (SDLC).Two paradigms of software construction are the function-oriented(FO) approach and the object-oriented (OO) approach.Among the desirable features of computer software are thefollowing: maintainability, documentation, efficiency, userfriendliness, compatibility, security, integrity, reliability,growth potential, functionality and flexibility, differentiation,adaptability, productivity, and comprehensive coverage.So now you have an academic knowledge of what is meant by software engineering.As you will soon discover, this is not enough. To excel in this field, you will needexperiential knowledge as well. But you have made an important start in exploring

Page 9: The Beginning of Software Engineering

this exciting field. Much more could be said in this introductory chapter. If you arecomfortable with the material presented and want to delve deeper into the OO paradigmfor software engineering, please refer to appendix 1, appendix 2 and appendix 3. The nextchapter will discuss the role of the software engineer in the organization.

1.10 Review Questions1. Give definitions of:A systemComputer softwareSoftware engineering2. Explain how software engineering relates to the managementof an organization. Chapter 1 ■ Introduction to Software Engineering193. Develop an organization chart for an organization that youare familiar with. Analyze the chart and propose a set ofinterrelated software systems that may be used in helping theorganization to achieve its objectives.4. Why should a software engineer be cognizant of theinformation levels in an organization?5. What is the software development life cycle? Explain itssignificance.6. Discuss the seven life cycle models covered in the chapter.For each model:Describe the basic approachIdentify the advantagesIdentify the disadvantagesDescribe a scenario that would warrant the use of thisapproach7. Identify ten major categories of computer software. For eachcategory, identify a scenario that would warrant application ofsuch a category of software.8. Discuss some desirable features of computer software.9. Write a paper on the importance of software engineering, andyour