2 tier or MVC which one prefferedhttp://forums.asp.net/t/1753048.aspx/1?2+tier+or+MVC+which+one+prefferedTue, 27 Dec 2011 08:12:20 -050017530484749515http://forums.asp.net/p/1753048/4749515.aspx/1?2+tier+or+MVC+which+one+preffered2 tier or MVC which one preffered <p>Hi All</p> <p>&nbsp;&nbsp; I am going to start new project related to Accounts and I am confused which design pattern whould I use. 3 Tiers or MVC . I am new to MVC and l alwyas used 3 tiers design pettern in my application.</p> <p>&nbsp;&nbsp; Which one you will preffered to use and why?</p> <p></p> <p>Please Advise me</p> <p>Thanks in Advance</p> 2011-12-26T03:52:47-05:004749521http://forums.asp.net/p/1753048/4749521.aspx/1?Re+2+tier+or+MVC+which+one+prefferedRe: 2 tier or MVC which one preffered <p>Use 3 tier beacuse it is more secure than other and easy to handle..</p> 2011-12-26T03:57:19-05:004749811http://forums.asp.net/p/1753048/4749811.aspx/1?Re+2+tier+or+MVC+which+one+prefferedRe: 2 tier or MVC which one preffered <p>Hi</p> <p><strong><span style="text-decoration:underline">MVC</span></strong></p> <p></p> <p>u can stat your project into MVC</p> <p>The following are some of the benefits of using ASP.NET MVC.</p> <ul> <li> <p>You get REST URLS like /category/1/7243</p> </li><li> <p>You don't have to use the &quot;.aspx&quot; extensions (you never really did, but now it is easier to avoid).</p> </li><li> <p>Very clean, controlled HTML output. Less of what will show up is hidden from you, so you have a lot more control over the generated HTML.</p> </li><li> <p>Client side code becomes much easier to use since you have more control over the HTML. One problem with using JavaScript with WebForms is that naming containers cause the controls on the page to have strange names.</p> </li><li> <p>Testing becomes much easier. Webforms where very difficult to test. Because of the controllers instead of the pages themselves handling things, testing becomes much easier.</p> </li><li> <p>It becomes far easier to optimize URLS for search engines. With WebForms one needed to use URL rewriters which merely hid what the&nbsp;<em>real</em>&nbsp;URL was.</p> </li><li> <p>With WebForms there was a sense of&nbsp;<em>state</em>. Pages maintained their state between posts. This made things a little bit easier, but this obfuscation hides how interactions between the client and the server actually occur. MVC gives you much more control over the client-server interaction.</p> </li></ul> 2011-12-26T08:11:16-05:004749819http://forums.asp.net/p/1753048/4749819.aspx/1?Re+2+tier+or+MVC+which+one+prefferedRe: 2 tier or MVC which one preffered <p>Hi,</p> <p></p> <blockquote><span class="icon-blockquote"></span> <h4>Minhajul040182</h4> 3 Tiers or MVC </blockquote> <p></p> <p>MVC only lives in the presentation layer. You usually want to make a combination of a multilayered application and use MVC in the presentation layer (or tier).</p> <p></p> <blockquote><span class="icon-blockquote"></span> <h4>Minhajul040182</h4> l alwyas used 3 tiers design pettern in my application</blockquote> <p></p> <p>I think you mean 3 layered architecture.</p> <p>Layer = logical separation</p> <p>Tier = physical separation</p> <p>amount layers &gt;= amount tiers</p> <p>&nbsp;</p> <p>I would suggest you go for a 3 layered pattern with MVC in the presentation layer. (Likely it's going to be a 2 tiered application [tiere 1 = all the code on the application server, tier 2 = the database server])</p> <p>Grz, Kris.</p> 2011-12-26T08:21:10-05:004749823http://forums.asp.net/p/1753048/4749823.aspx/1?Re+2+tier+or+MVC+which+one+prefferedRe: 2 tier or MVC which one preffered <p>Hi,</p> <p></p> <blockquote><span class="icon-blockquote"></span> <h4>simplefahad2005</h4> Use 3 tier beacuse it is more secure </blockquote> <p></p> <p>One can still create complete penetratable applications even when using a multi layered and multi tiered application. Security is an important point to take care off and is usually done too late in the creative process.</p> <p>Grz, Kris.</p> 2011-12-26T08:22:55-05:004749831http://forums.asp.net/p/1753048/4749831.aspx/1?Re+2+tier+or+MVC+which+one+prefferedRe: 2 tier or MVC which one preffered <p>Hello,</p> <p></p> <p>Go for MVC its good and easy to manage and a latest growing technology</p> 2011-12-26T08:33:03-05:004749949http://forums.asp.net/p/1753048/4749949.aspx/1?Re+2+tier+or+MVC+which+one+prefferedRe: 2 tier or MVC which one preffered <p>HiAll</p> <p>&nbsp;&nbsp;&nbsp; Thanks for you post... but my problem is that... I already started a project and completed modules of Administrator. My project structure is 3 tiers ... as follows</p> <p>&nbsp;&nbsp;&nbsp;&nbsp; --- BAL&nbsp; (Business Access Layer ) Separate Project and took reference of its .dll file</p> <p>&nbsp;&nbsp;&nbsp; ---- DAL (Data Access Layer) Separate Project and BAL took reference of this project's .dll files&nbsp; (This project also depends SQL Engine Project which generates SQL Quesries every time and same out time to create on every move.</p> <p>&nbsp;&nbsp;&nbsp; ------ Models also is a seperated prohject.</p> <p>&nbsp;</p> <p>&nbsp;&nbsp;&nbsp;&nbsp; Now my project is taking reference from these .dll files to complete its transactions. Could you please help me how to embed it in MVS 2 design pattern that I can not rewrite the code for changing.</p> <p></p> <p></p> <p>Best Regards and waiting for respose.</p> <p>&nbsp;</p> 2011-12-26T09:58:14-05:004749957http://forums.asp.net/p/1753048/4749957.aspx/1?Re+2+tier+or+MVC+which+one+prefferedRe: 2 tier or MVC which one preffered <p>Hi,</p> <p>simply create a new MVC project. Reference the BAL and Models, not the DAL, projects and go with the flow.</p> <p>In the Controllers you make calls to your BAL layer. Optionally you can transform your Models, which you pass around through all the layers, into ViewModels which are only there to be used for the Views in your MVC application. A great tool to help you with that is <a href="http://nuget.org/packages/AutoMapper" target="_blank">Automapper</a>.</p> <p>Grz, Kris.</p> 2011-12-26T10:02:29-05:004751226http://forums.asp.net/p/1753048/4751226.aspx/1?Re+2+tier+or+MVC+which+one+prefferedRe: 2 tier or MVC which one preffered <p>Hi XIII</p> <p>&nbsp;&nbsp; Thanks your valuable advise</p> <p>&nbsp;&nbsp;&nbsp; But I am surprised that I created some webspages on my 3 layers sytem ...</p> <p>&nbsp;&nbsp;&nbsp; I want to know that Can I keeep all the pages created before to use new MVC project in same project.</p> <p></p> <p>Thanks &amp; Regards</p> 2011-12-27T08:03:02-05:004751242http://forums.asp.net/p/1753048/4751242.aspx/1?Re+2+tier+or+MVC+which+one+prefferedRe: 2 tier or MVC which one preffered <p>Hi,</p> <p></p> <blockquote><span class="icon-blockquote"></span> <h4>Minhajul040182</h4> I want to know that Can I keeep all the pages created before to use new MVC project in same project.</blockquote> <p></p> <p>You can perfectly mix MVC with webforms in the same project yes: <a href="http://www.packtpub.com/article/mixing-asp.net-webforms-and-asp.net-mvc"> http://www.packtpub.com/article/mixing-asp.net-webforms-and-asp.net-mvc.</a></p> <p>But if you want to start from scratch I suggest you start a new MVC project and migrate your existing webforms. Certainly if they already make use of the 3 layered architecture then it should be a snap as most of the code can be recycled in the backend.</p> <p>Grz, Kris.</p> <p>&nbsp;</p> 2011-12-27T08:12:20-05:00