views:

189

answers:

4

I've seen it in the context of classes. I suspect it means that the class could use being broken down into logical subunits, but I can't find a good definition. Could you give some examples?

Thanks for the help.

Edit: I love the smart replies, but I'm obviously referring to "monolithic" within a software context. I know about monoliths, megaliths, dolmens, and all the stone-related contexts. Gee, I have enough of them in my country...

+9  A: 

alt text

Sorry, i could not resist :)

So, something called monolithic is the oposite of modular : If it could be splitted and ain't be, so that's monolithic (big, and of a single piece).

Reading the answer of JRL, I realized that my example is wrong.

He's right : a monolithic program is an IHM with embedded data model !

OMG_peanuts
+1: my first thought exactly. Not very helpful are we ?
High Performance Mark
Nope, you're not ;p
Robus
such a visual answer )
Arseny
+8  A: 

If you look up the etymology of the word you'll see it comes from the Greek monos (single) and lithos (stone). In the context of software as you mention it, it describes a single-tiered application in which the code for the user interface and the data access are combined into a single program from a single platform.

JRL
+2  A: 

Interesting question. I don't think there are any formal definitions of what a monolithic class is, but you've got the idea. A class that contains multiple components that are logically unconnected, or pointlessly coupled, is a monolithic class.

If you've read The Pragmatic Programmer, which I strongly recommend, you can define a monolithic class as an anti-pattern that goes against almost everything from that book.

As for examples, you'll find more in the realm of chip and OS design, where there are formal definitions of monolithic chips/kernels, which are similar to a monolithic class. Here are some examples, although each of them can be argued against being on this list:

  1. JOGL - Java bindings for OpenGL. This could be arguable, and with good reason.
  2. Most academic projects - For obvious reasons.

If you started programming alone, rather than joining a team, then chances are you can open one of your first projects, and there will be a class that is monolithic.

SEK
+3  A: 

"Monolithic" is a term that has been used to flame succesful software. This link exposes the assumptions inherent in the term, and their limited usefulness.

The basic assumption is that a system works better if it is built from software components that each have an individual, well-defined task. Intuitively, this seems right. If each component works, the entire system must work, right?

In reality, it's not that easy. A larger, compositional (non-monolithic) system can miss a critical function, even when there is no single component to blame. This happens when the architectural design fails to allocate a function to any specific component. This can happen especially if it's a function which doesn't map cleanly to a single component.

Now Linux (to continue with the linked example) in reality is not monolithic. It has a modular userspace on top of a monolithic kernel, a userspace that comes with many separate utilities. Except when it doesn't.

MSalters