Posts Tagged ‘MVVM’

Leverage the Power of ASP.NET and Silverlight Platforms with WCF RIA Services

Wednesday, May 12th, 2010

It has always been difficult if not impossible to develop N-Tier applications. Though there were few applications framework some commercial and other few open source which helped the developers in building the apps based on the N Tier architecture and SOA principles. But the tables are now turning around; Microsoft has added one more jewel in their crown called WCF Ria Services, formerly known as .NET Ria services. I have been using this framework right from its raw bits and it is now in its RC2 stage. I must admit that that features have exponentially grown with every new release. It is now complete end to end application framework to build N-tier apps.

As the name suggests the framework in based on Core WCF (Windows Communication Foundation), which is a great enabler of SOA.As a developer using WCF Ria Services Framework you don’t have to worry about nities and grities of WCF. All that plumbing code is readily available to you from out of the box. But I recommend that knowledge of WCF can help you to troubleshoot your app develop on this framework. The framework uses the DomainService pattern, which is highly scalable pattern. It means that the framework can be glued to any UI Technologies, be it Silverlight, Ajax or Asp.net.The diagram below gives more clear idea.

WCFRiaClients

Gateway’s Customer Advantage

  1. You get your app developed in the latest technology with UI as Silverlight and all Domain Operations based on the WCF Ria Services. Asp.net Web Forms are now a decade old technology.
  2. Your application gets developed in true N-tier sense where the separation of concerns is also taking into the consideration by following MVVM pattern. This pattern is a great booster in Unit Testing.
  3. Your core business logic is given utmost priority because the developer is free from the plumbing logic code of various tiers as the framework is tightly integrated with Microsoft DAL Technologies like Linq and Entity Framework.
  4. Your offshore team can get started right away as Visual Studio 2010 provides the complete application template to develop the application based on this framework. So you save that precious hours ($) as developer does not have to assemble different projects and assemblies.
  5. Last but not least our technical expertise in this application framework.

Should you have any questions or feedback, feel free to post a comment and I’d be happy to discuss about that.

Unleash the Power of MVVM with Silverlight

Saturday, May 8th, 2010

Businesses always dream of data centric applications which are easier to maintain, robust and flexible enough to accept the future changes. Silverlight being a part of .Net framework has all of these ingredients well thought of. Apart from such basic features, it provides rich user interface with minimum efforts.  Though Silverlight is relatively new technology, it has a little learning curve for seasoned Microsoft developers. Silverlight also provides cross-browser and cross-platform support which is very important for targeting larger client base with diverse needs.

Three Important Benefits of MVVM

The goal of any system/application is to automate the business process and help people achieve utmost efficiency. Following are some key points which may compel us to use MVVM (Model-View-ViewModel) pattern:

  1. Eradicate tight coupling: Every system has N layer defined or undefined. When these layers are tightly coupled with one another i.e. every layer knows how the other layer is accomplishing its job, the system becomes unmanageable and least flexible. Change in any one layer requires changes in all the layers and thus creating chaos.  MVVM decouples all the layers and helps us achieve robustness and flexibility which in turn makes the system absolutely manageable.
  2. Separation of responsibility: MVVM helps in a great way to separate the responsibilities in the development process. Multiple Software Engineers work on a system/application at a time during its development process. To make this process easier, separation of responsibility is very important. This can be very well achieved using MVVM for example, a designer and developer can work simultaneously and with least dependency on Silverlight application if we implement MVVM design pattern. As View on which designer has to work and ViewModel and Model are totally separate contexts on which Engineers work.
  3. Testability: Unit testing is very important part of development process especially during initial development and maintenance. MVVM creates loosely coupled system components which can be unit tested separately without any hassle.

How Silverlight Married with MVVM can Produce Great Results?

To get the best result out of a technology and a design pattern, it is very important that both of them are compatible with each other. If not then it would be more of an overhead on the system. Following of Silverlight features make it a best mach for MVVM design pattern:

  • Databinding: Silverlight provides robust infrastructure for binding the data which helps in binding View with ViewModel in such a way that both of them are unaware of each other’s functioning.
  • Datatemplates: Datatemplate is the actual template where ViewModel gets bound and this data template also defines how data will be shown to user. This helps in separating responsibilities of designer and developer.
  • Commands: Commands are the actions that need to be performed. It is set of activity that gets performed.  As we know ViewModel also has the state and behavior of the Model.  When Command is bound to a ViewModel, it performs certain actions on user interaction. For example in a customer registration “Add customer” is an action for which we can create a command which executes on button click or context menu click.

Thus, Silverlight used with MVVM gives the business an edge over other technologies. Though Silverlight is still a young technology, Microsoft has been giving great support and has a very promising plan for its future versions. Considering these factors, it would be in the interest of any software solution provider who would like to cater its client base with Silverlight married with MVVM and we are not an exception :)