When I first started using OR/M, I looked forward to not writing boilerplate SQL code. As a lazy developer, I prefer to automate boilerplate code generation. After using OR/M for couple of years, I am beginning to miss stored procedures. OR/Ms like Entity Framework reduce the need for cookie cutter code, but they have some major flaws.
The first flaw is that OR/Ms are a leaky abstraction. The goal of any abstraction is to hide the internals of the thing you are trying to abstract. OR/Ms fail at this. Entity Framework, the OR/M I use the most, falls down on complex queries. For example, if you want to join in a related entity, you can use the Include() statement. The problem with Include() is that it generates horrendous queries that have terrible performance. You can’t do more than three or four includes in a single query. You end up having to either do a bunch of small queries or build a stored procedure. This defeats the purpose of OR/M.
The second flaw is that configuring complex relationships can be painful. I’ve used nHibernate (Fluent API) and Entity Framework (Code First,). Configuration in both OR/Ms is painful. I have spent hours trying to configure a particular database relationship. I’ve done small model changes generate migration scripts that left me scratching my head. One major advantage of Entity Framework is that the documentation is excellent. MSDN does a good job of highlighting common configurations, and there’s lots of information on the web.
The final flaw of OR/M is that you lose the ability to use a lot of features of the database. For example, until recently, you couldn’t create a unique key in Entity Framework. Entity Framework still doesn’t support database triggers. You can live without these features, but it does limit what you can do with OR/M.
This leads us to the obvious question:
Are OR/Ms a waste of time?
The answer, of course, is “umm… maybe”.
If you have a project with a simple data model or low performance requirements, OR/Ms will save you time. If your project is more complex, then you should consider skipping the OR/M. There’s nothing wrong with using stored procedures. Sometimes the old ways are the best ways.
More on OR/M Pain:
Bendyworks: Actually Using the Database
This is an eight part course that’s great for learning the basics of ASP.NET MVC. It’s high level, but I found it useful. The class is done by the Microsoft Virtual Academy, which has free videos on a large number of subjects.
This site has a ton of information about MVC and the exam.
When I was primarily working in Web Forms, my first stop for development information was MSDN. For MVC, I find myself getting most of my information from Stack Overflow.
This is an excellent book that covers almost all practical aspects of building ASP.NET MVC applications. In addition to the basics, it includes information on architecture, optimization, build automation, and deployment. I reference this book often at work. I highly recommend it.
This book has proven to be less useful than the O’Reilly book above. This book covers all of the exam objectives, but some of the chapters are filler and reading this book alone will not give you enough information to pass the exam or build ASP.NET MVC applications. The previous book is a much better source of information. I wouldn’t recommend it for anything other than prepping for the exam.
I recently passed Exam 70-480. Despite the lack of official study material and information regarding what was on the exam, I passed the exam. I am going to share what I did to study for the exam and list some tips so that you may have an easier time studying for this exam.
A list of skills measured can be found here:
I found that the exam closely tracks the list of skills measured. I’ve taken a number of non-Microsoft exams and 70-480 is very straightforward. Most of the questions consist of a block of code and you need to select the proper code block to answer the question. You will need to read the question carefully and know the material, but there are no tricks.
Here’s the list of Microsoft Exam Question Types:
Most of the questions I ran into were multiple choice, repeated answer, and case studies.
I started learning web development in 2001, have been a professional web developer for over six years, and I’ve been tracking the technologies in this exam for several years. These are the things I did to study for the exam: