Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
I am currently working on a project which i thinking of using JSF and Hibernate. JSF for display layer, and Hibernate is just for the persistent layer. Then i tried to find out how to put them work together. However, i found that lots of examples on the Internet is about JSF + Hibernate + Spring. It seems that JSF can not just work with Hibernate. Spring is needed. I know nothing about Spring, so what is Spring? what is this framework do? Why people like to put it to work with JSF and Hibernate? any helps is appreciate!!! thanks~~
Spring is a framework whose primary purpose is to allow you to construct and wire together JavaBeans. There's a core component, designed to be lightweight, and then there's add-on components for specialized functions such as ORM support (including Hibernate and JPA).
There's no absolute requirement that an app use Spring, but there are some advantages. For one, since the bean instances and relationships managed by Spring can be controlled by an external configuration file, you can make plug-replaceable components and swap test components in and out. I've got a dummy emailer in one app right now. For testing it just dumps the generated emails to the log. In production, I'll wire in the production mailer and it can begin actually transmitting mail.
One of the best reasons for using Spring with an ORM - or even raw JDBC is that its persistence component takes care of a lot of grunt work. There are certain things that you have to do over and over again when dealing with persistent store, and I've seen a lot of sloppy code on that account - especially leaky JDBC connections. Spring obviously can't keep people from writing sloppy code, but its persistence wrappers can at least ensure that the sloppy code doesn't leak connections. Additionally, Spring provides abstract transaction management which meets or exceeds things that would either be even more grunt work or require EJBs, and it does so for environments where pre-V3 EJBs weren't supported.
Sometimes the only way things ever got fixed is because people became uncomfortable.
I'm all tasted up for a BLT! This tiny ad wants a monte cristo!
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth