Dr. Douglas C. Schmidt d.schmidt@vanderbilt cs.wustl/~schmidt
CS291 Software Design Studio Dr. Douglas C. Schmidt [email protected] schmidt/cs291/...
-
Upload
aron-robinson -
Category
Documents
-
view
220 -
download
5
Transcript of CS291 Software Design Studio Dr. Douglas C. Schmidt [email protected] schmidt/cs291/...
CS291CS291
Software Design StudioSoftware Design Studio
Dr. Douglas C. [email protected]
www.dre.vanderbilt.edu/~schmidt/cs291/
Professor of EECS Vanderbilt University Nashville, Tennessee
2
CS 291 Course Philosophy
Good design and programming is not learned by generalities, but by seeing how significant programs can be made clean, easy to read, easy to maintain and modify, human-engineered, efficient, and reliable, by the application of good design and programming practices. Careful study and imitation of good designs and programs significantly improves development skills.
- Kernighan and Plauger
3
•Required textbooks
CS 291 Course Information•CS 291 class web page
•www.dre.vanderbilt.edu/ ~schmidt/cs291/
•My office hours in Featheringill Hall room 226 are
•MW 2:15-4:15
•TA: Stoyan Paunov
•Stoyan’s office hours will be announced shortly
•Please send all questions to [email protected] and I’ll send the answers to the class mailing list
4
CS 291 Course Contents•Focus on topics important to developing & maintaining quality software:
•Reuse of patterns & software components
•Developing, documenting, testing, & applying reusable classes & object-oriented frameworks using C++
•Patterns will be taught to provide good role models for software designs & to clearly articulate design tradeoffs
•Object-oriented techniques will be taught to show how to build software architectures that decouple inter-dependencies between components
•I assume you already know C++!!!
•The course will cover object-oriented techniques that address:
•Decentralized software architecture
•Architectural and design patterns
•Class interface definition
•Component reuse
•Module decomposition
•Hierarchical classification
•Extensible object-oriented application frameworks
•Several case studies will be used in class to illustrate the OO design & programming process
5
CS 291 Course Work•There will be 5-6 programming assignments
•Can be done on Windows or Linux
•Must be done individually
•Programs will be graded as follows:
•40% execution correctness
•30% structure (e.g., modularization, information hiding, etc.)
•10% insightful programming (e.g., developing reusable class components, etc.)
•10% Consistent style (e.g., capitalization, indenting, etc.)
•10% appropriate commenting style
•There will be a 5 point deduction (out of a possible 100 points) for each day that your program is late
•Programs turned in later than two calendar days after the due date will receive a 0
•There will be weekly quizzes (starting today)
•There will be a comprehensive final exam
•The relative weighting of each portion of the course is :
•40% Programming projects
•35% Quizzes
•25% Final Exam
6
•Present solutions to common software problems arising within a certain context
Overview of Patterns
•Capture recurring structures & dynamics among software participants to facilitate reuse of successful designs
The Proxy Pattern
1 1Proxy
service
Service
service
AbstractService
service
Client
•Help resolve key software design forces
•Flexibility•Extensibility•Dependability•Predictability•Scalability•Efficiency
•Generally codify expert knowledge of design strategies, constraints & “best practices”
7
Overview of Pattern Languages
Benefits of Pattern Languages• Define a vocabulary for talking about software
development problems• Provide a process for the orderly resolution of
these problems• Help to generate & reuse software architectures
Motivation•Individual patterns & pattern catalogs are insufficient
•Software modeling methods & tools largely just illustrate how – not why – systems are designed
8
Taxonomy of Patterns & Idioms
Type Description Examples
Idioms Restricted to a particular language, system, or tool
Scoped locking
Design patterns
Capture the static & dynamic roles & relationships in solutions that occur repeatedly
Active Object, Bridge, Proxy, Wrapper Façade, & Visitor
Architectural patterns
Express a fundamental structural organization for software systems that provide a set of predefined subsystems, specify their relationships, & include the rules and guidelines for organizing the relationships between them
Half-Sync/Half-Async, Layers, Proactor, Publisher-Subscriber, & Reactor
Optimization principle patterns
Document rules for avoiding common design & implementation mistakes that degrade performance
Optimize for common case, pass information between layers
9
Overview of Frameworks
Framework Characteristics
Application-specific functionality
•Frameworks exhibit “inversion of control” at runtime via callbacks
Networking Database
GUI
•Frameworks provide integrated domain-specific structures & functionality
Mission Computing E-commerce
ScientificVisualization
•Frameworks are “semi-complete” applications
10
Comparing Class Libraries, Frameworks, & Components
Class Libraries
Frameworks
Macro-levelMeso-levelMicro-level
Borrow caller’s thread
Inversion of control
Borrow caller’s thread
Domain-specific or Domain-independent
Domain-specific
Domain-independent
Stand-alone composition
entities
“Semi-complete”
applications
Stand-alone language entities
Components
Class Library Architecture
ADTs
Strings
LocksIPC
Math
LOCAL INVOCATIONSAPPLICATION-
SPECIFICFUNCTIONALITY
EVENTLOOP
GLUECODE
Files
GUI
A class is a unit of abstraction & implementation in an OO
programming language
Framework Architecture
ADTs
Locks
Strings
Files
INVOKES
A framework is an integrated set of classes that collaborate to produce a reusable architecture for a family of applications
Reactor
GUI
DATABASE
NETWORKING
APPLICATION-SPECIFIC FUNCTIONALITY CALLBACKS
Middleware Bus
Component Architecture
A component is an encapsulation unit with one or more interfaces that provide
clients with access to its services
Naming
LockingLogging
Events
11
Overview of the ACE Frameworks
Features•Open-source•6+ integrated frameworks
•250,000+ lines of C++•40+ person-years of effort
•Ported to Windows, UNIX, & real-time operating systems
• e.g., VxWorks, pSoS, LynxOS, Chorus, QNX
•Large user community
www.cs.wustl.edu/~schmidt/ACE.html
Acceptor Connector Component
Configurator
Stream
Reactor Proactor
Task
Application-specific
functionality
Local AreaNetwork
NYSE
NASDAQ
12
Pattern Benefits
• Preserve crucial design information used by applications & middleware frameworks & components
• Facilitate reuse of proven software designs & architectures
• Guide design choices for application developers
The POSA2 Pattern Language