Generic framework for iterative and incremental software development.
1) Inception
2) Elaboration
3) Construction
4) Transition
GRASP
General Responsibility Assignment Software Patterns
What are these characters? << >>
Gulliemet
Coupling
Degree to which each object relies on other objects
Low Coupling is good
Cohesion
Focus of objects responsibilities
High Cohesion is good
Operation Contract
Detailed analysis of individual operations of System Sequence Diagram.
-
Operation: Name of operation and parameters
Cross References: Use cases this operation can occur with
Preconditions: What has happened before execution of the operation
Postconditions: What happens after the execution of the operation
UP Elaboration
Build core architecture
Resolve high risk elements
Define requirements
Estimate Schedule
FURPS+
Functional, Usability, Reliability, Performance, and Supportability
Implementation, Interface, Operations, Packaging, and Legal
Design
Blueprint of software components to guide implementation.
The How
Do the "Thing Right"
Analysis
Conceptual description of software requirements
The what
Do the "Right Thing"
Conceptual solution
Design Model
A blueprint of software components that guide implementation.
Domain Model
Conceptual description of a software system
CRC
Class Responsibility Collaboration
UP
Unified Process
UML
Unified Modeling Language
Creator
GRASP Pattern
Who creates object X?
A doing Responsibility.
General Rule: Containers create contained things (or compositely aggregated things)
Information Expert
GRASP Pattern
Who should be responsible for knowing a X, given a Key?
A knowing responsibility.
General Rule: The object that knows how to fulfill the need is the one responsible for knowing X given a key.
Low Coupling
GRASP Pattern
How strongly is one object connected to (or dependent on) other objects. How can we reduce change impact?
General Rule: Keep coupling low
High Cohesion
GRASP Pattern
The methods of an object should group into a related set
This set should be small and lightweight, delegating to other objects when helpful
Controller
GRASP Pattern
Keep model separate from view
What model should first get a UI message
Controllers facilitate reuse, UI framework change, UI replacement with commands, and maintenance.
Command Method
Performs an action which changes the state of an object
Query
Returns data to the caller. Doesn't change the state of objects.
Visibility
Ability of one object to see another object.
What are the four types of visibility?
1) Attribute: B is an attribute of A
2) Parameter: B is a parameter of a method of A
3) Local: B is a local object in a method
4) Global: B is globally visible
What is "Test Driven Development and Refactering"?
Write a single test case for a method, get it working, and repeat for next method.
Refactoring
A structured diciplined method to rewrite or restructure code without changing behavior.
What is "Smelly Code"?
1) Duplicated code
2) Big Methods
3) Too many instance vars in a class
4) Too much code in a class.
5) Similar subclasses
6) Too little use of interfaces
7) High coupling
Polymorphism
Giving the same method name to different objects that share a superclass.
Why choose interfaces over abstract classes?
Don't commit the subclass to a specific hierarchy.
Indirection
Ability to reference something using a name, reference or container instead of the value itself.
Protected Variation
Information hiding.
Open-Closed Principle
Modules should be both open (for extension:adaptable) and closed (closed to modification).
UML Activity Diagram
Used for sequential and parallel activities. Based on Petri Net.
Generalization
Consists of Superclass and Subclass.
Rules for Generalization
1) 100% rule. Superclass's defenition should be applicable to subclass. Subclass must confirm to 100% of superclass's attributes and associations
2) Members of subclass set must be members of superclass set.
100% rule
A rule of generalization. Superclass's definition should be applicable to subclass. Subclass must conform to 100% of superclass's attributes and associations.
Association Class
Considered when:
1) Many to many relationship between two classes
2) Attribute best placed in relationship between two classes
3) Related class must exist (doesn't make sense if it doesn't)
Composition
In UML, the black diamond. If in doubt, leave it out. An exclusive lifeline dependance between a whole and it's parts.
Inheritance
An OO mechanism that allows subclass to inherit methods and attributes from its superclass.
True of False: Favor composition over inheritance.
True
True of False: Favor inheritance over composition
False
Benefits of composition
1) Front end wrapper can expose back end clas methods
2) Front end class can match method names or make them different
3) Anything can be done with inheritance as with composition
4) Composition allows back end class to be changed dynamically
Architectural Analysis
Use to 1) Reduce Risk 2) Position for future 3) Align with future goals.
Decorator Solution
1) Attach responsibilities to an object dynamically.
2) Decorators provide a flexable alt. to subclassing for extending functionality
Transient Objects
In object persistence, the object disappears when "power" goes out
Persistent
In object persistence, the object state preserved across "power outages"
Serialization
In object persistence, flattening object into stream and save them to disk.
Storing an object state
1) Serialize, pickle, dematerialize, passivate
Retrieving an object state
Deserialize, unpickle, materialize, activate
Schema Mapping
In object persistence, changing object state format to match the format required for target repository.
Object Identifier
In object persistence, a unique primary key for each object.
Deployment Diagrams
Communicate physical architecture.
Program to ________________, not ________________.
Program to interfaces, not implementations.
Imperative paradigm
Programs that specify a series of steps.
Functional Programming advantages
1) Extreme Modularity, 2) No side effects 3) heavy use of recursion and composition 4) less bugs