Web Blog_blogentry_210413_1

Developing a Spring 3 Framework MVC application step by step tutorial#

I have spent hours and hours working on trying to understand and work with Spring.

I have figured out there are some advantages; but, I consider Spring "Fragile".

It was supposed to be, in the beginning, a simpler way than J2EE. I am not sure that is any longer true.


I have done many of the Tutorials for Spring. At least half of them fail. Usually, they fail do to the complexities of the many dependancies required for Spring to operate.

Generally, Spring hides a lot of these dependancies by using Maven, which when it works is wonderful, but Maven too still a complex implementation.

Simple Spring Tutorial#

I found this Simple Spring Tutorial that worked and it was helpful. I think the reason it worked was it is Simple. Gets the points of Spring across.

The Simple Spring Tutorial still asks you to go to: "Download the latest version of Spring framework binaries from http://www.springsource.org/download".

They mention they used spring-framework-3.1.0.M2.zip for the Tutorial. Of course, when you go there, the distribution is "spring-framework-3.2.2.RELEASE-dist.zip".

But, you can, if you hunt, find the "spring-framework-3.1.0.M2.zip" files.

This one worked, or at least, I could make it work, with a little effort. The Simple Spring Tutorial was posted on July 15, 2012, which only 9 months old. I wonder if it will work in 12 months?

Developing a Spring 3 Framework MVC application step by step tutorial#

We got through the simple one, let us try something bigger.

You are instructed to: Download all Spring Framework JAR from here. The current release shown there is "spring-framework-3.2.2.RELEASE-dist.zip".

Then you are instructed these are the "Required Jars :"

  • commons-logging-1.1.1.jar - Well, this is not part of the here., but I knew what he meant. Do you?
  • hsqldb.jar (Used for HSQLDB) - Well, this is not part of the here.. I hunted it down.
  • org.springframework.aop-3.1.1.RELEASE.jar - I found: spring-aop-3.2.2.RELEASE.jar
  • org.springframework.asm-3.1.1.RELEASE.jar - Never did find this in the 3.2.2
  • org.springframework.beans-3.1.1.RELEASE.jar - I found spring-beans-3.2.2.RELEASE.jar
  • org.springframework.context-3.1.1.RELEASE.jar - Found: spring-context-3.2.2.RELEASE.jar
  • org.springframework.core-3.1.1.RELEASE.jar - Found: spring-core-3.2.2.RELEASE.jar
  • org.springframework.expression-3.1.1.RELEASE.jar - Found: spring-expression-3.2.2.RELEASE.jar
  • org.springframework.jdbc-3.1.1.RELEASE.jar - Found: spring-jdbc-3.2.2.RELEASE.jar
  • org.springframework.transaction-3.1.1.RELEASE.jar - Found: spring-tx-3.2.2.RELEASE.jar (Well, it was the only one that looked close)
  • org.springframework.web-3.1.1.RELEASE.jar - Found: spring-web-3.2.2.RELEASE.jar
  • org.springframework.web.servlet-3.1.1.RELEASE.jar - Never did find this in the 3.2.2

So what is a person learning Spring supposed to do? Well, I downloaded the "old" 3.1.1 release. All the jars are present.

Issues with Developing a Spring 3 Framework MVC application step by step tutorial#

I did find a couple of issues with the Developing a Spring 3 Framework MVC application step by step tutorial.

The application does not run. I requested the source code to see if there are typos or ???.

Created the SpringJdbcDao Interface as follows:

package com.dao;

public interface SpringJdbcDao
For some reason the author implied it was not required "because it doesn’t contain any special code". I guess newbies are supposed to know how to create the file.

In the "JBTJdbcController", the line:

Should be:

In the dispatcher-servlet.xml file:

Should be:

In the "SpringJdbcDaoImpl.java" file, the line:

return springJdbcDao.searchMemDts(vngmem);
Shows as an un-implemented method in 'SpringJdbcDaoImpl'.

The Problem#

The fact that an application written a year ago will not run on the current release implies to me there is a problem. With security issues being revealed all the time, there is a demand to upgrade to the "latest" versions. With Spring, this could cause a re-write of the application.

If my premise is true, then I know how this works in a large organization. Instead of being agile, the management of "Fragile" applications, due to fear, puts out the sentiment of "Do not Touch it" unless we have too.

Am I missing Something?#

Let me qualify. I am not a fulltime developer. Though I have written a lot of applications, they are not complex enterprise applications that "Developers" work on everyday.

But is sure seems to me, that Spring has become very complex and now has all the issues of J2EE that it was intended to solve.

Or, am I missing something.