aspose file tools*
The moose likes Other Application Frameworks and the fly likes Learning Spring Application Framework. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Learning Spring Application Framework." Watch "Learning Spring Application Framework." New topic
Author

Learning Spring Application Framework.

Susan Smith
Ranch Hand

Joined: Oct 13, 2007
Posts: 224
Hello,

I'm starting to learn about Spring Framework. I'm looking for a tutorial for beginner and can help me get started easily.
The tutorial that I found online doesn't seem to fit for a beginner like me. The tutorials seem to assume that I know many things in advance already.

Can someone please advise a good tutorial? or a good book? I read that "Spring in Action" is a very good book but many says "Spring Live" is more appropriate for beginner?

My background: I do programming in JAVA using J2SE and I also do some JSP.

Thanks in advance for all the help.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Spring consist of many modules. What aspect of Spring are you wanting to learn? And don't say all of it. Are you just interested in IoC? SpringMVC? AOP?

That said, I think Spring in Action is a great book. It covers several of the most notable modules and begins with the IoC container which is what everything else spring-boards off of.


GenRocket - Experts at Building Test Data
Susan Smith
Ranch Hand

Joined: Oct 13, 2007
Posts: 224
>>>>>>>>>>>>>>>>>>>>>>>>>>
What aspect of Spring are you wanting to learn? And don't say all of it. ..
>>>>>>>>>>>>>>>>>>>>>>>>>>
Based on what you're saying, it seems that Spring framework is a pretty large framework that has many things inside depending on what you need. Are some parts really different from the others?

At this point, I want to explore the benefits that I can get by using the framework. I usually build web application parts using JSP, I read about Spring MVC idea and it seems like a very good idea to me. But I'm also looking for opportunity to share some of the Spring framework ideas to my coworker who specialized in back-end/ system programming.
Tim LeMaster
Ranch Hand

Joined: Aug 31, 2006
Posts: 226
Much of what spring does is make other frameworks play nice together or simplify frameworks.

Have a look at this page - http://static.springframework.org/spring/docs/2.5.x/reference/spring-core.html

It lists the "Core Technologies" - or pieces that are fundamental to the spring framework.

This page - http://static.springframework.org/spring/docs/2.5.x/reference/spring-middle-tier.html

Serves as a jumping off point for middle tier access - or the data layer. Covering Spring's JDBC templating, Hibernate, JDO, JPA, and other third party ORMs.

This page
http://static.springframework.org/spring/docs/2.5.x/reference/spring-web.html

Is all about the web. Spring's MVC layer and integrating with other web layers.

And then you get to this - http://static.springframework.org/spring/docs/2.5.x/reference/spring-integration.html

Which talks about integrating with darn near anything.

This is just to show how huge "Spring" is. You need to figure what parts your are interested in a prioritize your learning. I'd start with the IoC container as understanding it is fundamental to the nature of spring. After that you may be interested in the MVC framework for web apps.

Oh and get the book "Spring in Action"
[ March 03, 2008: Message edited by: Tim LeMaster ]
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Originally posted by Susan Smith:
I usually build web application parts using JSP, I read about Spring MVC idea and it seems like a very good idea to me.


I personally don't like SpringMVC. I use Stripes but I do use Spring for my DAO/Service layers. Showing your co-workers how this might help them is a good idea. Don't expect oooooo's and ahhhhhh's right off the bat though. It takes a bit to see the benefits. But once you do it's tough to go back.
Susan Smith
Ranch Hand

Joined: Oct 13, 2007
Posts: 224
Ok,

I just finished reading chapter 1 from "Spring in Action". =)
I still don't know how to do things in Spring (probably it's better to start using it??).
But I think it's a very good introduction about Spring core concepts (Dependency Injection and Aspect-Oriented Programming) for beginner like me than any tutorial that I can find online.

I already talked to one of my coworker about what I read, before our team gather together tomorrow for me (the new beginner) to give introduction about Spring and I found several things that I'm still confused about after trying to explain it to this one coworker:

(1.) Regarding Aspect-Oriented programming:
This idea seems very appealing for me and very easy to explain to our organization that we can benefit from this.

Quote from Spring in Action:


Calls to system wide concerns such as logging and security are often scattered about in modules where those concerns are not their
primary concern (CROSS-CUTTING CONCERNS). Even if it�s a single method call.Using AOP, system wide components encapsulates application
components that they impact. This leaves the application components to focus on their specific functionality.


We have a system that is perfectly described by the statement above.
But this part I still don't understand how:
System wide components encapsulates application components that they impact. This leaves the application components to focus on their specific functionality.


How does Spring do this? Is this something for me to figure out as I learn more?

(2.)
I'm still confused how to explain dependency injection:

Why do we need Spring to do this? Can't we just have two application components, both having interfaces and implementations, interact between themselves?

[ March 06, 2008: Message edited by: Susan Smith ]
[ March 06, 2008: Message edited by: Susan Smith ]
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

How does Spring do this?

This is called proxying. You have an bean, and a proxy (encapsulates application components) around that bean. When you get the bean via Spring, you may think that you are using the bean, but you're using the proxy. The bean doesn't know about it (this leaves the application components to focus on their specific functionality). If you are starting AOP, it may be a difficult concept at first, and maybe too soon for you to explain clearly. Read the chapter on AOP again, and try the samples from the book.

I'm still confused how to explain dependency injection

Try this article from the ranch's Journal.

Why do we need Spring to do this?

No, you could do it yourself. Spring is just using this concept extensively. It lets you configure relations outside the code.


[My Blog]
All roads lead to JavaRanch
arulk pillai
Author
Ranch Hand

Joined: May 31, 2007
Posts: 3263
Learn Spring IoC first then have a look at its support for Hibernate, JDBC, JMS etc via templationg and then look at its AOP.


If you google for "Spring Tutorials" you should get some hits. I also have some free tutorials at my home page.
[ March 06, 2008: Message edited by: arulk pillai ]

500+ Java Interview Questions and Answers | Java job hunting know how & Java resumes
Susan Smith
Ranch Hand

Joined: Oct 13, 2007
Posts: 224
If you are starting AOP, it may be a difficult concept at first, and maybe too soon for you to explain clearly.

I think you are absolutely right. I feel that way during the presentation.

... I also have some free tutorials at my home page.

Arulk, what's your home page?
 
wood burning stoves
 
subject: Learning Spring Application Framework.