We look at interfaces and implementations as we look at content and style, so why not deal with it the same way?
I used Spring and I looked at Guice and I think they are both pretty obtrusive language extensions. I firmly believe that programming languages themselves should adapt to patterns that are more cohesive for dependency injection, testing, etc., so why not gravitate towards a stylesheet approach? By providing multiple "styles", you can define object configurations for different purposes. Perhaps classes and other commons can allow you to define transaction ranges that are more powerful than simple class / method name mapping.
Does this seem like a good idea to someone? Also, do you think DI and AOP will be integrated into future languages as a core feature rather than brooding? I was just thinking and it looks like interface -> implementation almost matches data type ->.
Thoughts?
a source to share
This is a very old idea, first introduced in the early 1980s. It was then known by the terms "configuration programming", "software integrated circuits" or "architecture description languages". "Dependency Injection" is a neologism where enterprise developers have recently rediscovered ideas.
Consider the Conic [1] and Regis / Darwin [2] systems as examples. These systems were used to write industrial control software and directly influenced how software ** was written for Phillips TVs. An interesting feature of Darwin is that the language has both textual and graphical representations [3] and formal semantics .
Conic and Regis / Darwin did much more than the existing DI framework because they were used to build distributed systems: a configuration language compiled into a program that deployed a system in parallel across a network of machines (formal semantics define how this Development Process works) ... For comparison, Spring, Guice, etc. Configuring objects in only one address space and leaving much more difficult to connect distributed components to the programmer.
Another re-discovery of this idea is the TinyOS operating system for touch network applications, although it lacks such a clean conceptual model of components and configuration.
- Kramer, J., Magee, J., Sloman, MS and Lister, A., CONIC: An Integrated Approach to Distributed Control Computer Systems, IEE Proceedings., 130, Pt. E, (1983), 1-10.
- Magee, J., Dulay, N. and Kramer, J., Regis: A Framework for Distributed Software Development, Distributed Systems Engineering Journal, Vol. 1, No. 5., September 1994, 304-312.
- Kramer, J., Magee, J. and Ng, K., Graphics Configuration Programming, IEEE Computer, 22 (10), (1989), 53-65.
** possibly "was".
a source to share