The Curious World of Java Frameworks: An Introduction
I have felt all my time being a programmer that I don’t know enough of my field of profession. I guess you could call it a healthy curiosity and the need to become a better software engineer. At first, when I started working, I wanted to get a better grasps of the very basics. Learning to use Java efficiently, which is the language I work with, learning nifty programming tricks, coding in an object oriented way, testing, building, refactoring, writing maintainable code etc. I feel that I have gotten a hang of these things now and my curiosity has moved on to other things. My latest interest lies in third party frameworks which have caused a big buzz in the Java community lately. I tout people to use our company’s GUI framework, but at the same time I haven’t bothered to look at other readily available frameworks out there. I guess that many in the branch too easily just starts to code their projects head first, instead of taking the time to look around for a moment too see what’s available out there. Many of the common project requirements have already been coded a bunch of times, and many end up building their own little framework when there is already many proven and free solutions available for download. I don’t think it is so much of a case of the Not Invented Here -syndrome (NIH), although it could be a factor, but more of not just knowing enough of all the powerful tools that you could add to your toolbox.
I have therefore gathered a list of frameworks that interests me, but of which I don’t really know anything about. The biggest one of these is the Spring framework. Next of the bat comes Maven and the third is db4o. There is a few others too but I won’t go into details right now.
The parts of Spring that I’m most interested in is building more modular applications with its Dependency Injection (DI) and Aspect-Oriented Programming (AOP) capabilities and it’s Object-Relational Mapping (ORM) integration tools to automatically handle connections, transactions, exceptions etc. to the database. I use Hibernate a lot and Spring has Hibernate integration, so I’m interested to see what parts of my own code is already implemented in a more generic solution into Spring. I just got the book ‘Spring in Action‘ by Craig Walls that I’ll start exploring at some point. The downside is that the book is 700 pages and I’m a terrible slow reader. On the plus-side, Spring in very modular in itself and the most important modules are presented in the very beginning of the book. That means that I can take some new features to use after every chapter.
The one that I’m going to look at first, however, is Maven. Maven is first and foremost a build system to easily produce jar:s, war:s and ear:s of your projects. Additionally, it can download other framework jar:s for you and easily plug them into your project. I’m looking into it to simplify project structures and have it help me to handle dependencies between my own projects when there can be up to six different projects depending on each others.
db4o interest me because I want to see what alternatives there are to SQL. Object databases is one of them. I’ve heard that db4o is really simple to use and that would be a great asset to small pet projects.
So those are the frameworks I’m gonna start off with to enlarge my Swiss army knife. I’ll start with Maven as I already have tested out it a little, it is fairly compact and it defines the project’s structure. It’ll be a lot easier to add on the other frameworks to the project when I’ve laid the foundation with Maven.
Let’s see how this starts off..