Is there a name for a pure-data Objective-C class?

Posted by BrianEnigma on Stack Overflow See other posts from Stack Overflow or by BrianEnigma
Published on 2010-05-16T19:19:43Z Indexed on 2010/05/16 19:40 UTC
Read the original article Hit count: 163

This is less of a code-specific question and more of an Objective-C nomenclature question. In C you have struct for pure data. In Enterprise Java, you have "bean" classes that are purely member variables with getters and setters, but no business logic. In Adobe FLEX, you have "Value Objects".

In Objective-C, is there a proper name for an object (descended from NSObject, of course) that simply has ivars and getters/setters (or @property/@synthesize, if you want to get fancy) and no real business logic?

A more concrete example might be a simple class with getters and setters for filename, file size, description, and assorted other metadata. You could then take a bunch of these and easily throw them into a container (NSDictionary, NSArray) without the need for messy NSValue wrapping of a C struct. It is also a little more structure than putting, say, a bunch of loosely-typed child NSDictionaries into a parent container object.

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about nomenclature