A Trio of Famous Trios
Presented by:Fahad Ali Khan
What are Trios??
Contemporary applications are being based on these popular architectural approaches. They are• 3-layered architecture• 3-tier architecture• Model-View-Controller architecture (MVC)• Model-View-ViewModel architecture (MVVM)
3-layered architecture
This approach implies a division of responsibilities in logical components. They are:1. Presentation, where input forms and results are rendered2. Business, or also Domain Logic, where core application logic
lives. Here it's all about business nouns: Customers, Invoices, Purchases, etc.
3. Data Access, where all those concerns related with persistence mechanisms (database connections, tables, records, etc) take place
3 layered Architecture
Advantages
Following are the advantages of 3 layered architecture:
• Maintenance:, because every layer comprises a set of few, cohesive APIs
• Reusability: is possible as we can add a new presentation ,changes in one layer shouldn't impact on the others
3-Tier ArchitectureIn this approach, we privilege a physical division of activities. Let's see:• Client (aka Front-end, Channels), consistent in a set of
different hardware and software infrastructure where the application user interface (UI) can be executed
• Application Server (aka Middleware), ranging from just one server up to a farm of them, where client requirements arrive through transport and message protocols (HTTP, SMTP, SOAP and other XML-based, etc)
• Back-end, a set of heterogeneous supporting infrastructures. We can find examples like databases (for persistence ends), or complex legacy systems on a mainframe infrastructure
3 Tier Architecture
Advantages
• Scalability• Centralized Security and• Fault Tolerance
Model View Controller• The View, although it seems that we are talking about the
Presentation layer of the 3-Layered architecture.
• The Controller, a component which receives Actor actions thru the View and motivates System responses.
• The Model, the status of the system, its business entities and the business rules which govern itself
Model-View-ViewModel• Model-View-ViewModel (further referred as MVVM) is an
architectural pattern used in software engineering that originated from Microsoft as a specialization of the Presentation Model design pattern. The MVVM pattern is targeted at modern UI development platforms that originally invented in Windows Foundation Presentation (WPF) and later adopted in Silverlight.
Model-View-ViewModel• View: The View layer is the user interface of your application which mainly
consisted of layout and user interface controls written in XAML markup. The View layer often includes resources that required in the user interface, such as data templates and styles.
• Model: The Model layer refers to the entities, business objects, data source, proxy objects and other repositories available in your application.
• ViewModel: The view model is a “model of the view” meaning it is an abstraction of the view that also serves in mediating between the view and the model which is the target of the view data bindings
Advantages• Separation of Concerns: MVC framework provides a clean
separation of the UI , Business Logic , Model or Data.
• More Control: The ASP.NET MVC framework provides more control over the HTML , JavaScript and CSS than the traditional Web Forms.
• Lightweight: ASP.NET MVC framework doesn’t use View State and thus reduces the bandwidth of the requests to an extent.
• Test-driven development: It provides better support for test-driven development (TDD).
Top Related