As languages ‘improve’ over time, we see a first principle emerge:
Move responsibility for many of the ‘good practices’ into the language itself, allowing the language (and therefore the people who use it) to make better and more consistent use of those practices.
With assembler, we realized that we needed a variable location to have a consistent data type, so in comes variable declaration. We also want specific control structures like WHILE and FUNCTION. As we moved up into C and VB and other 3GLs, we started wanting the ability to encapsulate, and then to create objects. OO languages emerged that took objects into account.
Now that application architecture is a requirement of good application design, why is it that it that the languages don’t enforce basic structural patterns like ‘layers’ and standard call semantics that allow for better use of tracing and instrumentation? Why do we continue to have to ‘be careful’ when practicing these things?
I think it may be interesting if applications had to declare their architecture. Classes would be required to pick a layer and the layers would be declared to the system, so that if the developer accidentally broke his own rules, and had the U/I call the data access objects directly, instead of calling the business objects, for example, then he or she could be warned. (With constructs to allow folks to override these good practices, of course, just as today you can create a static class which gives you, essentially global variables in an OO language).
What if an application had to present it’s responsibilities when asked, in a structured and formal manner? What if it had to tie to a known heirarchy of business capabilities, as owned by the organization, allowing for better maintenance and lifecycle control?
In other words, what would happen if we built-in, to a modern language, the ability of the application to support, reflect, and defend the solution architecture?
Maybe, just maybe, it would be time to publish the next seminal paper: “Use of unconstrained objects considered harmful!”