Sta*_*arx 5 php asp.net asp.net-mvc n-tier-architecture
我之前问了一个类似的问题并得到了令人信服的答案?
由于这个问题的结论,我开始在N层架构中开发项目.
大约一个小时前,我问了另一个问题,关于创建界面的最佳设计模式是什么?投票最多的答案是建议我使用MVC架构.
现在我很困惑,第一篇帖子告诉我两者都相似,只是区别在于N层,层在物理和逻辑上是分开的,一层可以访问它上面和下面的层,但不是所有层.
我认为ASP.net在开发应用程序或Web应用程序时使用了3层架构.像Zend,Symphony这样的框架使用MVC.
我只想坚持最适合WebProject开发的模式?可能这是一个非常愚蠢的混乱?但是,如果有人能够清除这种混乱,那将是非常伟大的?
They aren't mutually exclusive. The Model-View-Controller pattern is really a user interface design pattern, and it concerns logical rather than physical tiers.
I most often hear "n-tier architecture" used to describe the actual physical separation of an application's layers. For example, a system in which the user interface runs in one process, exchanges data with an application layer (perhaps via messaging or web services) that executes in another process (perhaps on another server), which in turn accesses a data layer that runs in yet another process (typically a database server).
This description can be particularly confusing because 'application logic' can mean multiple things: in an n-tier system it usually means business logic - as opposed to user interface logic (like which widgets are enabled when the user selects a particular checkbox).
For example, in an n-tier system, your presentation layer might call a web service method that accepts an item ID. The web service runs on a different server, where it performs complicated calculations and returns a price.
In a simpler architecture, your application might calculate the item's price in the same process as the user interface - though the pricing logic may be separated into its own logical layer (perhaps within library or executable).
我想不出任何关注它们的层是否在不同的物理过程中运行的当前MVC框架.