星期三, 七月 22, 2009

Anti-Patterns To Avoid In Entity Framework N-Tier Applications

Anti-Patterns To Avoid In Entity Framework N-Tier Applications
"Loose coupling is more difficult than tight coupling, and often the performance is not as good. You start off with the best of intentions, but end up asking if the benefit is worth the cost. Why introduce an interface and dependency injection when you could just create an instance of the class and call the method directly? Why build an abstraction with custom objects mapped to the database instead of filling a DataTable and passing it around?
To make matters worse, you do not usually feel the pain of tight coupling until much later. In the short term, you gain some efficiency and get the job done, but in the long run evolving the application can become almost impossible."
In the long run Microsoft already created new object libraries that are not backward compatible and you already jumped on it and rewrote your application. Also when pattern isnt always necessary or could be bad for development and performance, ANTI-PATTERN is good.

没有评论:

发表评论