Dofactory.com
Dofactory.com
 Back to list
Views:   8.3K
Replies:  1
Archived

Learning about OOP and Design Patterns

Hello

I am C# developer.
I want to improve my OOP programming and design pattern skills. What is the best way to go about this?

Any advice appreciated.
Thanks.
Ilkin Turan, Sep 10, 2012
Reply 1
Learn, code, test, and experiment.

Abstraction
-> I must always at the top and first man at field.
Inheritance -> How many ways to achieve this, without it how to extend a class functionality.
Polymorphism -> How many ways you can do it.
Encapsulation -> What it really means.

You can only improve if you take up a problem and try to solve it in different ways.

Example :

1 Take a complex text file.
2 Write Parsing mechanism for it without OOP
3 Identify reusable sections

Separate these into functions -- this will approach you towards encapsulation (Separate what changes).

Now, think of how your code can be reused by many other programs not written by you. If someone asks you the parser engine how will you expose its functionality and also allowing them to extend (if files need some extra logic for parsing). 
You must consider what should be visible to user you must think Encapsulation (This time it is: Information hiding) also think Polymorphism & Inheritance.

Core: Reusability - to achieve this we have Inheritance, Polymorphism, Encapsulation and Abstraction.
Asmprogs Asmprogs, Sep 10, 2012
Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Cookies       Do Not Sell       Licensing      
Made with    in Austin, Texas.  - vsn 44.0.0
© Data & Object Factory, LLC.