Well, there is the whole field of Software Architecture in academia that tries to deal with this
Let me give you a few papers you might be interested in. First, the discipline was founded by Perry & Wolf in
Foundations for the study of software architecture. There are some interesting concepts, like views (
4+1 seems to be the most popular), styles (and older
classificaiton), and ADLs (yet
another popular classification). You briefly touch on
what model-drivendevelopment is - which is implemented by
EMFand
used in eclipse 4.
Now, most of these papers are paid. If you are in university, chances are you can get them for free via institutional login. Now let me expand a little bit on this
Most of the links will be to the free Wikipedia. The
introductory article on software architecture seems to give a good overview on the topic, with links to free content.
If you study SA or Software Engineering (SE), chances are, you will be amazed how much different academic and industrial approaches are. I sometimes feel that scientists are like children playing in the sand (assuming a perfect world), but that is OK I guess.
Let me start first with what you call separation of "design" and "implementation". There has been a lot of work on that. One of the accepted ideas is that you can attack the problem by explicitly describing your architecture. You do that in an
Architecture Description Language. They differ in shape and form, but most commonly there is a high-level programming language, which can describe the basic architectural items: components and connectors. Ideally, they would also support describing varying styles and/or "dynamic" vs "static" architectures. Then you somehow invoke a compiler that verifies the syntax, and runs some validation checks to confirm that there are no logical problems with your architecture. Since ADLs are formal languages, formal analysis can be performed on the model, thus possibly discovering race conditions or other conflicts.
Now, there are different opinions as to what follows ADLs, or how they should be implemented.
One view is that you should couple architecture and implementation. You design the architecture, and then write the implementation. You can have run-time and compile-time checks for architectural conformance. This makes certain that the two are kept in synch, as they reside in the same codebase, thus share compiler and runtime environment. The most notable example in academia for this is called ArchJava (
paper (free),
web site), which is specific to to Java, but there are attempts to port it for other languages.
Another view is that you should keep them separate. You then generate your code (or at least a skeleton) from the architectural model. An expansion of that view is Object Management Group (OMG)'s Model Driven Architecture (MDA). These are the same guys that did UML and CORBA. You design your application, and then a tool, through a series of transformations and using predefined templates, generates the source code for you. Very notable example here is EMF. It seems that IBM favors this approach, as it is used in eclipse - a real-world piece of software - that many people use on a daily basis. I never thought anybody will go that route, but it seems that if there is will, there is a way. I guess this comes somewhat close to what the thread opener had in mind.
Yet another view on ADLs is that you should keep them separate, and limit their use to just checking the saneness of your model, making sure you don't make trivial mistakes. The idea is to take advantage of more accessible form of formal methods. The new wave of ADLs, most notably byADL (
paper - paid,
site), focus on you creating DSL specific to your project or area (e.g. web programming). The advantage is that it won't force you to describe your architecture in terms that don't make sense, and it will cover your specific needs.
What many people seem to be getting at is called
architectural styles and patterns in academia. The waters are murky as to what is the difference between styles and patterns, as some authors say they are mostly interchangeable, while others point out that patters are bigger in terms of scale and abstraction. Anyhow, MVC is sometimes classified as a style, and as is
probably the most well-known and widely used style in programming. Some people mentioned MVVC, which is most notably featured in WPF/Silverlight.
Now, as to my own opinion on the subject... I just don't like the idea of automatically generated code. I don't think it is reasonable to specify the architecture up-front (or to expect it to be correct). It usually evolves, and keeping some description up to date is IMO waste of time and effort better spent on another iteration of that evolution. There are many tools that automatically extract (UML) class diagrams from your code, so I don't see the benefit of yet another description. The main problem I see with the academic approach is that they mix high-level and low-level concepts. A lot. They work on tiny projects (tested on 20-30k LOC - that is less that what a cart + check out workflow is); work is done in unrealisic ways (some papers change the freaking code of the Java standard library - hello distribution nightmare), and plain childish attempts are made (look up AliasJava for an example of what I mean - unleash the complexity of C++ onto Java).
From my point of view, you can, and should, briefly document your architecture and doc-comment the code. In your nightly builds, build the automated documentation (javadoc for Java/sandcastle or ndoc for .NET) and generate a few automated class diagrams. That, plus a modern IDE, would be enough for a competent developer to cope with even quite big code bases.