File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes New to spring2.5 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "New to spring2.5" Watch "New to spring2.5" New topic
Author

New to spring2.5

jas preet
Ranch Hand

Joined: Mar 31, 2010
Posts: 76

Hello Ranchers

I am new to spring framework. it would be a great help if anyone can provide me something to how to run a sample web application in springs2.5 .. i have been searching a lot on net .but none could provide me the solution. i am totally lost. i have to start a project in a day . . .an urgent help is required. i have to use eclipse ganymade for this purpose


Thanks Jaspreet ----- Nothing is permanent
jas preet
Ranch Hand

Joined: Mar 31, 2010
Posts: 76

i have to set up the framework in eclipse ganymade
Hongli Li
Ranch Hand

Joined: Oct 29, 2006
Posts: 124
I don't replay this because this is an "urgent" request, but you can use maven AppFuse to create a template spring mvc project then install spring IDE plugin and M2Eclipse plugin to your eclipse.


Do you know why this cup is useful? Because it is empty.
jas preet
Ranch Hand

Joined: Mar 31, 2010
Posts: 76

i dont know how to do it. my team leader just told me that we have to start a project in spring framework . i dont know how to start studying
Hongli Li
Ranch Hand

Joined: Oct 29, 2006
Posts: 124
you first need to know Ioc container of Spring then go to Spring MVC. if you will use maven you might need to install M2Eclipse plugin for eclipse.
jas preet
Ranch Hand

Joined: Mar 31, 2010
Posts: 76

thanks bro..i started getting what springs are..i studied IoC container dependency injections..and also the MVC of springs . . now tell me how to set up springs in eclipse ganymade .. spring plugin for eclipse are not istallable.. i dont know what is the problem,,but i entered the site name,got the packages..but i am not able to install them
Hongli Li
Ranch Hand

Joined: Oct 29, 2006
Posts: 124
You can use maven as said before, for version 2.2.1 you can run mvn archetype:generate then enter 116 to generate a spring web template and then install M2Eclipse plugin and import the project into your eclipse. done!
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Personally, I'd recommend against going the Maven or AppFuse route at this point: learn the basics first.

If you're starting a Spring project in a day and know nothing about Spring--you're in a lot of trouble. Using it even remotely well requires, as mentioned, a good understanding of the IoC container. I'd start with any of the Spring tutorials available from SpringSource itself or try to find something very simple on the web first.

Using Maven or AppFuse puts many layers between you and Spring--if something goes wrong you'll have absolutely no idea where to start looking when trying to fix it. Start with a minimal example and work your way up. Deploying a Spring web application is, however, the same as deploying any other web app.

This is *not* a good way to start a project--somebody screwed up if they think this is a good idea.
jas preet
Ranch Hand

Joined: Mar 31, 2010
Posts: 76

I'll try .. but m not sure will i be able to do it or not
jas preet
Ranch Hand

Joined: Mar 31, 2010
Posts: 76

Thanks David .. i got simple application on net . but the thing is i am not able to install the spring plugin for eclipse(no repository fount at the specified url).. i got all the jar files including springs.jar and all other that are required.. but how to set up this all in eclipse ganymade. actually our company got the project and that to be started soon. and i have no experience in framework .. i have jus worked on jsp and servlets before .. this is my first time.. but a great challenge ..looking forward for a great help from you fellow ranchers
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

You don't *need* the Spring IDE to work with Spring.

Not knowing what update site you used I have nothing to add.
jas preet
Ranch Hand

Joined: Mar 31, 2010
Posts: 76

That means i jus need to add required jars in my web application(sample application that i fount on net) .. and m done
jas preet
Ranch Hand

Joined: Mar 31, 2010
Posts: 76

http://springide.org/updatesite this is the which i used to install spring plugin for eclipse ganymade
jas preet
Ranch Hand

Joined: Mar 31, 2010
Posts: 76

i got the features from the site..but not able to install them in eclipse...
jas preet
Ranch Hand

Joined: Mar 31, 2010
Posts: 76

Hongli Li
Ranch Hand

Joined: Oct 29, 2006
Posts: 124
David Newton wrote:Personally, I'd recommend against going the Maven or AppFuse route at this point: learn the basics first.

This is *not* a good way to start a project--somebody screwed up if they think this is a good idea.


totally agree with you, but it would definitely remove some heavy hookup works for beginners, and at the end of the day people still have to know the inside out of the maven development cycle. and how Spring works anyway.

jas preet wrote:That means i jus need to add required jars in my web application(sample application that i fount on net) .. and m done


Maven is using convention over configuration, so you define your dependencies(jars) in the pom.xml file and when you build a WAR all the jars will be bundled in WEB-INF/lib folder, it's transparent to you.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Hongli Li wrote:totally agree with you, but it would definitely remove some heavy hookup works for beginners, and at the end of the day people still have to know the inside out of the maven development cycle.

Not if they're not using Maven.

and how Spring works anyway.

Yes--they *do* need to know how Spring works--but throwing many layers on *top* of it is not the best way to do it when starting out: if anything goes wrong it's impossible to figure out what, where, and why, and how to fix it.

Walk before run. Basic before advanced. Simple before complex. Minimal use case before complete development tooling. This is the nature of things. Even if they *are* attempting to do all those things at once, each should be approached separately, then integrated, one *simple* step at a time.
Keith Flo
Ranch Hand

Joined: Nov 29, 2005
Posts: 128

This tutorial on wikipedia is the by far the easiest to understand Spring tutorial I have seen on the web ... dead simple ... no maven, no plugins to install ... its just a console application. This should let you get started.

A side note ... years ago, when Spring was starting to get really popular, people would often say that one of its strengths was that it was soo easy to learn (especially compared to EJB). That apparently is no longer true.


kf
SCJP 5.0 (preparing for SCWCD)
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

It's still easy to learn as long as there's a natural progression--but yes, it's a big framework and too much to take on all at once. Starting with the IoC container is obviously the best place to start since everything builds on top of that. Once that's understood the rest of it falls into place much, *much* more easily.

I fear for the viability of a project that's apparently very urgent, staffed with people that don't know Spring, and probably has a relatively short turn-around time (that part I'm assuming, so I could be totally wrong). It doesn't make any sense, and I believe the quality will suffer (a lot).
Hongli Li
Ranch Hand

Joined: Oct 29, 2006
Posts: 124
David Newton wrote:
Walk before run. Basic before advanced. Simple before complex. Minimal use case before complete development tooling. This is the nature of things. Even if they *are* attempting to do all those things at once, each should be approached separately, then integrated, one *simple* step at a time.

very wisely said, with more and more complicated frameworks hide most implementations details away from users, less and less people would like to know how they work behind the scene. How many JAVA new comers know how to open a transaction programmatic-ally? I've interviewed some guys they didn't know what setAutoCommit(false) is for, but they can write pretty good Spring based applications. DRY SOCS is the main concept in spring, when mastering it, it's hard to distinguish the bad programmers and good ones when it comes to Spring field.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Hongli Li wrote:[...] less and less people would like to know how they work behind the scene.

Yep, that's it exactly :)
jas preet
Ranch Hand

Joined: Mar 31, 2010
Posts: 76

i am done with the simple console applications of springs... got the fair idea of ioc container(dependency injection) annotations..now i have to start with the web application ...Help me guys !!
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Help you how? You don't say what the problem is. We can't just teach you everything about Spring MVC.

Again: did you look at any of the examples or tutorials?
jas preet
Ranch Hand

Joined: Mar 31, 2010
Posts: 76

the problem with me is that i am not able to install the spring plugin into eclipse..
this is what i did
1. went to Help ----------> software updates
2. Add site ---------> http://springide.org/updatesite
3. checked all check boxes
4. then clicked on install button

here is the problem.. the install button is not enabled so how can i install the software . i checked everything .not working
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

For IDE issues please post in the IDE forum. Note that you don't need the SpringIDE to get started with Spring.
jas preet
Ranch Hand

Joined: Mar 31, 2010
Posts: 76

I have installed the plugin...now m gonna start with some sample applications like hello world and etc..
 
Don't get me started about those stupid light bulbs.
 
subject: New to spring2.5