Introduction to MVVM pattern in WPF

The Model View ViewModel (MVVM) is an architectural pattern used in software engineering that originated from Microsoft as a specialization of the Presentation Model design pattern introduced by Martin Fowler. Largely based on the Model-view-controller pattern (MVC), MVVM is targeted at modern UI development platforms (Windows Presentation Foundation and Silverlight) in which there is a UX developer who has different requirements than a more “traditional” developer (i.e. oriented toward business logic and back end development).

Model
The Model is defined as in MVC; it is the data or business logic, completely UI independent, that stores the state and does the processing of the problem domain. The Model is written in code or is represented by pure data encoded in relational tables or XML.

View
A View is defined in XAML and should not have any logic in the code-behind. It binds to the view-model by only using data binding.
In simple examples, the View is data bound directly to the Model. Parts of the Model are simply displayed in the view by one-way data binding. Other parts of the model can be edited by directly binding controls two-way to the data.

ViewModel
The term means “Model of a View”, and can be thought of as abstraction of the view, but it also provides a specialization of the Model that the View can use for data-binding. In this latter role the ViewModel contains data-transformers that convert Model types into View types, and it contains Commands the View can use to interact with the Model.
The ViewModel exposes public properties, commands, and abstractions. The ViewModel has been likened to a conceptual state of the data as opposed to the real state of the data in the Model.

References
Wikepedia
Tales from the Smart Client
Model-View-ViewModel Pattern

kick it on DotNetKicks.com

Shout it

pimp it

.NET and J2EE. Status as of now and scope in future.(Updated with important note)

Big question today: What is the scope of .NET and J2EE platforms. Which one is more dominant in industry today?

I want to answer this question in this post with my viewpoint with no intentions of hurting anybody but with a sole intention of increasing the knowledge of J2EE for .NET people and .NET for the J2EE people
and being a developer in Microsoft technologies i agree my opinion may be aligned towards .NET but what i sincerely want is that through this platform i want to know the actual status of the platforms viz a viz features and invite everybody to add to my learning the new things happening in the J2EE world as well.

On Technology Front
I think that with the arrival of Mono, the only disadvantage that .NET had over J2EE platform i.e of platform independence has been resolved up to an extent. But with the introduction of WCF, WPF, Workflow Foundation, LINQ, ASP.NET MVC framework, Silverlight,ASP.NET Ajax and many such other features have only added to the popularity as well as usefulness of .NET both for programmers, designers and enterprises. With .NET 4.0 parallel programming framework, improved WCF and host of improvements along with Visual studio 2010 will be a great advantage for all..NET 4.0 will also be integrating cloud computing platforms. You will agree to the fact that coupling of IIS and SQL Server is superb in terms of performance as compared to any other options.

Today designers and developers can work together on the tool provided by Microsoft and the UI can be deployed to Web,Desktop or Mobile with an assurance of same effects.
I think JAVA have been left far behind on the technology terms as compared to .NET over past few years as I have not come across any such features being introduced in J2EE platform.

What customers want is fast development of the solution at low cost, and if we start of with .NET we can develop the solution at a very fast rate, thanks to the host of tools provided by Microsoft, and then use cloud computing to bring down the IT costs.You get .NET resources fast as well ,thanks to initiatives taken by Microsoft to teach students and the interest they are able to generate within the students community.

I believe that with the launch .NET 3.5 and onwards, there no looking back for .NET platform as it has enabled the developers to provide good quality extensible code at a fast rate to clients taking the full advantage of the latest operating systems plus giving the backward compatibility to most applications previously built on .NET platform. What more can customers ask for?

I also believe that yes J2EE is also here to stay for a long time as it also has got a big customer base but to compete with the .NET platform they need to pick up fast and offer some features which Microsoft has already done with, to at least get back into competition with .NET

Important NOTE:
I am in NO WAY attached to Microsoft except for the fact that i am a .NET developer and get excited with all the new things happening in the technology world and due to my busy schedule i am not able to keep myself updated on Java. So i started off with my little knowledge of the features i have about .NET and invite everybody here to discuss and put forward the corresponding features from J2EE platform. That’s it. It is of minimal importance for me as which of J2EE or .NET is more popular but what matters is i should know tomorrow that if i want to do something how is that possible with the help of two options and which one fits the best in that situation and what other features can we expect from both the fronts in the near future
I would request you not to comment as in way of showing down J2EE or .NET as i will delete those comments.

Constructive Comments are most welcome.

kick it on DotNetKicks.com

Shout it

pimp it