Are the days of large object graphs done? When I first learned to program, there was not a whole lot of discussion of architecture and design. Algorithms and data structures were the core (as it should be).

This led to most of us building large object graphs read into memory on application start-up. Over the years I've spent time digging through source code of legacy desktop applications (e.g. office applications and games) and it seems that they followed the same type of architecture. In all cases, the object graph seemed to represent something of a tree:

       /             \
      obj            obj
   /      \        /     \
 obj      obj     obj    obj
 /  \    /  \    /  \    /  \
obj obj obj obj obj obj obj obj

As I dig threw newer source code, what I see on here, what I read in books, and what I aim for is a much smaller object graph. I can only assume this has to do with the push to mobile, web, distributed systems, etc.

Is there any advantage to using large object graphs other than simplicity? Is better to read into memory what I need at the time and leave everything on disk, in the database, etc?

put on hold as primarily opinion-based by Doc Brown, Greg Burghardt, null, gnat, Robert Harvey Oct 11 at 18:35

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 5
    If you review source code of 50 (or even 500) projects or books and find no large objects graphs in there, it is still just as if you take a bucket full of water out of the ocean, find no fish in it and ask "are there no fish in the ocean any more?". – Doc Brown Oct 11 at 17:27
  • 1
    @DocBrown great analogy! – keelerjr12 Oct 11 at 17:29
  • This question is not well-defined and thus pretty much impossible to answer. How do you define large? How many projects did you check? Where did you find them? What types of applications were they? – Dan Wilson Oct 11 at 18:00
  • Large object graphs are used extensively in UI frameworks, compilers, expert systems, search engines, AI research, and probably several other applications I haven't thought of. – Robert Harvey Oct 11 at 18:33