Tuesday, December 27, 2011

A sprinkling of Spring

Although this blog is about mobile development, I also would like to learn a bit about Spring technologies. This is mostly because pretty much any non-Android Java job out there has some element of Spring or Spring concepts in it. So, basically it's just good to know.

The goal therefore of this post is to get a simple hello world up and running in Spring. I've downloaded the IDE about 7 times. But, now I'm determined to get the hello world done.

At this url: http://www.springsource.com/developer/sts

we find the link for download the SpringSource Tool Suite. Note you can skip filling in the form on the right if you click on the link that says "I'd rather not fill in the form".

On that download page - http://www.springsource.com/downloads/sts - we find that there the current Version is "2.8.1.RELEASE", it's eclipse 3.7.1 and there's a dmg (mac install file) listed right at the top. 385 MB.

springsource-tool-suite-2.8.1.RELEASE-e3.7.1-macosx-carbon-installer.dmg

Ok, this will take a few minutes. I'm at Panera, but it's 4:21 in the afternoon, so, no one's really around. While that's going on, let's look up how to do a hello world somewhere on the net.

Actually, if I click on the "Spring Framework" link from the main page, it looks like there's some promising links in there. "Get Started" has links for get sts (I'm doing that), tutorials, code samples, doc, forums. Let's go to tutorials.

Ok, how about this screencast:

http://www.youtube.com/watch?v=kSITVsOUvLU

It's a 15 minute webinar.

Ok, I've just finished watching part 1. It's a nice overview of core spring, what it is conceptually. Let's move on to part 2.

It's asking me to install Spring now. I'm just double-clicking the .dmg, and then the install app. It installs into /Users/myname/springsource, and springsource has 4 directories.


apache-maven-3.0.3
spring-roo-1.1.5.RELEASE
sts-2.8.1.RELEASE
vfabric-tc-server-developer-2.6.1.RELEASE


When you start sts, it creates this workspace:

/Users/myname/Documents/workspace-sts

Ok, now the IDE is up. I moved all the tabs to the left side, which is much nicer. There's a dashboard display with a lot of neat looking links, including tutorials, as well. There's an image below.





Ok, he says just do file, new, spring template project. Then choose "simple spring utility project" or "spring mvc project" - unfortunately, he doesn't tell you which one right away because he's already created his projects. Let's go with the utility for now. It's kind of an overview...

Actually, he kind of breezes over the code. it's more of a showing what you can do than a "do this" kind of presentation. And there are actually 5 videos altogether. I feel like I know a bit more, but I'd really like to get that hello world going. We'll tackle that in the next post.

No comments:

Post a Comment