开发者

Difference Between Architecture and Framework-MVC and N-Tier

开发者 https://www.devze.com 2023-03-01 05:10 出处:网络
What is the difference betwee开发者_如何学Cn Architecture, Design Patterns and Framework. How do we relate the N-Tier and MVC framework?

What is the difference betwee开发者_如何学Cn Architecture, Design Patterns and Framework. How do we relate the N-Tier and MVC framework?

Could anyone point me with some good demos?

Thank you


What is the difference between Architecture, Design Patterns and Framework. How do we relate the N-Tier and MVC framework?

That's two rather different questions.

  • Architecture is how you design your applications
  • Design patterns is solutions to specific programming problems
  • A Framework solves a larger problem (see below)

A framework usually solves a larger problem like how to work with a database (nhibernate) or how to create a web site (ASP.NET MVC), while design patterns solves smaller problems like how do I notify all classes that depend on me when something have happened (observer pattern)

N-tier vs MVC framework

MVC framework is just the presentation layer. You could still use a service layer and a data layer (or whatever you have been using before).

However, I do recommend that you start using an ORM and an inversion of control container since your obviously are switching technologies.

Article links:

  • http://slynetblog.blogspot.com/2011/04/lightweight-nhibernate-and-aspnet-mvc.html
  • http://weblogs.asp.net/thangchung/archive/2010/10/05/nhibernate-3-and-autofac-can-go-together-part-1.aspx


Man - this is a huge question (in terms of scope). :)

Architecture is "everything": including:

  • The process you go through (creating the initial vision of what is to be built, communicating that, identifying the critical factors that constrain the architecture, identifying the important System Quality Attributes (and NFR's) that the system must meet, etc).
  • The formal and informal representations of "the architecture" - the static artefacts that describe what the system is - the blueprint.

Design Patterns are (to quote Wikipedia) a:

general reusable solution to a commonly occurring problem.

They are a good place to start if you don't like re-inventing the wheel - at least from a conceptual or logical perspective. They are a Mini-blueprint to a smaller specific problem (where "Architecture" is the whole solution and big problem).

The MVC Framework is an implementation of the MVC design pattern. It brings the implementation (and community, etc) that the "paper based" design pattern doesn't.

N-Tier is an architecural style - it's (kind of) the eqvialent of a design pattern but at the top "architect" / big problem level.

Have a look at: http://en.wikipedia.org/wiki/Multitier_architecture

It's worth noting that a "Tier" is a physical separation; a term which is frequently contrasted with a "Layer" which is merely a logical one within your code (and which can often also be leveraged for a physical boundary).


a Framework is a set of tools and using for architecture Implementation.(example: .NET Framework)

N-Tier is a Architecture Style and using for Create Blocks for Architecture-Design Elements,Ruls,Analysis Tools,... .

MVC is a Design Pattern and using for solving architecture Style certain Problems. (MVC is create with 3 design Pattern:Strategy,Composite and Observer Patterns

0

精彩评论

暂无评论...
验证码 换一张
取 消