Posts Tagged ‘Silverlight’

Things To Consider While Using SQL Server Reporting (SSRS) With Silverlight (3 and 4)

Tuesday, August 31st, 2010

Reporting is the heart of most business applications. And SQL Server Reporting Service (SSRS) is a preferred choice while MSSQL Server is the database back-end. Apart from ready to use services, SSRS provides different and useful scalability and extensibility options.

On the other end, lately, MS Silverlight has generated positive heat amongst varied business applications.

So you got the point. I’m talking about the marriage between SSRS and Sliverlight.

It started with challenges as the whole concept was an unknown devil which we were able to tame in the end.

The problem was simple – Microsoft doesn’t have any SSRS report-viewers for Silverlight – but its impact was not so. Initially, it was apparent that we cannot use SSRS with Silverlight.

So, I Googled (and then Bingged also – both the technologies are from Microsoft :) ) to find out the following two possibilities out of my one hour of investment:

  1. Use Third Party Report Viewer Controls
  2. Use ASP.NET application and invoke it from Silverlight application

Each option has its own distinctions. Here are those:

  1. Third Party controls: We can use third party report viewers which support SSRS reports. Right now there is only one such software provider Perpetuum Software is available. They provide SSRS report viewer for Silverlight which is also Silverlight 4 ready. There are other report viewers provided by other major component providers like Telerik however they do not support SSRS reports at present. Instead, they support their own reporting ways from within Silverlight application.
  2. ASP.NET Application: In this approach, we have to create an ASP.NET web application for hosting SSRS reports. The web application will use default report viewer control. To integrate this web application into the Silverlight application there are two possible options as below:
    1. Using Html Viewer: We can use HtmlViewer control to view reports hosted as an ASP.NET web application. Though, Silverlight 3 does not have in-built html viewer control, there are third party controls available like one from Telerik. The good news is that Silverlight 4 does have in-built html viewer control.
    2. Using JavaScript: We can use client side JavaScript functions to open new window or IFRAME from within Silverlight application which will show reports hosted as an ASP.NET web application.

I am sure Microsoft will come up with a better solution to this problem in the coming days. Until that any of the above options can be used. I used option #2 – ASP.NET application – considering the client needs of flexibility and it worked well.

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 :)