Framework or Custom Code

I read an interesting discussion on Slashdot. A developer had some simple requirements for an app. Then he entered a long phase of scope creep. The original implementation utilized the Spring framework as well as Hibernate. However the new requirements needed more than the frameworks chosen could provide. This scenario generated a lot of talk on Slashdot.

The original developer in retrospect thought he should have used JDBC to implement the requirements. Then any new reqs could be implemented with custom code. Senior developers agreed. You got to know when to use a framework, and when not to. In general, you should skip the framework if you are developing for a long lasting project.

Some believe Spring to be an evil framework in general. They say that removing Spring saves development time in the long run. Others say that frameworks in general are not bad, but Spring is no good. All of these frameworks are decisions made during the design phase. You got to get your design correct.

There is a benefit to using framework. You save time. There can be a lot of wasted time if you try to code your own framework, or code everything by hand. You could choose a compromise. Skip the Spring framework, and use JDBC with Hibernate.

You also cannot rely on the framework for everything. It does not come out of the box supporting all of your specific requirements. We use some high level frameworks in our system for general programming purposes. When necessary, we step back and roll our own code when need be. We also make use of some third party tools to take care of mundane tasks. It is a delicate balance which requires some experience to make.