Twin Cities Code Camp

Jon Stonecash

ORM – Not Just for Meditation Any More

by Jon Stonecash

Tue, Apr 01, 2008
Room:
Time: 0:00

The "shape" of data in a relational database is not the same as the "shape" of data in an object oriented application. That is as it should be; for both efficiency and effectiveness, the goals for storing data are different from those of manipulating it within the application. The question is how to bridge the inevitable gap between the two environments. For an increasing number of projects, an Object Relational Mapping (ORM) package is the answer. An ORM allows the developer (1) to declaratively define a conceptual model of how the application wants to see the data, (2) to point to an existing data store (e.g., a database), and (3) to define a mapping between the conceptual and physical data. From this declarative model, the ORM generates the code to move data back and forth between the application's view of the data and the data store's view of the data. We will write several versions of a simple (yet compelling) application using the new Entity Framework ORM package from Microsoft, using NHiberate from the open source world, and using LLBGenPro from the non-Microsoft commercial world. Comparing and contracting will take place. Look for a few "Top Ten" lists about ORM: features to look for, reasons to use ORM, functionality other than data mapping that ORM provides, and ORM practices to avoid.

Presentation Material


About the Author

Jon Stonecash is a Senior Consultant at Magenic. Jon Stonecash has worked in software development for much longer than he would like to admit. In that time Jon has had the opportunity to make most of the serious software development mistakes at least once. He has programmed in over a dozen languages including several different assembly languages, Fortran, COBOL, SNOBOL, classic Visual Basic, VB.NET, and C#. He has survived the structured programming revolution and the object-oriented revolutions (having inexplicably missed out on the sexual revolution). Jon's software development activities have included the development of operating systems, scientific and engineering applications, and enterprise systems. He has worked in every phase of software development from the initial specification of requirements through to customer support. Along the way, he picked up a BS in Mathematics and an MBA. He still has hopes of finding something that he can be reasonably good at. His long term interests center about databases and the aspects of the application that handle data access and business logic. He is also interested in the tools and processes that assist the development process. Jon can be reached at jons@magenic.com.

Links