I am writing an application that mainly uses 5 business units: A, BC, D and E
- A has some properties and contains a list of B
- B has some other properties and list C and list D's
- C has some other properties and list D and list E
- D has only a few properties
- E has only a few properties
Inheritance between them does not exist. There is no real business logic; objects are created, filled, and then read-only, without further manipulation.
My natural coding style would be to go object-oriented and write classes for each of these objects, use NSArrays for lists, and synthesize these properties.
This will make the code readable.
But another approach also seems obvious: use only NSDictionaries and NSArrays and work with keys / values instead of properties. It seems more efficient and somehow “closer” to iPhone-style programming for me ... but it obviously leads to less readable code. Another advantage is the lack of additional custom encoding / decoding for serialization (saving state to disk using JSON, ...) So on paper, this speaks of the latter approach, on the other hand, it still seems inconvenient NOT to use custom objects ...
? / ? /? " Apple"? ( Java/#).