Tech Forums

Advantages / Disadvantages of Entity Framework



I don't think the problem with Code First will be coders like you. Unfortunately, I see all too often coders who fail to grasp that what the DBA does is both important and necessary. Kind of a "If I don't understand it, it must be easy" sort of mentality. (I run into this in managers all the time.) If more coders were like you and understood and valued the role of the DBA - and vise versa - I wouldn't expect there to be any problems with either a 'Code First' or 'Database First' approach. 


Why need to MVC in ASP.net?



Robin Stemp Here's a few reasons out of many:
-To improve Unit Testing (tho again debatable)
-More control of the client output (though .net 4 webforms improves on previous versions)
- No Viewstate to begin with, leaner html
- No Extra HTML emitted by default, closer to how web pages actually work
- MVC - Structure and separation of code parts in a fairly standardized design pattern
- SEO Friendly URLS out of the box
- More pluggable

ASP.NET Webforms design is similar to Winforms apps, With winforms, all the state related to control values and events fired are handled within the application. Webpages are stateless meaning nothing is remembered between calls. So webforms store control values in the VIEWSTATE variable within html , this gets passed back to the server every postback (say an onclick event)... While this has worked for many years it has its issues. Also up to .Net 4.0 it was a real nuisance when using things like "ID" within attributes as .net would change the id clientside to the controls heirachy. This would mean having to use messy code such as CLIENTID within the view pages.

With MVC, you have more control over html, css, and javascript that gets output, work more in the design of the web and its stateless nature, and also more in line with how other platforms work, such as php, python, ruby, etc.
 

No comments:

Post a Comment