Skip to main content

MVVM Architecture


MVVM: Model–View-ViewModel talks of creating a new model (in addition to your domain model). This model normally adds additonal properties from the prespective of View (as we understand that View has controls in addition to data which it’s displaying). For instance if View had a property IsChecked and Presenter was setting in classic MVP, in MVVM Presenter will have that IsChecked Property which View will sync up with (doesn’t it look like Strategy pattern has been replaced with Observer?). So now a Presenter becomes more like a combo of – View Properties & Model properties which would be synchronized with View. So why not rename Presenter to ViewModel? Do that and you get MVVM. MVVM is attractive for platforms which support bi-directional binding with less effort. Also a minor tradeoff is ViewModel unlike Presenter can stand on its own (Presenter normally requires a View’s interface). 
MVVM

Comments

Post a Comment

Popular posts from this blog

Node.js best practices you should follow

Node.js is a platform built on Chrome’s JavaScript engine (i.e. v8 JavaScript Engine); it helps to develop fast, scalable network application. It is basically used in server side coding, handling AJAX requests, maintaining routes for different APIs and manipulating database. Node.js uses an event-driven, non blocking I/O model that makes it lightweight and efficient. Now without defining v8 the blog will remain incomplete.  v8  is Google’s open source JavaScript engine which is written in C++. Best feature of v8 is: it can run independently, or can be embedded into any C++ application. Let’s come to the main topic; here are the Node.js best practices: 1. Learn the best practices of JavaScript first: Before starting Node.js you should learn the best practices of JavaScript first. It will make your code more decent and flexible. There is a statement code lovers always use, “A fool can write codes which only machines can understand”. So, my suggestion is follo...

JavaScript coding standards we follow

This document’s primary motivation is twofold: 1) code consistency 2) best practices. By  maintaining consistency in coding styles and conventions, we can ease the burden of legacy code maintenance, and mitigate risk of breakage in the future. By adhering to best practices, we ensure optimized page loading, performance and maintainable code. Therefore, at Innofied, we follow these guidelines strictly while programming. 1 . Proper File Naming Conventions a) Use Constructor function name as file names. So as per example, file name will be Hero.js For example: 1 2 3 function Hero ( ) {    this . occupation = ‘ Ninja ’ ; } b) Choose meaningful file names for your JavaScript files like the file names should be derived or chosen by focusing on what the file holds and use CamelCase for your file names. 2 . Indentation a) The unit of indentation is 4 spaces. b) Use of tabs should be avoided. c) Use “format” ...
 Now I am in QA Automation, love of learning something new related to old which is  useful..excites me..:)   Why we use WebDriver as an Interface with ChromeDriver object creation in Java Selenium Automation....stay tuned..coming soon...