It’s no secret: the beef is in Wicket and whatever underlying persistence library you select. Databinder is a little bit of code to make them work together nicely, and some documentation and tutorials to get you started, all wrapped up in a Maven project.
Yes. But first you would need to learn Wicket pretty well. If you’re not yet sure that Wicket is the one true Web framework, you may want to see some results before you spend a week figuring it out. That’s where Databinder comes in. Plus, Databinder is free.
Not at all. Using Databinder to jump-start your program doesn’t prevent you from later writing your own database integration.
No. You’re free to link to the Databinder JAR in any way you see fit. However, the server bandwidth required to distribute “quickstart” projects containing all dependencies is unavailable to Databinder; using Maven is the only option for this convenience. You’d likely make up the time spent installing Maven 2 just in running the examples.
And after working through those examples, you may find that you like Maven enough to use it in your own projects. If not, you can always raid the JARs in ~/.m2/repository/.
mvn dependency:tree prints out resolved dependencies in a handy tree. The artifact name and version format used there understood by Buildr, by the way.
Increment the Databinder version number in your pom.xml. Then run mvn clean compile, and be sure to update your workspace dependencies if necessary.
Yes, most likely. Just add the Wicket version and module you want as a dependency in your pom.xml. For example:
<dependency> <groupId>org.apache.wicket</groupId> <artifactId>wicket-auth-roles</artifactId> <version>1.3.1</version> </dependency>
Snapshot releases of Databinder are available through a special Maven repository. If you would like to use a prerelease version of Databinder in your own project, specify the version as x.x-SNAPSHOT and be sure the following appears in your pom.xml:
<repositories>
<repository>
<id>databinder-snapshots</id>
<name>Databinder snapshot repository</name>
<url>http://databinder.net/snapshot</url>
</repository>
<repository>
<id>wicket-snapshots</id>
<name>Wicket snapshot repository</name>
<url>http://wicketstuff.org/maven/repository/</url>
</repository>
</repositories>
(Databinder snapshots often depend on Wicket snapshots.) Significant new features of the snapshots are generally mentioned in the forum. (mvn -U compile forces an update, if you think you’re missing out on something.)
Too bad, we’re using Git now!
git clone git://databinder.net/git/databinder
You’re adding the entity in your application’s configureHibernate method, we assume? Make sure you’re using javax.persistence.Entity in your entity, as the one in Hibernate’s package fails silently.
If you’re in a hurry, start with the Annotations FAQ, which covers tricky spots like that of the previous question. For concise documentation, see the Annotations Guide for things specific to Annotations and the Hibernate Guide for everything else.
Don’t be shy—hit up the forum.
This library is optimized for getting new projects off the ground quickly. Adapting an existing one won’t be as easy as following the tutorials here, but you should still find Databinder helpful.
Before you decide to migrate a large application to Wicket, you should probably write a proof-of-concept app, which will probably need to connect to a database.
Use Databinder to code something that talks to one of your test databases, then fire it up for your boss and be a rock star for five minutes. Later, for the hard work of actually migrating your application, feel free to borrow ideas from Databinder’s source if the library as-packaged isn’t a perfect fit.
The Databinder module databinder-models is compatible with external Hibernate session management, so integration with Spring’s request filter is possible. Your application need only implement the HibernateApplication interface so that Databinder’s models can acquire a session. Free to use databinder-components and databinder-auth-components while you’re at it.
That’s for you to decide. Databinder is central to a number of production web sites, including this one, and so far no one has died. More than anything else it’s you, your code, and your testing that will make or break your site. We wish you a very peaceful deployment, and a happy new application.
No—keep your children. Databinder is licensed under the LGPL, same as Hibernate. That means that we don’t have to worry about conflicting with their license, and you don’t have to worry about conflicting with ours any more than you already worry about conflicting with Hibernate’s. (This feat of logic was brought to you by non-lawyers.)
Databinder is not made, supported, or endorsed by the Wicket project, which is solely concerned with “enabling component-oriented, programmatic manipulation of markup.”
Databinder is solely concerned with hooking Wicket up to a database so you can use a next-generation framework without going on sabbatical.
A New York programer who uses Wicket at his day job, loves it, and hopes that a dose of database practicality is all it needs to take over the world. Write me an e-mail for your off-the-record suggestions, rants, or raves. Read my programming weblog for my on-the-record suggestions, rants, and raves.