Technologies are coming and going faster than every before. In this environment, how can we provide companies with a good return for their software investment. Looking back, J2EE was all the rage. Software executives were banking on J2EE and making significant investments. The same thing happened with COM+, ASP 3.0, etc. Managers were projecting significant savings by using these. Now, where are the savings. Many applications written with these are being rewritten in newer technologies.
Why? Because the applications had no core. By core, I mean, the center of the application that describes the business domain. Typically, these are classes and interfaces. Creating classes using COM+ or J2EE doesn’t an application core make. The core doesn’t care about surrounding technology. The core is your domain model. By its design, it’s the most important part of the application, but, done well, it’s portable.
Look around and see if you can relate to this: A software team focuses much energy on making the database as good as possible and they create stored procedures to pull back the data as quickly as possible. They also consider the use cases of the screens that are necessary. Using technology X for the presentation, they make database table designs and stored procedures that return exactly what the screen needs to show to the user. Perhaps J2EE or COM+ is used in the passage of information from the database to the UI. Perhaps Enterprise Java Beans for COM+ components perform some transformation or calculations necessary for the screens.
Take a step back and remove the screens. Remove the database. Is there any application left? Can you point to any business rules or domain concepts left in the application after the presentation and storage components are removed? In my experience, I’ve had to answer “no” more than once. This is absolutely the wrong way to develop software.
Software systems should be resistant to climate change. The technology climate is always changing. The core is the most important part of the application, and it should be insulated against changes on the outside. Over time presentation technologies have changed many, many times. Data access technologies haven’t sat still either. We still have the relational database, but the manner of using it is constantly changing.
Software health check: Take away the code used to talk to the database. Take away every screen. You should still have an application. You should be left with your application core or domain model and domain services. Everything should be intact.
Handle changes in technology gracefully. If your application has a healthy core, you will be able to upgrade to the next-generation UI. You’ll be able to change your data access to use LINQ or an ORM without much impact. If you don’t have a healthy core, any change in technology requires almost a wholesale rewrite.
Any software system is a large investment for a company. That software is expected to last a LONG time. By focusing on the core of the application (domain model), the software will be able to weather changes in the technology climate. By creating a healthy core, your software will be able to drop and adopt technologies as necessary. Let’s stop rewriting and rewriting and start creating healthy software.
The inspiration for this post came from Jim Shore’ s thoughts.