Web forms or MVChttp://forums.asp.net/t/1740786.aspx/1?Web+forms+or+MVCFri, 18 Nov 2011 16:25:50 -050017407864688720http://forums.asp.net/p/1740786/4688720.aspx/1?Web+forms+or+MVCWeb forms or MVC <p>I have been away from ASP.NET for several years with my last project being on 2.0 beta.&nbsp; I just completed a very quick project (had about a week) for a temporary members portal using two projects--web forms and EF with POCO templates.&nbsp; For the web forms project, I tried to keep as much code as possible in classes in the App_Code folder, and every call to the EF project was in a single class.&nbsp; However, I did have calls to the code classes and some property values set&nbsp;in my code-behind.&nbsp;</p> <p>My company is now looking to create another portal that has some similarities to the temporary one.&nbsp; I have been looking into MVC 3 and going through some of the tutorials.&nbsp; MVC seems difficult to learn, but I am pretty confident that I can figure out how to handle this project in it given enough time.&nbsp; My questions are: What are the advantages and disadvantages or using MVC 3 or continuing with web forms? and If I chose web forms, what is a good architecture to use?&nbsp; (Prism&nbsp;and MVVM Light seem only for Silverlight, but I would assume MVP and some type of MVVM is possible.)</p> <p>I know some of the answers will depend on things such as the size of the project and abilities of the group.&nbsp; Currently, I am the only IT person who is handling new application development, so, I am the only one affected by my decision on which approach to use.&nbsp; As far as timeframe, this is a project that is not due for a while.&nbsp; I know it would be faster for me to use web forms, but it seems MVC is the current focus for Microsoft.&nbsp; It could be interesting to learn a new technique, but that is not a valid reason for the time involved, especially if this is only a temporary direction for Microsoft (e.g., all the&nbsp;rumors about&nbsp;various techonologies&nbsp;being dead).&nbsp;</p> <p>I know there is no 'correct' answer, but any advice on how to decide which direction to choose would be greatly appreciated.&nbsp; Thanks!!</p> 2011-11-17T20:23:47-05:004688757http://forums.asp.net/p/1740786/4688757.aspx/1?Re+Web+forms+or+MVCRe: Web forms or MVC <p></p> <blockquote><span class="icon-blockquote"></span> <h4>Christy Piffat</h4> <p></p> <p>I know there is no 'correct' answer, but any advice on how to decide which direction to choose would be greatly appreciated.&nbsp; Thanks!!</p> <p></p> </blockquote> <p></p> <p>I wrote up some comparisons on this, have a look:</p> <p><strong>ASP.NET Web Forms vs. ASP.NET MVC:</strong><br> <a href="http://allen-conway-dotnet.blogspot.com/2011/03/aspnet-web-forms-vs-aspnet-mvc.html">http://allen-conway-dotnet.blogspot.com/2011/03/aspnet-web-forms-vs-aspnet-mvc.html</a></p> 2011-11-17T20:54:51-05:004688806http://forums.asp.net/p/1740786/4688806.aspx/1?Re+Web+forms+or+MVCRe: Web forms or MVC <p>Thanks so much for your prompt answer!&nbsp; I was leaning towards MVC and still am.&nbsp; However, I do have a question about the 'scripting' in the View.&nbsp; On one hand, the dynamic nature of it (foreach loops) is perfect for the pages I need to write.&nbsp; I had to do that in the code-behind with various Label, Hyperlink, and Button objects on the first portal.&nbsp; However, I am concerned about it turning into the classic ASP nightmare I had to maintain a long time ago.&nbsp; Also, I am not the most artistic person and am worried about the lack of WYSIWYG of Razor.&nbsp; I am hoping the css files from the standard MVC 3 application in VS2010 and from the MvcMusicStore application can help me with showing decent looking controls.&nbsp; (I have really enjoyed Blend with WPF, but I guess there is no equivalent for MVC.)&nbsp;</p> 2011-11-17T22:01:17-05:004688913http://forums.asp.net/p/1740786/4688913.aspx/1?Re+Web+forms+or+MVCRe: Web forms or MVC <p></p> <blockquote><span class="icon-blockquote"></span> <h4>Christy Piffat</h4> However, I am concerned about it turning into the classic ASP nightmare I had to maintain a long time ago.&nbsp;</blockquote> <p></p> <p>Funny you are not the 1st one to voice this concern. If you look at the comments on that blog post I provided, someone else stated almost the identical sentiment. I think that the bigger picture is with ASP.NET MVC you have a much more sophisticated and mature architecture (in MVC) and is atop the robust .NET Framework. This as opposed to the early web and classic ASP which was driven totally by scripting which is a far cry from what you will be building with ASP.NET MVC.</p> <p>As for the WYSIWYG questions and Razor, have a look to the following if you had not seen it already:</p> <p><strong>MVC Razor HTML Design Support... when?</strong><br> <a href="../../../../t/1684549.aspx/1?MVC&#43;Razor&#43;HTML&#43;Design&#43;Support&#43;when">http://forums.asp.net/t/1684549.aspx/1?MVC&#43;Razor&#43;HTML&#43;Design&#43;Support&#43;when</a>&#43;</p> 2011-11-18T01:07:27-05:004690175http://forums.asp.net/p/1740786/4690175.aspx/1?Re+Web+forms+or+MVCRe: Web forms or MVC <p>Thanks!&nbsp; In that same vein, I came across an article in DevConnections by Dino Esposito (<a href="http://www.devproconnections.com/article/ASPNETMVC3/working-aspnet-mvc-3-razor-helpers-templates-136175">http://www.devproconnections.com/article/ASPNETMVC3/working-aspnet-mvc-3-razor-helpers-templates-136175)</a> which gives me a little more confidence that I can create something that looks decent at least.&nbsp; It seems the Razor helpers allow for some creativity with the html.</p> 2011-11-18T16:25:50-05:00