2 Synthesis‎ > ‎Computing‎ > ‎Programming‎ > ‎Java‎ > ‎

Spring

Spring Blues

All I wanted to do is get a spring application up and running that I could start to modify and play with and enjoy. I wanted to see why its really good for web applications. Instead I have to read endless books telling me why Dependency Injection is so great. Well if I had decided dependency injection was great in the first place then all the spring books would be perfect for me. But actually all I want to do is get a bl..dy application running and then start to understand what I can do with it. I want to be impressed and then look at how it works and how I can do impressive things myself. I don't want an endless sales pitch followed by a "Hello World" program.

I have searched the web in vain for for anything that gives a decent  example, instructions on how to make it work in Eclipse and explanations of what its doing. It would be nice even if it stated clearly what you needed to know in order to understand it. i.e. if it talks about Java Servlets why not show you one in the code and give a few lines on what it does. The concept isn't that hard. Instead the texts are littered with silly analogies about Knights and Quests and dependency injection of Quest into Knight.

When I learned to program you just looked at the manual and things were defined and when you wanted a story you read King Arthur. Totally unrelated analogies do not help.

Eventually I got my spring development environment up and running  and eventually got a "Hello World" program running but although I have downloaded other example code from the book "Spring in Action" it is impossible to just get it running.

The best and only tutorial I eventually found was "Spring MVC Basics" with Grant Dawson sadly he hasn't followed it up with anything else.

YouTube Video


And the funniest criticism of spring was here; Why I Hate Frameworks in fact a search on the web for "Why I Hate <name>" is quite informative on a lot of topics.

 

 






Preamble

TROUBLE IS: This is a total mess!

Finding anything that tells you what you need to install the spring development environment given a clean Ubuntu has been hard.

Here  they offer you the Spring Tool Kit and say its everything you need, but it isn't! Spring Source: Get Started With Spring

Here they actually give you some idea what to do Spring Environment Setup

Start Here

TROUBLE IS: At the moment I am not sure that you need the latest SDK or whether JDK 6 from the Ubuntu Software Centre will work???? I installed the latest.

Install the JDK

Install the JDK with the instructions on this link JDK

Install Eclipse

From the Ubuntu Software Centre.

TROUBLE IS I am not sure whether the spring installation installs eclipse anyway?

Install the Spring

Download the Spring Tool Kit from here Spring Source: Get Started With Spring

TROUBLE IS there is no entry put on the Applications menue

Getting Started in Spring

There is an almost nice tutorial here but its for windows.

Spring Hello World Example

TROUBLE IS Works fine till step 2 where it doesn't tell you where to get "External JARs" from!

So your just left to search around and guess. Because there is no strict naming convention even then you don't know if you have the right thing because there is nothing with the name given.

Could not find anything like

springframework.aspects
commons-logging-1.1.1
antlr-runtime-3.0.1

Some JAR files that looked like the others were found in;

home/tom/springsource/sts-3.1.0.RELEASE/plugins

So I shoved them in!

Then from Apache Commons Logging I downloaded commons-logging-1.1.1-bin.tar.gz and left it in the downloads folder, unpacking it there YUK!

Adding these to the libraries seemed to do the trick.

Getting Started in Spring

Lets try and write it properly at some point.


Some more Links

Spring In-depth, In Context


Comments