As a software developer, you might not always develop apps for large enterprises with legal departments. Maybe you’ll make your own app some day, and maybe you’ll be able to let people use it in exchange for money or goods.
So what do you do after you finish developing and launching your totally-unique and innovative application? There are a lot of questions and about a billion pages of material regarding software copyrights, EULAs, contracts, licensing and everything else, but can you say with any real security what happens, and how protected you are, once you release your new baby into the wild?
For the 5th time, ZeroTurnaround is sending a team of crazed geeks to Devoxx and bringing all the energy, fun and beer you need from a Java conference. Come visit us at booth #13 to see what’s new in JRebel and LiveRebel and the ZT team. We’ve got free software licenses, t-shirts and a fast-fingers typing contest – the winner leaves with a lightsaber! (Caution: it looks real)
Note: This tutorial is gonna show you how to code Java without any of the traditional B.S., like XML and app server restarts. It’s split into 3 parts so that your brain doesn’t freak out at a 50 meter long webpage. Enjoy!
Did you realize that Hibernate has been around for more than 10 years? And Spring will begin its second decade next year? There was a time when Spring+Hibernate was widely considered an unofficial industry standard, but today is portrayed as an ancient beast whose XML appetite kills little rainbow scroll wheels. That assessment is not true, however. Both technologies have seen continuous development and are still competitive today.
Doesn’t it make more sense to compare apples to apples? For example, don’t put JEE6 with CDI up against Spring 1.0. Spring and Hibernate don’t require three miles of XML anymore. In fact, it’s possible to set them both up with zero lines of XML.
With servlet 3.0, even web.xml can go the way of the dodo. When all you’re trying to accomplish is a simple helloWorld guestbook, then Java, Spring and Hibernate will require more effort to get there, but can you name any app which is that trivial in real life? Proper applications are expected to satisfy far greater needs, both functional and non-functional, which is the area where Java, supported by wisely-chosen tools & frameworks, really shines.
Note: This tutorial continues from Part 1 and is gonna show you how to code Java without any of the traditional B.S., like XML and app server restarts. It’s split into 3 parts so that your brain doesn’t freak out at a 50 meter long webpage. Enjoy!
Adding Hibernate to the mix is rather easy. All I need to do is add a few beans to the
WebappConfig class. Which beans to add depends whether you wish to stick to the classic Hibernate API that uses SessionFactory or switch to a modern JPA, which uses
EntityManager instead. Note that JPA is a specification and we’re still using Hibernate as an implementation. The basic concepts and programming model are the same for classic Hibernate and JPA, but in my opinion JPA is easier to set up and more beautiful, not to mention it being an official JEE specification. By the way, even when using plain old Hibernate, the class annotations such as
@Entity still belong to JPA.
Note: This tutorial continues from Part 2 and is gonna show you how to code Java without any of the traditional B.S., like tons of XML and app server restarts. It’s split into 3 parts so that your brain doesn’t freak out at a 50 meter long webpage. Enjoy!
Part 1 | Part 2 | Part 3
Enough with the setup, let’s write some code!
Once upon a time, Sun started with the PetStore sample application and Spring continued it with the PetClinic. Now that the cute little goblins have been bought and cared for, let’s publish their pictures for the whole world to see – introducing Snoutbook!
One of the best things about the Devoxx Java Conference in Antwerp each year, is that even after our 5th time going there we still meet lots of new developers who aren’t quite sure what JRebel actually is. They might have heard different speakers mention it during their talks as being helpful for speeding up development, or saw the ZeroTurnaround team at the booth in the exhibition hall, or just ran into someone wearing a new JRebel t-shirt in the beer line.