It is said that when a reporter asked Albert Einstein for his campus phone number in case of follow-up questions, Professor Einstein reached for the university phone book to look it up. Seeing the reporter's astonishment that he, the world's foremost genius, didn't even know his own phone number, Einstein advised the reporter,
"Never memorize something that you can look up."
And so it is with persistence. We don't keep everything in memory. Instead, we "write it down" in the database so we can look it up at any later date. (Maybe we will keep our database in memory one day because it's so darn fast to do so!)
The problem is, in object-oriented languages we think in terms of objects and their attributes, but in SQL databases, we must think in terms of tables and rows and columns. The impedance mismatch between the O-O world and the SQL world is the problem domain of Object-Relational Mapping (ORM) tools and APIs like Hibernate, TopLink / EclipseLink and now the official JEE standard, the Java Persistence API (JPA).
In this talk, we'll cover:
I'll be using Hibernate as the JPA Provider since it's probably the most widely used, but know that any compliant JPA Provider will do.
We'll have plenty of demos, so when you leave you should have a good idea of how to configure and use JPA back at your shop. So come on out and see how easy it is to use JPA to help remember what needs remembering in the database!
Be sure to RSVP so we can plan enough food and drink.
(Plan on staying for the Gateway Groovy User Group to learn more about web testing! This month's topic: Using the JPA Plugin in Grails.)
Speaker: Jack Frosch