SOLID - Open/Close Principle

  • View
    534

  • Download
    2

Embed Size (px)

Text of SOLID - Open/Close Principle

  • S.O.L.I.D

    Diseo Orientado a Objetos

    http://bit.ly/pai_ocpSigue la presentacin en ->

  • Quien soy yo?

    !2

    Kevin Robayna

  • S.O.L.I.D

    Introducido por:

    Robert C. Martin

    Uncle Bob

    !3

  • S.O.L.I.D

    Qu es?

    !4

  • S.O.L.I.D

    Cdigo Sucio

    Refactorizar

    Cdigo Mantenible

    !5

  • S.O.L.I.D

    Cmo se debe usar?

    !6

  • S.O.L.I.D

    T.D.D

    Test-Driven Development

    !7

  • S.O.L.I.D

    Cuantos principios hay?

    !8

  • Principios S.O.L.I.D

    SRP - Single Responsibility Principle

    OCP - Open Close Principle

    LSP - Liskov Substitution Principle

    ISP - Interface Segregation Principle

    DIP - Dependency Inversion Principle

    !9

  • Principios S.O.L.I.D

    SRP - Single Responsibility

    OCP - Open Close

    LSP - Liskov Substitution

    ISP - Interface Segregation

    DIP - Dependency Inversion

    !10

  • Principios S.O.L.I.D

    SRP - Single Responsibility

    OCP - Open Close LSP - Liskov Substitution

    ISP - Interface Segregation

    DIP - Dependency Inversion

    !11

  • Principios S.O.L.I.D

    SRP - Single Responsibility

    OCP - Open Close

    LSP - Liskov Substitution

    ISP - Interface Segregation

    DIP - Dependency Inversion

    !12

  • Principios S.O.L.I.D

    SRP - Single Responsibility

    OCP - Open Close

    LSP - Liskov Substitution

    ISP - Interface Segregation DIP - Dependency Inversion

    !13

  • Principios S.O.L.I.D

    SRP - Single Responsibility

    OCP - Open Close

    LSP - Liskov Substitution

    ISP - Interface Segregation

    DIP - Dependency Inversion

    !14

  • S.O.L.I.D

    O - Open

    C - Close

    P - Principle

    !15

  • S.O.L.I.D Open Close Principle

    Software entities should be open for extension, but closed for

    modification

    !16

  • S.O.L.I.D

    Para que usar el Open/Close Principle?

    !17

  • S.O.L.I.D

    Un Ejemplo?

    !18

  • S.O.L.I.D

    Formas Geomtricas

    Conexin de Redes

    !19

    Centro de Clculo

  • OCP - Figuras

    !20

  • OCP - Conexin

    !21

  • OCP - CC

    !22

  • OCP - Conexin

    !23

    Conexin

    Tipo

    Para: De:

    Mensaje

  • OCP - Conexin

    !24

    Tipo

    http ftp

    Conexin

  • OCP - Conexin

    !25

    Mensaje

    FirmadoArchivo adjunto

    Conexin

  • OCP - Conexin

    !26

    Persona

    Para: De:

    Conexin

  • Ronda de Preguntas

    !27

  • Gracias!

    !28