The more I read about dependency injection, the more I am reminded of the 1990s. Maybe a few of you will remember those days. Java launched in 1995, and soon thereafter, Visual Basic started to support object orientation. It was all the rage.
However, VB was not “truly object oriented†– or “completely†object-oriented. It supported the creation of objects, but it did not support all of the features of object orientation that were supported by Java and C++. I was exposed to a lot of scorn when I identified myself as a Visual Basic programmer. However, my clients were very pleased with my work, and I managed to solve some real business problems for them.
Visual Basic did support interfaces, and it was typical for me to design interfaces, and then to wire my objects together using a technique that is now called setter injection. I liked the fact that defining an interface still gave me the freedom to tinker with my implementations. In fact, as long as I respected my interface, I could plug in objects that had radically different implementations.
Java programmers were not interested in what I had to say. They liked inheritance, and all the things Java could do. They wanted to write once and run anywhere, but all of my clients, and all of my employers, were running Windows and using Microsoft Office. I liked Java, too, but I was very productive and employable, thank you very much.
When I started to work in the dot com world, I was more exposed to Java. Solaris was doing well in this space, and we had Solaris boxes. Java was hot, EJB was taking off, and there were many products on the market that were Java based, including content management systems, CRM systems and the like.
Still, the way that I programmed in the 1990s was frowned upon. While writing Java code, I was reluctant to overuse inheritance. I saw a lot of Java code that was complex and riddled with dependencies. I saw custom frameworks that were complicated and brittle. I stayed away, preferring to be productive.
So, here we are all these years later, and all sorts of people are saying bad things about people use java. Many Java developers are jumping to other programming languages, and, even in the Java world, there is a move to simplify Java and jettison some of the complexity.
What’s hot now? Dependency injection is hot. Imagine that. What is the wisdom today? Inheritance can be overused. Wow! I would say that I told you so, but that is not really what I am trying to say. The truth is that, ten years ago, I happened upon an approach without truly understanding how it compared to the alternatives. My approach was simple, and I tend to be a simple guy – I try to be. Often, I flee complexity because I am lazy, or I am overwhelmed, but not because I am too smart.
Those C++ and Java people got up my nose seven to nine years ago. I need to let it go, already. Minds are opening. These are exciting times. I am enjoying what Bruce Tate has to say at developer works. The Crossing Borders series is great stuff. Bruce is making a real contribution to the discussion and to learning.
In a previous entry, I mentioned that I am working on a personal project that uses REST style urls and microformats to server data to my web application from Cherrypy. Since then, I have noticed that REST is becoming the flavour of the month. We love new things, don’t we?
I have also discovered that the Ruby on Rails people have been getting excited about REST as well. And, there is also a new Java project that I found out about: the Restlet project. I have not noticed as much discussion coming from the PHP camp about REST, but I may simply be missing it.
REST is a style, or a way of constructing URLS, but it is not a technology. I write this for older developers, like me: take note of REST. For a while, everything new seemed to be an MVC framework. Even PHP has CakePHP, an MVC based framework. Everything was trying to compete with Ruby on Rails. That trend is now entrenched. Even the next version of Joomla will be based on the MVC pattern.
Choosing to write code for a living will expose you to never-ending change. What was hot yesterday, will not be tomorrow. In fact, what was hot yesterday is often violently discarded. The older you get, the more you want to keep doing what works. You become good at what you do, and it seems like an insult that younger developers are not interested in learning what you know.
I am here to say to older developers that you DO have knowledge that can benefit young up-and-comers, but you are going to have to understand the new things to ensure that you have credibility. It is a characteristic of the young to dismiss an older developer the moment he or she is not familiar with something new, like Ruby on Rails, for instance. It has always been so. We owe it to the younger generation to try to keep up, especially if being conversant with new things makes it easier for us to share our real wisdom and experience.
So, oldsters, take nore of REST. Besides, learning can be fun.
Open Source is a viable alternative to standard proprietary software. However, it has to be properly considered. If you are considering open source, consider this white paper, which suggests a few issues that you may want to examine.
If you want something you can read in bed, there is also a useful book you could buy. While you are checking out the book, sign up for a monthly newsletter that examines the issue of open source.