Chapter 5 Software Engineering Practice: A Generic View

advertisement
CS 3610: Software Engineering – Fall 2009
Dr. Hisham Haddad – CSIS Dept.
Chapter 5
Software Engineering Practice:
A Generic View
Overview of the elements of software
engineering practice
CS 3610: Software Engineering – Fall 2009
Dr. Hisham Haddad – CSIS Dept.
What is “Practice”
• Practice involves concepts, principles, methods, tools, and
procedures, that you must consider and follow as software is
planned and developed.
• Practice represents the details of technical and management
considerations and how to’s that are below the surface of the
software process. These are things that you’ll need to
effectively build high-quality and reliable computer software.
• The goal is to define organized and effective approach to
building software applications.
(See chapter 2, page 20: SE Framework: communication,
planning, construction, and deployment)
CS 3610: Software Engineering – Fall 2009
Dr. Hisham Haddad – CSIS Dept.
The Essence of Practice
• The essence of software engineering practice …
–
–
–
–
Understand the problem (communication and analysis)
Plan a solution (modeling and software design)
Carry out the plan (code generation)
Examine the result for accuracy (testing and quality assurance)
• At its core, good practice is common-sense problem solving
(develop a set of questions to address each of these areas)
See page 98 for sample questions.
CS 3610: Software Engineering – Fall 2009
Dr. Hisham Haddad – CSIS Dept.
Core SE Principles
• P1: To provide a value to the customer and the user
• P2: Keep the design as simple as possible (KIS principle)
• P3: Maintain the product and project “clear vision”
• P4: Know that what you produce, others will consume
• P5: Be open to the future (software be adaptable to changes)
• P6: Plan ahead for reuse (increase system value)
• P7: Think! (Thorough, clear, and complete thoughts)
CS 3610: Software Engineering – Fall 2009
Dr. Hisham Haddad – CSIS Dept.
SE Practices
• Consider the generic process framework
–
–
–
–
–
Communication
Planning
Modeling
Construction
Deployment
• Here, we need to identify
– Underlying principles
– How to initiate the practice
– An abbreviated task set
CS 3610: Software Engineering – Fall 2009
Dr. Hisham Haddad – CSIS Dept.
Communication Practices - 1
• Most challenging activity!
• Ultimate goal: Full understating!
• Principles:
–
–
–
–
–
–
–
–
–
–
Listen and give attention to others
Prepare before you communicate (simple review or agenda)
Facilitate the communication (designate a leader)
Face-to-face is best
Take notes and document decisions
Collaborate with the customer
Stay focused and on track
Draw pictures when things are unclear
Move on … don’t let an issue/topic halt progress
Negotiation works best when both parties win (not contest!)
CS 3610: Software Engineering – Fall 2009
Dr. Hisham Haddad – CSIS Dept.
Communication Practices - 2
• Initiation:
– The parties should be physically close to one another
– Make sure communication is interactive
– Create solid team with the right structure
• An abbreviated task set:
–
–
–
–
Identify who it is you need to speak with
Define the best mechanism for communication
Establish overall goals and objectives and define the scope
Get more detailed
• Have stakeholders define scenarios for usage
• Extract major functions/features
– Review the results with all stakeholders
CS 3610: Software Engineering – Fall 2009
Dr. Hisham Haddad – CSIS Dept.
Planning Practices - 1
• Planning (road map to achieve goals) involves technical and
management practices.
• How much planning is needed? (over/under planning)
• Principles:
–
–
–
–
–
–
–
–
–
–
Understand the project scope (define the outcomes)
Involve the customer and stakeholders (priorities an constraints)
Recognize that planning is iterative
Estimate based on what you know
Consider risks and adjust planning accordingly
Be realistic (human element, changes will happen!)
Adjust granularity (level of details) as you plan
Define how quality will be achieved (FTRs, Pair Prog. , etc..)
Define how you’ll accommodate changes
Track what you’ve planned
CS 3610: Software Engineering – Fall 2009
Dr. Hisham Haddad – CSIS Dept.
Planning Practices - 2
• Initiation (Ask Barry Boehm’s questions - SEI):
–
–
–
–
–
–
–
Why is the system begin developed?
What will be done?
When will it be accomplished?
Who is responsible?
Where are they located (organizationally)?
How will the job be done technically and managerially?
How much of each resource is needed?
CS 3610: Software Engineering – Fall 2009
Dr. Hisham Haddad – CSIS Dept.
Planning Practices - 3
• An abbreviated task set:
–
–
–
–
–
Re-assess project scope
Assess risks
Evaluate functions/features
Consider infrastructure functions/features
Create a coarse (generic) granularity plan
• Number of software increments
• Overall schedule
• Delivery dates for increments
– Create fine (detailed) granularity plan for first increment
– Track progress
CS 3610: Software Engineering – Fall 2009
Dr. Hisham Haddad – CSIS Dept.
Modeling Practices - 1
• We create models to gain a better understanding of the actual
entity to be built (easy for tangible products!)
• For software, modeling focuses on data transformation,
system functions, and system behavior as it transforms data.
• Analysis models represent the customer requirements in
three different domains: the information domain, the functional
domain, and the behavioral domain.
• Design models represent characteristics to help develop the
software effectively: the architecture, the user interface, and
component-level details.
CS 3610: Software Engineering – Fall 2009
Dr. Hisham Haddad – CSIS Dept.
Modeling Practices - 2
• Analysis modeling principles:
–
–
–
–
–
Represent the information domain (input, output, stores)
Represent software functions (transform and control)
Represent software behavior (response to events)
Partition these representations (reduce complexity)
Focus on the essence (not implementation details)
• Elements of the analysis model (Chapter 8)
–
–
–
–
Data model
Flow model
Class model
Behavior model
CS 3610: Software Engineering – Fall 2009
Dr. Hisham Haddad – CSIS Dept.
Modeling Practices - 3
• Design modeling principles:
–
–
–
–
–
–
–
–
Design must be traceable to the analysis model
Always consider an architecture
Focus on the design of data (main element of architecture)
Interfaces (both user and internal) must be designed
Components should exhibit functional independence (cohesion)
Components should be loosely dependent (coupling)
Design representation should be easily understood
The design model should be developed iteratively (refinement)
• Elements of the design model
–
–
–
–
Data design
Architectural design
Component design
Interface design
CS 3610: Software Engineering – Fall 2009
Dr. Hisham Haddad – CSIS Dept.
Construction Practices - 1
• Construction focus on coding and testing.
• Preparation principles: Before coding,
– Understand of the problem to be solved (see communication and
modeling principles).
– Understand basic design principles and concepts.
– Pick a programming language that meets the needs of the
software to be built and the environment in which it will operate.
– Select a programming environment that provides tools that will
make your work easier.
– Create a set of unit tests that will be applied to completed code
component.
CS 3610: Software Engineering – Fall 2009
Dr. Hisham Haddad – CSIS Dept.
Construction Practices - 2
• Coding principles: As you begin coding,
– Constrain your algorithms by following structured programming
practice.
– Select data structures that will meet the needs of the design
– Understand the software architecture and create interfaces that
are consistent with it.
– Keep conditional logic as simple as possible.
– Create nested loops in a way that makes them easily testable.
– Select meaningful variable names and follow other local coding
standards.
– Write code that is self-documenting.
– Create a visual layout (e.g., indentation and blank lines) that aids
understanding.
CS 3610: Software Engineering – Fall 2009
Dr. Hisham Haddad – CSIS Dept.
Construction Practices - 3
• Validation Principles: After code is completed:
– Conduct code walkthroughs when appropriate.
– Perform unit tests and correct errors you’ve uncovered.
– Refactor the code.
• Testing Principles:
–
–
–
–
–
All tests should be traceable to requirements.
Tests should be planned early on.
The Pareto Principle (80/20) applies to testing.
Testing begins “in the small” and moves toward “in the large”.
Exhaustive testing is not possible!
CS 3610: Software Engineering – Fall 2009
Dr. Hisham Haddad – CSIS Dept.
Deployment Practices
• Deployment involves system delivery, end-user support, and
feedback from end-users.
• Principles:
–
–
–
–
–
–
Manage customer expectations for each increment.
A complete delivery package should be assembled and tested.
A support group should be established before delivery.
Instructional materials must be provided to end-users.
Buggy software should be fixed first, delivered later.
Encourage and collect customer feedback on the system.
CS 3610: Software Engineering – Fall 2009
Dr. Hisham Haddad – CSIS Dept.
Suggested Problems
Try to work problems 5.2 through 5.15 from Chapter 5,
page 120.
No submission is required for practice assignments.
Work it for yourself!
CS 3610: Software Engineering – Fall 2009
Dr. Hisham Haddad – CSIS Dept.
Last Slide
End of Chapter 5
Download