Is CodeFirst intended for large scale applications

codefirstentity-framework

I've been reading up on Entity Framework, in particular, EF 4.1 and following this link ( http://weblogs.asp.net/scottgu/archive/2010/07/16/code-first-development-with-entity-framework-4.aspx) and it's guide on Code First.

I find it neat but I was wondering, is Code First supposed to be just a solution for rapid development where you can just jump right in without much planning or is it actually intended to be used for large scale applications?

Best Answer

I may have some detractors out there, but when I read some of those post from Hanselman and Gutherie, then read Julia Lerman's book on Entity Framework, I had a REALLY hard time with code first. In my many years of building applications, I've gone down many paths, both forced by process, and by choice, and have found that I have much more success when taking a data-centric view when building an application.

I'm talking about line of business applications here...this is when you have a business problem or process that needs to have a software solution behind it. You have data that needs managed in some way. It is better to know your data and how it relates to itself and how it is used within the business. Therefore, you model that data, and then create an application/solution around it. In my experience, if you start creating the application with the data as the afterthought, something eventually gets left out, and then you have some refactoring (in many cases - MAJOR refactoring).

Small applications may be an exception, but I will continue to use my data-centric approach.