?

Log in

Previous Entry | Next Entry

In case you are new to WPF we would strongly suggest to see this video created by www.questpond.com which explains the what is WPF and how they differ from old windows form programming



MVVM is an architecture pattern where we divide the project in to three logical layers and every layer has its own responsibility.

DAL 3

Below are the three logical layers with explanation what they do:-

  • View: - This layer handles responsibility of taking inputs from end user, positioning of controls, look and feel, design, visuals, colors etc.

  • Model: - This layer represents your middle layer objects like customer, supplier etc. It handles business logic and interaction with data access layer.

  • View Model: - This layer is the bridge between model and view.  It handles connection logic   , data transformation logic and action mapping between model and view. For example it will have following types of logics as shown  below :-

             o       Replicating and propagating data between views and models. When someone enters data in to UI or the
                      model gets updated this layer will ensure that the propagation of data happens between these entities.
             o       Handling data transformation from view to model and vice versa. For example you have a model which
                      has gender property with data as “M” for male and “F” for female. But on the View or UI you would like
                      to display as a check box with true and false. This transformation logic is written in the view model
                      class.

View model also map UI actions to methods. For example you have “btn_Add” click event and when any one clicks on this button you would like to invoke “Customer.Add()” method from the customer class. This connection code is again a part if view model.

Recently one of our friends was asked to explain WPF dependency property  , below is link which explains the same in great details http://www.dotnetinterviewquestions.in/article_c-wpf-interview-questions::-what-are-dependency-properties-_142.html

Copy right www.questpond.com

Comments

Buy 600+ Real Time Interview Videos

Call +91-22-66752917 or mail us on questpond@questpond.com for more details on C#, .NET, ASP.NET, SQL Server interview question videos.

SQL Server interview question videos

Latest Month

January 2017
S M T W T F S
1234567
891011121314
15161718192021
22232425262728
293031    

Tags

Powered by LiveJournal.com