0

I've heard systems described as a "clean object model", but a precise definition does not seem to be around. It seems to refer to the classes being complete or consistent in some way.

I'm just wondering if it's referring to a specific trait or just another favorable term like 'elegant'.

Quantlib is described as "written in C++ with a clean object model".1

Jiminion
  • 5,080
  • 1
  • 31
  • 54
  • I've removed a few tags that were seemingly irrelevant. If they are, could you specify how this specifically applies to them? Could you also reference sources so we can see the context? As a sidenote: this might be more appropriate on http://programmers.stackexchange.com/ – Jeroen Vannevel Apr 29 '14 at 21:25
  • You should leave C++ and QuantLib, I would think. From the first page of the Quantlib.org website: "QuantLib is written in C++ with a clean object model..." – Jiminion Apr 29 '14 at 21:29
  • Can you add all your references (such as that) in your question then? I still very much doubt whether they are appropriate tags. – Jeroen Vannevel Apr 29 '14 at 21:30
  • 4
    I doubt there exists a clean definition. It means "I think my objects are well designed from an API point of view." – Ed S. Apr 29 '14 at 21:32
  • The Ruby people use the term as well. – Jiminion Apr 29 '14 at 21:48
  • 2
    It's opposite of a "dirty object model". – HEKTO Apr 29 '14 at 21:55
  • Everybody writes highly modular code with a crispy clean object model. Lasts about a year, give or take. A month if it is agile. – Hans Passant Apr 29 '14 at 22:10
  • 1
    Hans is not wrong. The copy on the QuantLib site was written a _long_ time ago. – Luigi Ballabio Apr 29 '14 at 22:30
  • @LuigiBallabio, you would know! :) – Jiminion Apr 29 '14 at 23:19
  • I disagree that this is 'opinion-based'. It is a description used by writers to describe code that purports a particular meaning. I also cite: http://www.fantasy-coders.de/ruby/ruby_1.html which states: "very clean object model; there are (almost) no exceptions to it". – Jiminion Apr 30 '14 at 01:42

1 Answers1

4

It's not really a technical term. A "clean" object model is a well-designed one, by whichever standard of good design. Usually it involved orthogonal classes with a clear separation of concerns and an intuitive mapping to real-world concepts, i.e. a lot of fuzziness that you'll need to judge for yourself.

Fred Foo
  • 355,277
  • 75
  • 744
  • 836