UI design Patterns

In early UI developments we create views using different windows/Server/ User controls and then we write logic codes like event-handling and data bindings for them.

In Modern/recent time there are different design pattern for UI development which deals about how much these components (View, Data & Events) are loosely coupled with each other to enforce testability and maintainability. And to do so available popular design patterns are MVC, MVP, MVVM.
MVC – Model View Controller. — Domain model(data manipulations and business logic) and controller(handle request) logic are decoupled from user interface i.e. View– html/css/js.

MVP-  Model View Presenter. — Similar to MVC, Controller is replaced by Presenter. Presenter is responsible for handling all UI events on behalf of view. View and Presenter talk each other via interface. Two way communication between View and Presenter.
1: 1 relation between View & Presenter.

MVVM- Model View View Model. — Support two way binding between View and View model means instantly the changes got reflected.
real world example of two way binding while typing in a text box/view typed values got instantly reflected on below label.

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s