Wednesday, 15 May 2013

oop - Is subclassing in Objective-C a bad practice? -


After reading a lot of blogs, forum entries, and many Apple docs, I'm still in what is a comprehensive subclassification of

I do not know whether the purpose is an intelligent thing or not .

Take the following case for example:

Say that I am developing a puzzle game, so many elements share a certain amount of all the same behavior of those elements. Are there. Then, in my collection of elements, the behavior of the different groups of elements, behavior of groups, groups of groups, etc. ... for the subclasses

then, after determining the inheritance, I decided the part is anonymity And why should not I? Considering normal behavior with this normal model, I think I have achieved something that means OOP. But, - and this is the source of my question - Apple mentions the use of representatives, data source methods, and informal protocols in favor of subclamation . Why does this really make my brain?

There are two camps in favor of sub-clinging, not with those people, not of which it clearly relies on personal taste I am wondering what side and opposition are big There are subclassification on the scale and large-scale subclassification

For wrapping it, my question is simple:? Am I right? And why not?

Personally, I follow this rule: I am a sub-class If it respects.

No comments:

Post a Comment