Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualbe-the-hero.net

Posted 18 September 2012 - 11:25 AM

Tip 1: always prefer interfaces to inheritance
An interface defines what functionalities an object should provide
Inheritance is a "is a" relationship, and a way of reusing code among similar objects.

As for the rest, in what classes you should put what method, the best is to follow your intuition where it fits the best.
There is no golden rule for that, it is too case specific. In the process of doing it, you'll certainly acquire a better feeling of what to place where.
Tip 2: Refactoring and improving the code as you go is always a good idea. The time it costs now will be saved several times in the future.

#1be-the-hero.net

Posted 18 September 2012 - 11:25 AM

Tip 1: always prefer interfaces to inheritance
Interfaces defines what functionalities an object should have
Inheritance is a "is a" relationship, and a way of reusing code among similar objects.

As for the rest, in what classes you should put what method, the best is to follow your intuition where it fits the best.
There is no golden rule for that, it is too case specific. In the process of doing it, you'll certainly acquire a better feeling of what to place where.
Tip 2: Refactoring and improving the code as you go is always a good idea. The time it costs now will be saved several times in the future.

PARTNERS