Head First Object Oriented Analysis & Design (Brett D. Mclaughlin, Gary Pollice and David West)

Kom i gang. Det er Gratis
eller tilmeld med din email adresse
Head First Object Oriented Analysis & Design (Brett D. Mclaughlin, Gary Pollice and David West) af Mind Map: Head First Object Oriented Analysis & Design (Brett D. Mclaughlin, Gary Pollice and David West)

1. Objectville

1.1. UML - Class Diagram

1.1.1. Definition Unified Modeling Language: A language used to communicate just the details about your code and application's structure that other developers and customers need, without getting details that aren't necessary

1.1.2. Klasse eksempel ud fra UML

1.2. Inheritance

1.2.1. Inheritance lets you build classes based on other classes and avoid duplicating and repeating code.

1.3. Pool puzzle

1.4. Polymorphism

1.4.1. Polymorphism is when a subclass "stands in" for its superclass

1.5. Encapsulation (Access modifiers)

1.5.1. Definition The process of enclosing programming elements inside larger, more abstract entities. AKA information hiding or seperation of concerns.

1.5.2. Encapsulation is about separating information from other parts of your application that shouldn't mess with that information.

2. Chapter 1

2.1. Delegation

2.1.1. Definition The act of one object forwarding an operation to another object, to be performed on the behalf of the first object.

2.1.2. Delegation makes your application more reusable. It also lets each object worry about it's own functionality, instead of spreading the code that handles a single object's behaviour all throughout your application.

2.1.3. Delegation shields your objects from changes to other objects of the application

2.1.4. One of the most common examples of delegation in java is the equals() method, which call equal on an object and passes in another, in order to compare them and return a true or false value.

2.2. Loosely coupled

2.2.1. Loosely coupled is when the objects of an application each have only one specific job to do, and do them really well.

2.3. The three steps of OOA&D

2.3.1. Functionality Make sure your software does what the customer wants it to do. Rick's guitar shop We fixed functionality problems with Rick's application We added functionality so that the search returns a list of guitars (instead of just one)

2.3.2. Flexibility Apply basic object-oriented principles to add flexibility. Rick's guitar shop While adding new functionality we made sure to adhere to the correct design principles.

2.3.3. Maintainable, reusable design Strive for a maintainable and reusable design Rick's guitar shop We encapsulated the guitar specs and made sure new new properties could be added to the app easily. We added delegation so our objects are less dependent on each other and can be reused easily.

2.4. Customers are satisfied when:

2.4.1. Their apps work Chapter 2

2.4.2. Their apps keep working We've seen how fragile apps are in chapter 1

2.4.3. Their apps can be upgraded easily Chapter 5 and 8 (delegation, composition and aggregation)

2.5. Programmers are satisfied when:

2.5.1. Their apps can be reused Chapter 8

2.5.2. Their apps are flexible Chapter 6 and 7

3. Chapter 2

3.1. Use cases

3.1.1. Requirement Definition A requirement is a singular need detailing what a product or service should be or do. It is most commonly used in a formal sense in systems engineering or software engineering. A good set of requirements goes beyond just what the customer wants, to make sure that the system also works in unusual or unexpected circumstances. Example

3.1.2. Three steps to a good use case Clear value Start and stop External initiator

3.1.3. Use case vs. Use case diagram

3.1.4. Use case vs. requirements

3.1.5. Main and alternate path The main path in a use case is the one where everything just works. The alternate path is when something goes wrong, and you have to write som sub-points in the main path to handle it.

4. Chapter 3 - Requirements change

4.1. Scenario

4.1.1. A complete path through a use case from start to stop is called a scenario

4.1.2. Use cases can have several scenarios, but they always share the same user goal.

4.2. OO design principle 1: Encapsulate what varies.

5. Chapter 4 - Analysis

5.1. UML Asterisk

5.2. Use cases and textual analysis

5.2.1. The things (usually the nouns) in the use case let you know roughly which classes to create.

5.2.2. The verbs let you know which methods to consider making

5.3. UML Class Diagram extended

5.3.1. Multiplicity Describes how many of a specific type can be stored in an attribute of a class Example: The door attribute stores a single DogDoor

5.3.2. Attribute = method

5.3.3. Association Visually shows that one class has a relation to another, usually through an attribute.

5.3.4. Operation = member variable

6. Chapter 5 - Good design = Flexible software

6.1. Part 1

6.1.1. OO design principle 3: Each class in your application should have only one reason to change.

6.1.2. OO design principle 2: Code to an interface rather than to an implementation.

6.1.3. UML Extended 2 Abstract class An abstract class defines some basic behaviour, but it's really the subclasses of the abstract class that add the implementation of those behaviours. Typed in italics Aggregation Aggregation is a special form of association, and means that one thing is made up (in part) of another thing. Generalisation A line with an arrow that isn't colored in means generalisation. You use generalisation to indicate that one class extends and inherits behaviour from a more generalised class. UML Cheat sheet Interface Encapsulation extended

6.2. Part 2

6.2.1. Cohesion (AKA SRP - Chapter 8)

6.2.2. OOA&D toolbox extended

7. Chapter 6 - Solving really big problems

7.1. Break it indo small pieces, then use the same principles as earlier in the book.

7.1.1. Three steps to great software Functionality Flexibility Reusability and maintainability

7.1.2. Make it easy to change, extend and do what the customer wants

7.1.3. Encapsulate what varies

7.1.4. Code to the interface instead of the implementation

7.1.5. Understand what the system does, in order to get good requirements

7.1.6. Analyse to ensure real-world performance

7.2. Commonality

7.3. Variability

7.4. Feature

7.4.1. Feature to requirement(s)

7.5. Defer details as long as you can

7.6. Use Case Diagrams over Use Cases for big picture

7.6.1. Use Case Diagrams and Features

7.7. Domain analysis

7.8. Design patterns

7.8.1. Confused about design patterns?

7.9. OOA&D Toolbox

7.10. Bullet points

8. Chapter 7 - Architecture

8.1. Architecture

8.2. The three Q's of architecture

8.2.1. The essence is the basics of the system without all the bells and whistles the marketing department threw in.

8.2.2. They are mostly a judgement call

8.3. Scenarios give many advantages of use cases without all the details we don't need early on.

8.3.1. A Scenario is just ONE way through a Use Case, if you only used scenarios you might miss a Use Case opportunity.

9. Chapter 8 - Design Principles

9.1. Design principles

9.2. Open-Closed Principle (OCP)

9.3. Don't Repeat Yourself (DRY)

9.4. Singe Responsibility Principle (SRP)

9.5. Liskov Substition Principle (LSP)

9.5.1. When to use delegation

9.6. Composition

9.6.1. Composition vs. Aggregation

9.7. Inheritance, aggregation, composition and delegation

9.8. Bullet points

9.9. OOA&D Toolbox

10. Chapter 9 - Iterating and testing

10.1. Bullet points

10.2. OOA&D Toolbox

11. Chapter 10 - The OOA&D Lifecycle

11.1. The OOA&D Lifecycle