XP Programming

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    1 Favorite

    XP Programming - Presentation Transcript

    1. I-DigitalTEK Agile Development IT Solutions for Growing Business XP Programming Code Refactoring I-DigitalTEK K I IdigitalTEK
    2. XP Patterns
      • “ In Software Engineering, a  Design Pattern  is a general reusable solution to a commonly occurring problem in software design . A design pattern is not a finished design that can be transformed directly into code.  It is a description or template for how to solve a problem that can be used in many different situations “
      • Delegation - one object relying upon another to provide a specified set of functionalities .
      • Aggregation -  object may only contain reference or pointer (and not have lifetime responsibility for it) .
      • Consultation - the composite type “has an” object of a simpler type, while in sub-typing, the subtype “is an” instance of its parent type.
    3. Patterns Classification
      • “ Design patterns originally grouped patterns into categories Creational patterns , Structural patterns , and Behavioral patterns , and described them using the previous concepts of delegation  , aggregation , and  consultation .“
      • Behavioral - Template, Mediator, Visitor, Iterator, Command, Memento, Observer, State, Strategy, Interpreter, Chain of Responsibility.
      • Structural - Decorator, Composite, Façade, Bridge, Adapter, Flyweight, Proxy.
      • Creational - Singleton, Builder, Prototype, Abstract Factory, Factory Method.
    4. XP Patterns
      • Liskov Substitution Principle – “ Let q(x) be a property provable about objects x of type T. Then q(y) should be true for objects y of type S where S is a subtype of T. “
      • Open/Closed Principle  states " software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification that is, such an entity can allow its behavior to be modified without altering its source code. “
      • Hint:
        • “ Functions that use pointers or references to base classes must be able to use object of derived classes with out knowing it.”
        • “ No Class should derive from a concrete class.”
    5. XP Patterns Behavioral
      • Strategy - Encapsulates a family of algorithms so that they vary independently of the client that instantiate it and allow for interchangeability
      • Observer -  One-to-many relationship across objects that allow to notify dependencies of a change in state of the caller automatically’
      • State - Behavior is altered when its internal state changes. A class that encapsulate the state of an object.
      • Hint:
        • “ Design to an interface, not an implementation”
        • “ Separate what varies from what stay the same”
    6. XP Patterns Behavioral
      • Template Method - let subclasses redefine a base algorithm without changing its structure and use delegation to decide which behavior to call.
      • Iterator - access aggregate object s sequentially .
      • Visitor - Add capabilities to composite.
      • Mediator - centralized control logic and communications.
      • Hint:
        • “ A class should have only one reason to change.”
        • “  Encapsulate what varies.”
    7. XP Patterns Behavioral
      • Command - support undoable operation and encapsulates request as object so that they can be passed as parameters to create distinct functionality.
      • Memento - "undo" and return object to previous state.
      • Chain Of Responsibility - handle request with more than one object.
      • Hint:
        • “ No Class should derive from a concrete class.”
        • “ No Method should override an implemented method of its base class.”
    8. XP Patterns Structural
      • Adapter - converts interface that were incompatible otherwise.
      • Façade - unified a set of interfaces to create subsystem.
      • Decorator – adding additional responsibilities or functionalities to an object dynamically is a flexible alternative to sub-classing and aggregation.
      • Composite - structure that treats tree element s as individual objects.
      • Hint:
        • “ Simplify interfaces.”
    9. XP Patterns Structural
      • Bridge - Decouples implementation from interfaces.
      • Flyweight - reduces the number of object instances at runtime and provide many "virtual instances”
      • Proxy - is a representative of an object and act as a place holder.
      • Hint:
        • “ Only talk to your friend.”
    10. XP Patterns Creational
      • Factory - binds an object to an interface to allow subclass to decide upon the instantiation.
      • Singleton - Ensure one instance of a class and a global access to it.
      • Interpreter - to add method to a class structure beyond interpretation
      • Hint:
        • “   Classes are about behavior and functionality.”
    11. XP Patterns Creational
      • Prototype - Generate objects whose type is not known.
      • Builder – to construct a complex object step by step
      •  
      • Hint:
        • “   Don’t call us! We will call you.”
    12. Reference Material
      • I-DigitalTek http://www.i-digitaltek.net
      • “ Head First Design Patterns ” 2004 ISBN 10: 0-596-00712-4

    + IDIGITALTEKIDIGITALTEK, 10 months ago

    custom

    456 views, 1 favs, 1 embeds more stats

    Refactoring to patterns

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 456
      • 452 on SlideShare
      • 4 from embeds
    • Comments 0
    • Favorites 1
    • Downloads 0
    Most viewed embeds
    • 4 views on http://studio.i-digitaltek.net

    more

    All embeds
    • 4 views on http://studio.i-digitaltek.net

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories