OFBiz Turning OO on its Head or Programming in the Large?
My take on all this is that “programming in the large” is a bit different that the usual programming. What happens is that abstractions that are quite similar to the usual procedural things become important. You simply can’t deny the importance of these Actions in webapp or gui work, however they aren’t the same thing as functions in C. The difference is that an Action (aka Command) can be persisted, sent as a message, suspended, undone, redone, stopped, cancelled, approved etc. These are not attributes that are associated with function in the procedural sense.
Hmmmm. This is all starting to feel a hell of a lot like python crossed with scheme. I mean, we have taken a strongly typed language and side-steped all of the strictures of typing.
I’m not saying this is necessarily a bad thing. I love programming in python where typing is a run time thing, and coding is so quick. I’m just wondering why we are doing this Java? So we can be J2EE buzzword compliant?
Its the difference between framework development and application development. You’ve heard advice like ‘you shouldn’t need to use instanceof in your code’, and for application development that’s often true. You’ve essentially sidestepped polymorphism by using it. However, I find it really quite hard to avoid using instanceof or the functionally equivalent isAssignableFrom method call when I’m writing framework / infrastructure code. The whole point of frameworks is that they are generic, and the framework developer doesn’t know how it will be used by application developers. The ‘nnnAware’ interfaces from Webwork are an example of this (although they’ve apparently now been deprecated for reasons I don’t know). The point being that the framework can do the right thing without knowing the specifics of your implementation. But this power usually comes at the cost of explicit type-safety.