CSC100AB –SWE

advertisement
CSC100AB – C++
Programming
Introduction to Software Engineering
And Program Design
What is Software?
What is Software Engineering?
What Does Software Engineering Do?
How is Software Engineered (Process)?
Software Engineering vs. Computer Science?
What is Software?
• Software is the Definition and Organization of a
Set of Tasks and Functionality Encapsulated into a
Form that is Executable on a Computer
• What are Different Types of Software?
– Commercial-Off-the-Shelf (COTS)
– Government-Off-the-Shelf (GOTS)
– Legacy: Written in an “Old” Programming Language
• Cobol, PL/1 (Y2k/SNET), Fortran, etc.
• C and C++!
– Customized New Software
– Client vs. Server Software
– Database Management Systems/Applications
What is Software Engineering?
• Engineering: The Application of Science to the Solution
of Practical Problems
• Software Engineering: The Application of CS to Building
Practical Software Systems
• Programming
–
–
–
–
Individual Writes Complete Program
One Person, One Computer
Well-Defined Problem
Programming-in-the-Small
• Software Engineering
– Individuals Write Program Components
– Team Assembles Complete Program
– Programming-in-the-Large
What is Software Engineering?
• The Application Of Engineering To Software
• Field of CSE Dealing with Software Systems
–
–
–
–
–
Large and Complex
Built By Teams
Exist In Many Versions
Last Many Years
Undergo Changes
• Definitions:
– Application of a Systematic, Disciplined, Quantifiable Approach
to the Development, Operation, and Maintenance of Software
(IEEE 1990)
– Multi-person Construction of Multi-version Software (Parnas
1978)
Why Software Engineering?
• Program Complexity Transcends Individual or
Lone Programmer
• Software Engineering Targeted for
–
–
–
–
Constructing Large Software Applications
Defining Problem Clear and Completely
Tools and Techniques to Support Process
Team-Oriented Experience
• Software Engineering must Evolve to be an
Engineering Discipline
• Software Engineering Must Promote and Support
Multi-Person Construction of Multi-Version
Software
Software Engineering - Historically
• “Early Days”
– 1950’s Programmers Wrote Programs
– Early 1960’s - Very Large Software Projects Constructed by
“Experts”
– Mid-Late 1960’s - Advent of Large Commercial Software
Applications
• Large Systems Involved Teams of Individuals
• Coining the Term “Software Engineering”
• Towards a Software Engineering Discipline
– Individuals Couldn’t see “Big Picture”
– Increase in Communication Time
– Personnel Changes Impact on Productivity
• SE: Management, Organization, Tools, Theories,
Methodologies, Techniques, etc.
on Software Engineering
• Cost of Software Continues to Increase, Requiring
More Efficient Software Production
– Software Acquisition vs. Outsourcing
– Software Reuse vs. Build-from-Scratch
• Complexity of Large Software Altered the View
from Development Perspective
Conception
Design
Development
Integration
Distribution
Documentation
Maintenance Evolution Extension
• Software Engineering/Computer Science Growth
– 350,000 Information Technology Jobs Open
– 100,000 New Jobs per Year for 10 Years
Programmer vs. Software Engineer
PROGRAMMER
• Individual with Good Skills
• Programming-in-the-Small
• Knowledge on
– Data Structures
– Algorithms
• Fluent in Several Programming Languages
• May Lack Formal Training
• Minimal Exposure to CS
Programmer vs. Software Engineer
SOFTWARE ENGINEER
• Part of a Team
• Programming-in-the-Large
• Design Approaches
– OO, Modules, etc.
– Top-Down/Bottom-Up
•
•
•
•
•
•
Translates Requirements into Specifications
Familiarity in Multiple Application Areas
Converses with Users
Sees “Big Picture”
Can Model Application
Good Communication and Interpersonal Skills
Waterfall Process Model
Requirements
Analysis and
Specification
What is the Major Disadvantage?
Design and
Specification
Coding and
Module Testing
50 %
Integration and
System Testing
Delivery and
Maintenance
50 %
Software Lifecycle of Waterfall Model
• Requirements Analysis and Specification
–
–
–
–
–
What is the Problem to Solve?
What Does Customer Need/Want?
Interactions Between SE and Customer
Identify and Document System Requirements
Generate User Manuals and Test Plans
• Design and Specification
–
–
–
–
–
How is the Problem to be Solved?
High-Level Design
Determine Components/Modules
Transition to Detailed Design
Detail Functionality of Components/Modules
Software Lifecycle of Waterfall Model
• Coding and Module Testing
– Writing Code to Meet Component/Module Design
Specifications
– Individual Test Modules in Isolation
– Drivers and Stubs to Simulate Behavior
• Integration and System Testing
– Integration of Components/Modules into Subsystems
– Integration of Subsystems into Final Program
• Delivery and Maintenance
– System Delivered to Customer/Market
– Bug Fixes and Version Releases Over Time
•
Advantages of waterfall model:
•
•
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.
•
•
•
•
•
•
•
•
•
Disadvantages of waterfall model:
Once an application is in the testing stage, it is very difficult to go back and change something that was
not well-thought out in the concept stage.
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.
•
•
•
•
•
•
•
When to use the waterfall model:
Requirements are very well known, clear and fixed.
Product definition is stable.
Technology is understood.
There are no ambiguous requirements
Ample resources with required expertise are available freely
The project is short.
Phases of RAD
• Business modeling: The information flow is identified between
various business functions.
•
Data modeling: Information gathered from business modeling is
used to define data objects that are needed for the business.
•
Process modeling: Data objects defined in data modeling are
converted to achieve the business information flow to achieve
some specific business objective. Descriptions are identified and
created for CRUD (Create, Read, Update, Delete) of data objects.
•
Application generation: Automated tools are used to convert
process models into code and the actual system.
•
Testing and turnover: Test new components and all the interfaces.
Advantages of the RAD model:
Reduced development time.
Increases reusability of components
Quick initial reviews occur
Encourages customer feedback
Integration from very beginning solves a lot of integration issues.
Disadvantages of RAD model:
Depends on strong team and individual performances for identifying business
requirements.
Only system that can be modularized can be built using RAD
Requires highly skilled developers/designers.
High dependency on modeling skills
Inapplicable to cheaper projects as cost of modeling and automated code generation is
very high.
When to use RAD model:
RAD should be used when there is a need to create a system that can be modularized in 2-3
months of time.
It should be used if there’s high availability of designers for modeling and the budget is high
enough to afford their cost along with the cost of automated code generating tools.
RAD SDLC model should be chosen only if resources with high business knowledge are
available and there is a need to produce the system in a short span of time (2-3 months).
Prototyping Model
• The basic idea here is that instead of freezing the
requirements before a design or coding can proceed, a
throwaway prototype is built to understand the
requirements.
• This prototype is developed based on the currently
known requirements. By using this prototype, the
client can get an “actual feel” of the system, since the
interactions with prototype can enable the client to
better understand the requirements of the desired
system.
• Prototyping is an attractive idea for complicated and
large systems for which there is no manual process or
existing system to help determining the requirements.
• The prototype are usually not complete systems and
many of the details are not built in the prototype. The
goal is to provide a system with overall functionality.
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
Advantages of Prototype model:
Users are actively involved in the development
Since in this methodology a working model of the system is provided, the users get a better
understanding of the system being developed.
Errors can be detected much earlier.
Quicker user feedback is available leading to better solutions.
Missing functionality can be identified easily
Confusing or difficult functions can be identified
Requirements validation, Quick implementation of, incomplete, but
functional, application.
Disadvantages of Prototype model:
Leads to implementing and then repairing way of building systems.
Practically, this methodology may increase the complexity of the system as scope of the system may
expand beyond original plans.
Incomplete application may cause application not to be used as the full system was designed
Incomplete or inadequate problem analysis.
When to use Prototype model:
Prototype model should be used when the desired system needs to have a lot of interaction with the end
users.
Typically, online systems, web interfaces have a very high amount of interaction with end users, are best
suited for Prototype model. It might take a while for a system to be built that allows ease of use and
needs minimal training for the end user.
Prototyping ensures that the end users constantly work with the system and provide a feedback which is
incorporated in the prototype to result in a useable system. They are excellent for designing good human
computer interface systems.
SWE Other Disciplines
• SWE and Management
– Management/Team Models Applied to Software Project
Management/Process Control
– Important Test Domain to Test New Models and Theories for
Management
• SWE and EE, ME, ChemE, CivilE, etc.
– Job Growth in Engineering Specific Software
• SWE and Biology, Chemistry, Medicine, etc.
– Medical Research and Informatics, Genome
• SWE and Financial Sector
– Banking, ATM Networks, Electronic Commerce, Funds Transfers,
Program Trading, Stock and Brokerage Houses, etc.
Motivation and Background Concepts
• Information Engineering for 21st Century
–
–
–
–
Creation of Information
Generation of Information
Utilization of Information
Software, Database, Security, Performance Requirements for
Application D & D
– From Centralized to Distributed Solutions
• Tracing the History
–
–
–
–
–
Abstract Data Types (ADTs) - 1970s
Object-Oriented Paradigm - 1980s
Component-Based D & D – 1990s
Web-Based/Distributed Computing – 2000s
20xx + - Cloud Computing and Virtual Machines
How is Information Engineered?
• Careful Thought to its Definition/Purpose
• Thorough Understanding of its Intended Usage and
Potential Impact
• Insure and Maintain its Consistency
– Quality, Correctness, and Relevance
• Protect and Control its Availability
– Who can Access What Information in Which Location and at
What Time?
• Long-Term Persistent Storage/Recoverability
– Cost, Reusability, Longitudinal, and Cumulative Experience
• Integration of Past, Present and Future Information via
Intranet and Internet Access
Challenge for 21st Century
• Timely and Efficient Utilization of Information
– Significantly Impacts on Productivity
– Key to Many (All?) Companies Future
– Supports and Promotes Collaboration for Competitive
Advantage
– Individual/Companies Use Information in New and Different
Ways
• Collection, Synthesis, Analyses of Information
– Better Understanding of Processes, Sales, Productivity, etc.
– Dissemination of Only Relevant/Significant Information - Reduce
Overload
• Fact: We Live in an Increasingly Information Centered
Society!
Future Design Emphasis
• Focus on Information and its Behavior
• Answer the Following Questions
–
–
–
–
–
–
–
–
–
What are Different Kinds of Information?
How is Information Manipulated?
Is Same Information Stored in Different Ways?
What are Information Interdependencies?
Will Information Persist? Long-Term DB? Versions of
Information?
What Past Info. is Needed from Legacy DBs or Applications?
Who Needs Access to What Info. When?
What Information is Available Across WWW?
Is Processing Distributed? How are Distributed Artifacts
Accessed? Replicated? Designed?
2000s – Web/Distributed Applications
• Distributed Computing/Applications are …
–
–
–
–
–
Systems of Systems
Interoperation of New & Existing Applications
Legacy, Databases, COTS, New Clients, etc.
Network Centric Environment
Multi-Tier Solutions
• Distributed Computing Applications must …
–
–
–
–
Manage, Control, Access, and Modify Data
Allow Humans to Interact with Data
Provide High-Availability and Performance
Evolvable Over Time
• Present & Future Systems Exhibit All of These
Characteristics and More!
What is a Distributed Application?
System of Systems
Heterogeneity
Hardware
OS, PLs
Network Centric Environment
DB Client
Legacy
Client
Legacy
Database
COTS
Dynamic
Environment
High-Availability
Performance
Java
Client
Server
Server
Legacy
Java
Client
Database
COTS
COTS
Client
Increase Productivity
New/Innovative
Transparent Interoperation
Information Use
Another View – Today’s Reality
Database
COTS
Legacy
Legacy
Client
Java
Client
GOTS
NETWORK
GOTS
Client
Legacy
Database
Database
Client
COTS
Client
Today’s Reality
• Premise: Artifacts - set of
– DB, Legacy, COTS, Each w/ API
• Premise: Users
– New and Existing
– Utilize Artifact APIs
• Distributed Application, DA
– Artifacts + Users
• What are the Issues?
–
–
–
–
–
How Do they Interact?
Heterogeneity
Security Concerns
Different Programmatic Models
Etc. Etc. Etc.
Why is Distributed Computing
Needed?
• Today’s Environments Contain Applications …
– Created with Multiple Programming Languages
– Executing on Heterogeneous Platforms
– Locally and Geographically Distributed
• Distributed Computing Applications Must …
– Allow Seamless and Transparent Interoperation
– Provide Tools for Engineers and Users
• Result: Inter-Operating Environment
–
–
–
–
Utilize Information in New/Innovative Ways
Leveraged to Increase Productivity
Support Diverse User Activities
Dynamically Respond to Changes
Why a Distributed Application?
• Reasons:
– Data used is Distributed
– Computation is Distributed
– Application Users are
Distributed
• 2 Key Issues for Solution:
– Platform-Independent
Models and Abstraction
Techniques
– Hide Low-Level Details
– Provide a Well-Performing
Solution
– Works Today and
Tomorrow!
Shared Objects
• Easy to Re-use
• Easy to distribute
• Easy to maintain
Striving for New
Techniques/Technologies
• We Must Diverge from Business as Usual
–
–
–
–
C Programming with RPC
Customized Development without Reuse
Solutions that Aren’t Extensible and Evolvable
Cobbling Together Solutions w/o Method or Reason is
Unacceptable and Doomed to Fail!
• We Must Face Today’s Realities
–
–
–
–
Legacy Code is Fact of Life
New Technologies Offer New Challenges
Adopt to Leverage Their Benefits
We Must Draw Careful Balance to Opt for Mature
Technologies While Targeting Emerging Technologies with
Potential!
Who are the Players?
• Stakeholders
– Software Architects (Requirements)
– System Designers (Solutions)
– Application Builders (Implementation)
• Stakeholders Striving to Provide …
– System Interaction and Information Exchange
– Utilization of Existing Applications in New and Innovative
Ways
• End-Users at Various Skill Levels and with Specific and
Limited Access Requirements
– Novice vs. Adept vs. Expert
– Who Uses What When and for How Long?
Summary
• Computing is Pervasive Throughout Society!
• Software Engineering has Not Kept Pace as a Discipline to
Hardware Advances
– CPU Speed (and Multi-Processors)
– Memory Size
•
•
•
•
•
•
1982: PDP 11/44 with 256K
1993: Sun 4 with 32M
1997: Sun Ultra with 64M/PC with 32 M
1998: Suns and PCs with 128M
2006: PCs with 1-2 Gigabytes of RAM
2010: PCs with 8+ Gigabytes of RAM
– Disk Capacity
•
•
•
•
•
•
1982: 60M with 2’ by 3’ by 3’ Footprint
1993: 200M inside your PC
1997: 2 to 4 G inside your PC
1998: 8 or more G inside your PC
2006: PCs with 160G+, NW Storage Devices, etc.
2010: PCs with 1TB+, USB Flash Drives 64 GB+, Solid State Disk Drives 100 GB+
SUMMARY
• Software Becoming More Complex and
Appearing in More and More Places (Embedded
Computing)
• Software Engineering Must Evolve to Embrace
Engineering Concepts, Approaches, and Rigor!
– Technology
• Component-Based, Distributed, Web, etc.
• Software Engineering for …
– Education
• Software Engineering MS Degrees
• Software Engineering BS Degrees
Download