none
I dont see any difference between Abstract method and Abstract factory -Have you find any difference ( both of them decouples the client from object creation) RRS feed

  • Question

  • I dont see any difference between Abstract method and Abstract factory - both of them decouples the client from object creation.

    If anybody knows the actual difference please explain me with differences

    Also i dont understand "families of related or dependent object "..why we need to create families of related objects instead we can simply go for factory method rite ?

     

    Abstract method:- http://www.c-sharpcorner.com/uploadfile/kalisk/factory-method-design-pattern-using-C-Sharp/

    Abstract factory :http://lasithsameera.blogspot.com/2010/07/abstract-factory-pattern-with-c-code.html

     

    look at the above code...both samples are looks similar except in the Abstract factory delegates the object creation to another class..thats the only difference i can see.....Any thoughts?


    ilikemicrosoft

    • Edited by surendiran Thursday, February 2, 2012 2:00 PM
    Thursday, February 2, 2012 1:37 PM