What a Crappy Blog Entry

Trying to stay in Tinou’s theme of crappy things I thought I’d talk about his entry, “Spring, what a crappy framework”. The main thing here is that the example points to bad design more than it does why Spring is a crappy framework (it’s not but even if it was). I could easily make that a good design as well and Spring has nothing to do with either approach. I have yet to see how Spring encourages bad design. Rather, it encourages it I believe. Tinou pointed this out as well with respect to encouraging the use of interface driven design. Maybe people are just trying to impose Spring where it’s not supposed to be used within his organization. Pushing a tool where it doesn’t belong is bad no matter how or where it happens. I don’t know, though. Some complain it encourages over complicated configuration. Maybe it’s better to have complicated configurations than it is to have that complication moved into code which tends to be complicated enough as it is.

Now, the configuration. Let’s face it, complex applications are going to have complex configurations. Over time you can simplify them or move towards a configuration through convention approach that Rails has been championed for but it’s always going to start out a little more verbose than it might need to be. In Spring 2.0 it moves forward with the use of XML Schema. Combining that with its support for “components” and you will start to see configurations get less complicated. It will also depend on how you manage your configuration files as well. I know that most people don’t think about this because when I ask people in interviews how they manage complex configurations I get blank stares. Almost every time. I generally tend to break my configurations in to multiple files based on functionality silos. Yes, there are a lot of files but if you know you need to find something about the query factory and/or library then you go to applicationContext.queries.xml and there it is (see, more convention!). Complexity is going to go somewhere and as long as you are consistent and follow your own conventions then its maneagable. I also use Spring BeanDoc to view my Spring configuration and how everything ties together. In addition you can also use the Eclipse Spring IDE (note — the site seems to be down right now) plug-in to help better manage your configuration.

Sometimes you just need to figure out where your problem really lies. It’s not always the tool. Tools can all be misused and most of the time the problem lies between your ears more than in your computer.

1 thought on “What a Crappy Blog Entry

  1. I definitely agree with you on your point about complex management. I’ve suggested the “Functional Silo” idea on my (complex) project. It didn’t take hold because it simply didn’t fit the the existing “Tier Silo” approach taken by “sister” projects. At least we have an approach :).

    Thanks for the note about BeanDoc. I didn’t know it existed. I’m going to play around with it today.

    I like Spring IDE as well, but it doesn’t work well on my project :(… The configuration files are scattered in different reusable projects.

    With all of that said. I don’t really agree with you about where the problem is. Sure, if you’re not using your head, you’ll end up in trouble. However, as complexity rises in a project, a good tool can help manage the code and configuration a lot better.

    I played around with NitroX (a.k.a Bea Workshop Studio) when I was working on a complex struts, tiles, jsp, hibernate prject. My client didn’t want to spend the money, and I was even tempted to buy it myself. It gave a consistent and easily navigatable view of my code & configuration. It would have saved me a lot of time in figuring out what the original develpoers were thinking.

    There real benefit to tools is for develpers who had less experience with a specific technology get up to speed on both the technology and how it is (or can be) used within a project…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s