Java Frameworks and the Effort they might save or create
( 3 min read )
Java is a nice programming language. But Java/J2EE websites can grow to be very complex in a short amount of time. One of the biggest areas of discussion about J2EE development today is about the many kinds of frameworks that can be implemented with your project, and what valuable features they provide, or amount of work they chop down.
The below graph is how I feel about the amount of effort required to learn, build, and test, with 2 popular J2EE frameworks. I think it quite humorously sums up the biggest reason why frameworks exist really. (Yes, I threw it together in MS Paint. Yes, I understand it could be much better looking. But I'm a programmer; I'm naturalisticly tuned to find the shortest way to accomplish things.)
Not using a framework, is figuratively killing your web project. You shorten its life span by increasing the difficulty of implementing it. It gets harder and harder to add features, the larger it becomes; until at last, you give up, or hand it off to someone else to work on. That's what I call the "Oh Shit Moment". The project has now become too difficult and absorbing to even add the tiniest web pages or actions.
Struts is a small framework, literally. My last Struts J2EE project had 22 library Jars required to use it. It requires some small efforts to get setup and running, but once you have your basic structure in control, you can easily add on dozens of actions and servlets on your application, without muddying the waters. Hence, the initial learning curve increases as the project is born. But over time you'll become accustomed to the structure, and be able to make your J2EE project even more complex and amazing over time, with hardly the effort.
Spring, while a much larger framework, generally requires more effort in the beginning phases to get setup correctly. However, just like most frameworks, its real benefits pay off when your project matures and grows into an enormous web application. This is, arguably, the biggest reason why frameworks exist. To simplify the complex applications.
Now, after you've decided that a framework is definitely the way to go, choosing which one suits your needs is a mix of personal experience, budget limits, and taste. My graph may have exaggerated the efforts a bit, but it clearly gets the idea across. And what did you expect? It was drawn in MS Paint.
Published: May 6, 2015