3层架构还是MVC?哪个更适合企业Web应用程序。 [英] 3-Tier Architecture or MVC ? Which is more appropriate for an enterprise web application.

查看:120
本文介绍了3层架构还是MVC?哪个更适合企业Web应用程序。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我打算在SQL Server中使用数据库创建一个dot net web应用程序。



我听说过3-Tier架构和MVC。哪个更适合创建企业Web应用程序。



请求您宝贵的建议。



提前致谢

Hi,

I am planning on making a dot net web application with database in SQL Server.

I have heard about 3-Tier Architecture and MVC. Which is more appropriate to create an enterprise web application.

Requesting your valuable suggestions.

Thanks in advance

推荐答案

好Rahul它完全取决于你的要求。



如果你的项目成本低,那么我建议你使用Asp.Net Web Froms 。一般情况下,当我们不需要长期维护或更大的未来变更时,我们应该更喜欢RAD开发。



如果成本不是问题而你的更加注重性能和长期可维护性。未来的变化那么你应该使用MVC。



以下是对这个主题的一些很好的讨论。只看这个你的想法可能很清楚。



http:/ /stackoverflow.com/questions/102558/biggest-advantage-to-using-asp-net-mvc-vs-web-forms [ ^ ]



http: //stackoverflow.com/questions/5930730/how-to-decide-on-webforms-vs-asp-net-mvc-3-for-new-project [ ^ ]



http://programmers.stackexchange.com/questions/95212/when-to-favor-asp-net-webforms-over-mvc [ ^ ]



希望这个帮助你。

--------------- -----

Pratik Bhuva
Well Rahul its totally depend on Your requirements.

If You Project Cost is low then i will suggest you to use Asp.Net Web Froms.Generally we should prefer it in RAD development when we don't need very long term maintanence or greater future changes.

And if the cost is not an issue and your more focus is on performance and long term maintainability & future changes then you should use MVC.

Here are some good discussion over this topics.Just look at this Your idea might be clear.

http://stackoverflow.com/questions/102558/biggest-advantage-to-using-asp-net-mvc-vs-web-forms[^]

http://stackoverflow.com/questions/5930730/how-to-decide-on-webforms-vs-asp-net-mvc-3-for-new-project[^]

http://programmers.stackexchange.com/questions/95212/when-to-favor-asp-net-webforms-over-mvc[^]

Hope This Help You.
--------------------
Pratik Bhuva


3层和mvc是两个完全不同的东西。你可能会被这样一个事实所迷惑,即他们既关注问题,又关注完全不同的问题。 mvc适用于3层架构在企业级别的应用程序级别。您的mvc Web应用程序只是在3层的应用程序级别。 3层仍然有两个其他层,即服务和数据库层。服务层是为了确保企业级一致性并与数据库层(也许还有其他服务甚至更多)进行通信。其他应用程序将该服务层用于企业功能。它更容易,因为企业级别的更改可以在一个点上完成(如果设计得很好)。您的mvc模型只是服务层的使用者。视图和控制器不会(不应该)知道它。它由模型分离和处理。



希望这更清楚你的mvc只是一个表示层(或层)。它可以轻松替换或添加到桌面版本。顺便说一下,层和层之间也存在差异,其中层是物理隔离(不同的服务器),层只是软件分离。正如在企业层面一样,他们尽可能地过度复杂化,为所有新手提供障碍。



祝你好运!
3-tier and mvc are two totally different things. You might get fooled by the fact that they both separate concerns but on a completely different level. The mvc works on application level where a 3-tier architecture is on enterprise level. Your mvc web application is simply at application level of the 3-tier. The 3-tier would still have two other tiers, namely the service and database tier. The service tier is to ensure enterprise level consistency and communicates to the database tier (maybe also other services and even more). Other applications use that service tier for enterprise functionality. It makes it easier because enterprise level changes can be done at a single point (if well designed). Your mvc model is just a consumer of the service tier. The view and controller don't (shouldn't) even know about it. It is separated and handled by the model.

Hopefully this makes it somewhat more clear that your mvc is just a presentation tier (or layer). It could be easily replaced or added to a desktop version. By the way, there is also a difference between tier and layer in which a tier is a physical separation (different server) and a layer is just software separation. As is always at enterprise level, they overcomplicated it as much as possible to put up a barrier for all who is new to it all.

Good luck!


这篇关于3层架构还是MVC?哪个更适合企业Web应用程序。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆