Card Set Information
Generic framework for iterative and incremental software development.
General Responsibility Assignment Software Patterns
What are these characters? << >>
Degree to which each object relies on other objects
Low Coupling is good
Focus of objects responsibilities
High Cohesion is good
Detailed analysis of individual operations of System Sequence Diagram.
: Name of operation and parameters
: Use cases this operation can occur with
: What has happened before execution of the operation
: What happens after the execution of the operation
Build core architecture
Resolve high risk elements
Functional, Usability, Reliability, Performance, and Supportability
Implementation, Interface, Operations, Packaging, and Legal
Blueprint of software components to guide implementation.
Do the "Thing Right"
Conceptual description of software requirements
Do the "Right Thing"
A blueprint of software components that guide implementation.
Conceptual description of a software system
Class Responsibility Collaboration
Unified Modeling Language
Who creates object X?
A doing Responsibility.
: Containers create contained things (or compositely aggregated things)
Who should be responsible for knowing a X, given a Key?
A knowing responsibility.
: The object that knows how to fulfill the need is the one responsible for knowing X given a key.
How strongly is one object connected to (or dependent on) other objects. How can we reduce change impact?
: Keep coupling low
The methods of an object should group into a related set
This set should be small and lightweight, delegating to other objects when helpful
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.
Performs an action which changes the state of an object
Returns data to the caller. Doesn't change the state of objects.
Ability of one object to see another object.
What are the four types of visibility?
: B is an attribute of A
: B is a parameter of a method of A
: B is a local object in a method
: 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.
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
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.
Ability to reference something using a name, reference or container instead of the value itself.
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.
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.
A rule of generalization. Superclass's definition should be applicable to subclass. Subclass must conform to 100% of superclass's attributes and associations.
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)
In UML, the black diamond. If in doubt, leave it out. An exclusive lifeline dependance between a whole and it's parts.
An OO mechanism that allows subclass to inherit methods and attributes from its superclass.
True of False: Favor composition over inheritance.
True of False: Favor inheritance over composition
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
Use to 1) Reduce Risk 2) Position for future 3) Align with future goals.
1) Attach responsibilities to an object dynamically.
2) Decorators provide a flexable alt. to subclassing for extending functionality
In object persistence, the object disappears when "power" goes out
In object persistence, the object state preserved across "power outages"
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
In object persistence, changing object state format to match the format required for target repository.
In object persistence, a unique primary key for each object.
Communicate physical architecture.
Program to ________________, not ________________.
Program to interfaces, not implementations.
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