66020 members! Sign up to stay informed.

Sponsored Links


Resources

.NET Research Library
Get .NET related white papers, case studies and webcasts

News News News Messages: 1 Messages: 1 Messages: 1 Printer friendly Printer friendly Printer friendly Post reply Post reply Post reply XML XML XML

Case study: Redesigning the BMW USA website with Genome

Posted by: Jack Vaughan on September 14, 2007 DIGG
By Christian Hassa

Object-relational mapping (O/RM) has a knack for splitting opinions, causing developers to polarize into those vehemently opposed to it and those who are fully convinced of its benefits. Database administrators in particular have been notoriously difficult to convince when it comes to O/RM, if they can be convinced at all. After all, they are hardly going to want to put themselves out of a job. Besides, how could a tool ever issue as clean code as a skilled DBA with a fine, manually tuned data access layer?

How then did Roger Harvey, software architect with DBA roots at Data Return LLC, come to be the greatest proponent of O/RM in his team, which is currently re-implementing the BMW USA web site? He readily admits that he “didn’t think too much of O/RMs… how could any product basically take the place of a DBA?” Can a former DBA really deny his roots and fully embrace O/RM?

The answer lies in the data access layer and its intricacies. Working on three major projects involving maintenance and redesign of the BMW USA and its financial services web sites, Harvey and his team decided that they would not only relaunch the site, but implement their own content management system (CMS) from scratch. Having already redesigned this particular site for BMW back in 2003, everyone on the team was aware of the amount of time that coding the data access layer would take. For the previous site redesign, they had written the CMS from scratch as well, with pure SQL, but without the benefit of an O/RM. Apart from the fact that a large proportion of development time was spent coding the data access layer, the team had also experienced how difficult and time-consuming it can be to maintain it later on.

The BMW USA web site system that Data Return is working on has projected peak loads of 1 million sessions per day and 15 million unique users per year. The aim of the project was to run the site on more efficient code and a newer framework, thereby reducing maintenance and adaption costs.

Cutting dev time

It was thus clear from early on for the Data Return team working on the project that an O/RM could cut development time. This was the first time that Data Return was employing O/RM. No further convincing would have really been required, as the time saved by using an O/RM would have been argument enough.

For Harvey with his DBA background however, and as the architect spearheading the effort, there was a whole different aspect to consider. An O/RM tool would save lots of time when coding the data access layer, but the quality of the SQL code delivered could surely never match that written by a good DBA. In fact, the provocative tag line of the O/RM framework Genome was what had first piqued his curiosity about O/RM: “Tired of SQL?”

Far from it, he says; he loves SQL. But the mere thought that a tool purported to eliminate the need to write SQL entirely was intriguing. He decided to investigate further and see just what sort of SQL this tool could muster up, still convinced that it could not possibly reach the quality of highly tuned, manually written SQL by DBAs. “Stored procedures from a DBA were always going to be better, no matter what,” Harvey describes his conviction before delving deeper into O/RM with Genome.

Genome videos demonstrated, among other things, the actual SQL being generated behind the scenes. Much to Harvey’s surprise, it revealed crisp, clean SQL which was on a par with what he would have written by hand. This, he felt, immediately gave him confidence in the possibilities of O/RM.

Having stumbled across Genome almost accidentally in the course of reading up on O/RMs, Harvey now had to face the daunting task of evaluating the many O/RMs out there. He started by drawing up a spreadsheet that listed about 70 different O/RM tools. He then spent 2 man-weeks evaluating these tools, a not inconsiderable effort. Several public lists of O/RMs have been compiled (see, for example, those published by theserverside.net, the How-to-Select-Guide and SharpToolbox) and a quick glance at them is enough to demonstrate that there are a lot of fish in this particular sea.

A Data Return veteran and program manager of development for the BMW project, Christian Vanderbeck, who oversees all three projects they are currently working on for BMW USA, emphasized that the evaluation and decision process did not focus solely on the products’ technical features. Apart from factors such as the product’s track record, release history, customer references and plans for the future, especially as concerns alignment with upcoming technologies such as Microsoft’s LINQ, it was the type and quality of support offered that tipped the scales.

Having settled on Genome as their O/RM solution for their project, the Data Return team started getting to know this new tool. Contrary to some widely held opinions about O/RM, the team had very little difficulty adapting to OQL and O/RM on the whole. “We never even had a Genome training session,” Harvey points out; the team members just started with small projects, expanded to larger ones and then quickly became productive. Nobody had any problems with that, according to Harvey. “The biggest thing is not so much being able to do OQL and get queries and get results,” he clarifies. It was understanding the Genome infrastructure and configuring various caches that “took time, because they are usually hidden deep down in the database layers and most developers never see or think about them.” While it has all become second nature to the Data Return developers now, it represented something of a challenge at first.

Looking back at his experience with O/RM so far, Harvey feels that “the only sort of negative thing that I can say in any way about Genome is about the documentation and its lack of bookmarking.” When it comes to getting a grip on something as complex as O/RM, there is no doubt that thorough (and ongoing) documentation is a necessity. “I did notice in fact that in Genome 3.2, there are some additional areas of documentation that were much improved.”

If the demo videos started to convince Harvey that a tool could after all match a DBA when it comes to the SQL for the data access layer, then it was the concrete example in practice that settled it. Working on a dealership locator for the BMW USA site, where users can search for the closest BMW dealership by ZIP code, Harvey recalled that, previously, he had “done that through fairly complex stored procedures, about 600 or 700 lines, plus some functions. It was acceptable as far as performance goes. Then I had redone it with Genome. The traditional way with stored procedures had taken me maybe two weeks. With Genome, it took me two days. “ Performance was faster as well.

Bottom-up and top-down approaches

Overall, it may also be a matter of approach, according to Harvey. If you can afford to start your database on the green field, by all means reverse your thinking and build your model from the domain model down to the database, he indicated. Genome supports both the bottom-up approach and working down from objects, but Harvey found that, with data-oriented applications, the latter is far better in terms of reducing development time and improving subsequent maintainability. He explains that by starting without the database, building the objects you need and then deciding on the persistence layer and which objects need to persist, development can be much easier and quicker: “With pages that are data-bound and with things like search applications, Genome cuts development time down to maybe a quarter.”

Having learned much about O/RM over the last seven months, Harvey and Vanderbeck have words of advice for any developers embarking on similar tasks: thorough evaluation of the products in your shortlist is essential, especially when it comes down to investigating what sort of support is available. Their advice is to get in touch with the team behind the product. This will give you a feeling of what sort of people you will be depending on when you need answers and help. Serious vendors will not only impress you with their knowledge on the subject matter, but will also make it clear they will be available for you when you need them.

When asked in retrospect if they would have done anything differently, neither Harvey nor Vanderbeck even for a moment consider not using O/RM. Instead, they have advice for after you have chosen your tool: put substantial time into planning before you set off and start developing. O/RM represents a central component at the very heart of your project, so get to know its peculiarities. Planned well, you will be able to reap maximum benefits from the tool’s strong points, such as being able to isolate your queries by encapsulating them. Consult with the vendor from the start, because they will best be able to help you fit the product into your particular architecture.

Harvey at least appears to be a convert to O/RM. Maybe it simply isn’t really a question of turning back on DBA roots and dispelling myths about O/RM. Let the code speak for itself.

**

Data Return is a midmarket managed service provider that mainly focuses on providing web hosting metaservices for medium to large-sized companies such as BMW. Roger Harvey and Christian Vanderbeck work for the professional services organization within Data Return.

More information is available at www.genom-e.com to read more about the object-relational mapping framework Genome, download a free trial version, read the documentation and watch demo videos.


Author Biography: As one of the managing partners, Christian Hassa is responsible for all software development at TechTalk GmbH, a .NET services company with offices in Vienna, Budapest and Zurich. Aside from a lasting interest in O/RM on the Microsoft .NET platform (TechTalk is the vendor of the O/RM tool Genome), he likes to explore the strategic and organisational aspects of agile software development in distributed teams.
  Message #239801 Post reply Post reply Post reply Go to top Go to top Go to top

Broken link

Posted by: Fabrice Marguerie on September 17, 2007 in response to Message #239722
The link to SharpToolbox.com is broken. It should be http://sharptoolbox.com/categories/object-relational-mappers

 
New content on TheServerSide.NETNew content on TheServerSide.NETNew content on TheServerSide.NET

DSLs and language interop

Language "mashups" will become more prominent, and developers will become polyglots, one programmer suggests.

VS 2008 Resources

SearchWinDevelopment.com offers an introduction to the language, performance, testing and data management improvements in VS 2008.

VB code downloads home

VBCode.com code snippets cover all aspects of application development, from data binding to security to the user interface.

XAML Learning Guide

Get up to date on XAML best practices with a variety of articles, tutorials and webcasts. [SearchWinDevelopment.com]

Company uses VSTS DB edition to tame workflow

One team's experience with the VSTS DB edition suggests that it can improve workflow for dev teams. It also enhanced Agile efforts. (June 24, Article)

Book: Intro to DSL Tools

Microsoft has begun to include DSL tools in the VSTS kit. A new book by Steve Cook and other VSTS team members helps set the stage. (June 24, Article)

I See the Silverlight Shining!

Cartoon: Be it ever so humble there is no place like your home after you get a Microsoft Home Server . (June 18, Cartoon)

A look at .NET 3.5

Microsoft's Thom Robbins says new technology to highlight in NET 3.5 includes AJAX, LINQ for both C# and VB, as well as tooling enhancements intended to ease the task of building WPF, WF and WCF apps. (June 29, Podcast)

Venkat Subramaniam on AJAX

Venkat Subramaniam discusses AJAX bottlenecks, the tenets of Agile development and more. He spoke at the Ajax Experience. (June 25, Tech Talk)

Building a Claims-Based Security Model in WCF - Part 2

In the second of a two-part series, Michele Leroux Bustamente discusses design decisions related to the claims-based security model. Read the story and walk through the process for creating a set of claims-based utilities to encapsulate claims authorization at the service tier. (May 24, Article)

Introducing the Entity Framework

Understanding why the Entity Framework exists and learning where it can fit into your projects can get you prepared for the eventual release early next year. (May 10, Article)

WCF Security Learning Guide

Resource: This learning guide gives you quick access to useful links on Windows Communication Foundation security information. (April 24, Article)

Brad Abrams: Patterns for successful ASP.NET AJAX development

TSS.NET's Jack Vaughan spoke recently spoke with Microsoft's Brad Abrams to find out what he is seeing in the field and what the chefs in Redmond are cooking. Along the way he discusses patterns of AJAX frameworks. (April 11, Article)

Building a Claims-Based Security Model in WCF

In a two-part series, Michele Leroux Bustamente explains how claims-based security is supported by WCF, and how you can implement a claims-based security model for your services. (March 29, Article)

Authoring workflow using XAML

Windows Workflow Foundation is a new technology that many developers will need to get their heads around. In a brief excerpt adapted from Programming Windows Workflow Foundation: Practical WF Techniques and Examples using XAML and C#, K.Scott Allen considers aspects of workflow definition. (March 22, Chapter Excerpt)

News | Blogs | Discussions | Tech talks | Patterns | Reviews | White Papers | Downloads | Articles | Media kit | About
All Content Copyright ©2007 TheServerSide Privacy Policy
Site Map