Dependencies
It’s no secret: the beef is in Wicket and Hibernate. 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.
| [top] |
Yes. But first you would need to learn how Wicket works (and Hibernate too if you’ve been living in a cave).
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.
| [top] |
Not at all. Using Databinder to jump-start your program doesn’t prevent you from later writing your own integration to Hibernate or some other database framework.
| [top] |
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’ll 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/.
| [top] |
Increment the Databinder version number in your pom.xml. Then run mvn clean compile, and be sure to update your workspace dependencies if necessary.
| [top] |
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>
</repositories>
Significant new features of the snapshots are noted this Databinder weblog or the forum. (mvn -U compile forces an update, if you think you’re missing out on something.)
| [top] |
Not always. If you think that a Maven plugin (like Jetty’s) is out of date, run the relevant command with a -U appended to check for new versions.
| [top] |
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.
| [top] |
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.
| [top] |
Don’t be shy—hit up the forum.
| [top] |
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.
| [top] |
Before you decide to migrate a large application to Wicket, you should probably write a proof-of-concept demo. If you program for a living, your demo 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.
| [top] |
It’s unlikely that any application would use both Spring and Databinder. You would surely want to make use of Spring’s request filter to manage the database session, for one thing.
Beyond that, you’ll find Databinder’s “You want data? You got it!” attitude fairly incompatible with traditionally partitioned database code. If you want some outside the box thinking about the best practices for injecting Wicket into enterprise-class IoC Spring-managed applications, you’ll have to look elsewhere. Good luck!
| [top] |
That’s for you to decide. Databinder’s source is available and, as mentioned, brief. Read it. Check if any dependencies are pre-release. Test your application under load. Until someone else rolls out a high volume Web site with Databinder (or Wicket, for that matter) you’re a pioneer.
| [top] |
Wicket is lean, and of course that’s good, but a lot of new users are surely confused the first time they need to render a standard date like “April 1, 2006” and there’s nothing to go on but a half-finished wiki-page. With Databinder they can just use a DateLabel and get on with their programming.
| [top] |
The tagline describes what Databinder is, not everything it does.
Besides, the helpers are not random. They were all inspired by the database-driven example applications and would be handy in almost any project. They all have something to do with the practical need to retrieve, format, and display database information in a Web browser.
| [top] |
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.
| [top] |
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 technical weblog for my on-the-record suggestions, rants, and raves.
— Nathan Hamblen
| [top] |