views:

419

answers:

5

I'm trying to learn Struts, Spring and Hibernate, I was just wondering if anyone knows any good sources or some examples that makes use of all the technologies (like a small web application).

Thanks.

A: 

Spring has pretty good documentation on their web site. It's among the best of any open source library I've used.

My personal opinion on the quickest way to learn any library it to download the source code and create a simple application that you can then run through a debugger and start stepping through the source code. This is a great way to see how you code is interacting with a library and will introduce you to code that is fairly mature and decently written. If you going to copy any programming style, spring, struts and hibernate is a decent place to start.

BillMan
A: 

AppFuse, by Matt Raible, is a web app skeleton that makes use of these technologies. You can read his code and see how they're all wired together, etc. IMO its nicer than having to trudge through exhaustive documentation. If you like it then you can integrate your app into it without having to write all the tedious glue code. It's a great example app.

I haven't used it in a while, but last I checked there were different versions of it using different technologies for the front, middle, and back layers. But the three you want are definitely supported.

Go to http://appfuse.org/display/APF/Home and check out the quick start guide first.

danben
+1  A: 

Struts : The Complete Reference by James Holmes

Hibernate: Documentation (this should be enough)

Anyway, before learn this "world" I suggest you to evaluate if this is the right way for your purpose. I know you are not asking about the framework but after 3 years of struts apps development I suggest you to spend a lil bit of time thinking about the framework choice. Here some bad points of struts:

  • not agile
  • community rare like a kiwi bird
  • a LOT of xml config
  • you have to learn a lot of stuff in order to build a "hello world" app (xml, java, jsp, jsf, html, javascript, hibernate, ...)
  • ...
baijiu
A: 

I not sure that you want to combine these three major Java web frameworks altogether or not. But I used combination of them in my latest three products. In my opinion, this is one of the best pattern I ever used.

Struts2 take care MVC (actually, I use only M, C and some little V), Spring manage beans life cycles, transaction and some AOP, and Hibernate in ORM. I love this pattern very much.

I accept that Struts1 has very complex and headache XML configuration but for Struts2, I think it more simple, make-sense and well-organized.

If you want to start with this good pattern, you can go to http://bit.ly/4CrEae

Tanawat Tassana
A: 

Spring comes with a pet clinic example which should get you started.

fastcodejava