A Trio of Famous Trios

13
A Trio of Famous Trios Presented by: Fahad Ali Khan

description

Software Engineering Design Patterns, it contains description about MVC (Model-View-Controller) architecture ,3 layered architecture, 3 tier architecture, MVVM (Model-View-ViewModel) architecture

Transcript of A Trio of Famous Trios

Page 1: A Trio of Famous Trios

A Trio of Famous Trios

Presented by:Fahad Ali Khan

Page 2: A Trio of Famous Trios

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)

Page 3: A Trio of Famous Trios

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

Page 4: A Trio of Famous Trios

3 layered Architecture

Page 5: A Trio of Famous Trios

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

Page 6: A Trio of Famous Trios

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

Page 7: A Trio of Famous Trios

3 Tier Architecture

Page 8: A Trio of Famous Trios

Advantages

• Scalability• Centralized Security and• Fault Tolerance

Page 9: A Trio of Famous Trios

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

Page 10: A Trio of Famous Trios
Page 11: A Trio of Famous Trios

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.

Page 12: A Trio of Famous Trios

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

Page 13: A Trio of Famous Trios

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).