introduction to model view presenter

21
Introduction To MVP PRESENTED IN TABRIZ SOFTWARE OPEN TALKS SAEED SHARGI GHAZANI @saeed_shargi

Upload: saeed-shargi-ghazani

Post on 16-Apr-2017

538 views

Category:

Engineering


3 download

TRANSCRIPT

Introduction To MVP

PRESENTED IN TABRIZ SOFTWARE OPEN TALKSSAEED SHARGI GHAZANI

@saeed_shargi

Problem

Solution’s

• Ugly• Spaghetti Code• Not Reusable• Not Maintenance• Not SRP• Not Testable

Solution’s

• Bad• Spaghetti Code• Not Reusable• Hard Maintenance• Not SRP• Not Testable

Solution’sForms and Controls

Model View Controller

VisualWorks Application Model

Model-View-Presenter (MVP)

Humble View

Martin Fowler

MVPA GUI Design Pattern (Architecture)

Derivation of MVC

Early in 1990s at Taligent

Popularized in a paper by Taligent CTO Mike Potel

In 1997,Andy Bower and Blair McGlashan adapted it in Smalltalk UI

In 2006,Microsoft incorporating it for UI programming in .NET Framework

MVP

MVP

AdvantagesSRP

Unit Test

Easier Maintain

Easily Interchangeable Views

Reusable

DisadvantagesComplexity

A little Trouble

Maybe not for simple and small applications

ImplementationPassive View

Supervising Presenter (Controller)

Passive View

Supervising Presenter

Implementation Frameworks.NET

MVC# FramewokWinforms MVPClaymore…

PHP Nette Framework

JavaSwingJFaceGWTGoogle Web Toolkit…

MVC

MVVM

MVC vs MVP

MVVM vs MVP

MVC vs MVVM vs MVP