Modularity Still Utterly Elusive, Decades Later
Quick, when was Modula 2 created (by the legendary Niklaus Wirth)? Did you guess 1977? Bet not.
Was having a discussion this morning with Kenan on a range of interesting topics and he brought up OSGi. Of course, I have loaded bomb bays of vitriol on any number of topics that just open on their own. It‘s subconscious, atavistic. I have blogged this all before: open source sees itself as invincible, committees of right minded men (never any women) can tackle any problem no matter how complex, until the X.500 bomb drops and a decade later their complicated, fractured, fissure-caulked homunculus has been completely discarded by the public, then they have a brief moment of reflection and drive to the next disaster.
But today, I was thinking ‘wow, modularity is really nonexistent.‘ I think the topic came up because I was looking at the source for Awestruct. We were discussing static blog generators, and while I like all the RH guys on that project, especially Dan Allen, I browse the source and it‘s a deadening experience. What is Ruby‘s notion of modularity? The one R project I spent any time on, it seemed like a Mentos commercial, or a Dilbert psychodrama: ‘whoa dude, yeah there‘s a gem for that,‘ maybe with a slap on the forehead, a high five, and then the two characters deciding to celebrate by playing hacky sack for 20m with their saved time. Awestruct looks great, but I wish it was easier to see some structure in there.
Java‘s modularity is actually pretty good. The sad part is that it‘s one of those things where it was just sloppy and as is the case in all things complex, it‘s now the problem of unscrambling the egg.
What has happened to modularity on the web? First SOAP was the be all end all, then after a decade, during which it attempted to remake itself at least once (as SOAP DOC), the horde bailed and went to REST. DHH declared the O‘Reilly REST book one of the most important things a developer could possibly read. I was always puzzled by that. That would be like Julia Child saying ‘the most important thing a chef can learn is how to melt butter.‘ REST is fine, I am not a REST hater, but let‘s please remember what it is: it‘s a set of conventions for trying to say we can grow resources-focused interfaces with a single string DSL.
Lately, I have been doing Actor-based programming, and one of the big things you hear from people is ‘well how does that make any sense? you are just passing messages without types..?‘ First off, that‘s wrong. Messages are immutable but they can have structure and the structure can be enforced (no one is using schema people, so if your preferred shiv is XML-based, drop the high and mighty stuff).
Ultimately, what we are talking about are choices about atomicity, which is another reason that the wikipedia page for modula 2 is so interesting. I have believed for a long time that Actors/Agents will end up being the dominant paradigm, and one of the main reasons for that lately is that it has a cleaner notion of atomicity, namely: what the fundamental building blocks ought to be. Much more on that…
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)