Microsoft WebMatrix consists of a basic IDE bundled with SQL Server compact database and lightweight web server (IIS). Development is in either PHP or C# or VB. The native view engine uses Razor syntax optimized for HTML development. Although the full ASP.NET stack is available, developers can choose web pages which offer simplified web development. WebMatrix is used to build websites. It streamlines website development and makes it easy to start websites from popular open source applications.

So how does WebMatrix fit into the development process parallel to Visual Studio? As a developer there are times when you want to check a particular code file independent of a project or solution or make some quick edits to files in a directory without creating/managing a project file. WebMatrix. Developers can work with StoredProcedures dynamically without generating a designed bit of code.

Razor is a light weight code footstep in HTML. Helpers help add common functionality to websites. Creating a .cshtml file in app_code creates new helper files. Layouts give developers the ability to create and manage larger sites look and feel without duplicated effort. Sections are reserved areas in a layout that can be set by the pages that contain them.

Microsoft Visual Studio LightSwitch Beta2 was released in March. LightSwitch is a new addition to the Visual Studio family. LightSwitch helps you solve specific business needs by enabling you to quickly create professional-quality business applications, regardless of your development skills. The technology is designed to make building line of business applications easier through pre-built templates and custom business data types with the ability to deploy to the desktop, the web and the cloud.

LightSwitch can integrate data from multiple sources and is a .NET framework based platform. It is powerful for building data centric business applications. It uses Visual Studio project structure. You can use pre-configure screen templates that give the application a familiar look and feel.


It provides pre-written code and reusable components to handle routine application tasks, along with step by step procedures. Custom code is written in C# or Visual Basic rather than VBA.

It can participate in source code control via the integrated Visual Studio Team Edition Explorer. It uses SQL Server Express Edition for its local data store at design time. Deployed applications can use SQL Server Express, SQL Server pr SQL Azure. LightSwitch UI is presented in Silverlight 4 and follows the MVVM architecture pattern.

Since it is a new product, custom extensions or add-ons are being written to fill the gaps and add more capabilities. There are six extension points: controls, screen templates, business types, themes, shells and custom data sources. To build extensions, you would need VS LightSwitch Beta 2, VS 2010 SP1 Professional or higher and VS SDK. LightSwitch Extensions cookbook via msdn can be downloaded from here. This post has been written with references from msdn, visual studio magazine and

Microsoft has been reaching out to iPhone application developers to develop their existing applications to work on Windows Phone 7. Microsoft has released an API mapping tool for iPhone/iOS to Windows Phone 7. With the tool, iPhone developers find out the equivalent classes, methods and notification events for the iOS API calls. A developer can search a given iOS API call and find the equivalent WP7 along with C# sample codes and API documentations for both platforms. The code samples allow developers to quickly migrate short blobs of iOS code to the equivalent C# code.

The following tool shows the functionality mapping between iPhone and Windows Phone 7:


iPhone / iOS

Windows Phone 7

Application UI and phone integration Cocoa touch WP7 framework, Silverlight controls
Graphics and animation Media layer XNA for games

Silverlight media and graphics for others

Base services, Networking, XML, storage Core services layer Common base library

iOS API’s can be broadly classified into the following categories:

  • Audio / video
  • Data management
  • Graphics / animation
  • Network / internet
  • Performance
  • Security
  • User interface

API tool currently maps data management, network/internet and user interface categories. The API tool provided by Microsoft can be accessed from here.

~ Ramya

Data driven decision making is the key to success for today’s businesses. The key lies in collecting the information i.e. KPI’s (Key Performance Indicators) that can be presented to business decision makers.  SharePoint dashboards provide integrated BI. SharePoint dashboards integrate data from disparate sources into scorecards, enhance scorecards with rich data visualizations and enable deep interactivity and workflow automation.

Steps to building the dashboard

  1. Install Performance-Point Dashboard Designer
  2. Install Dashboard Designer from the BI center site
  3. Select the data sources for contributing to the dashboard
  4. Build KPI’s by selecting the data points for measurement including the target points
  5. Build scorecards that display the different KPI’s
  6. Publish the scorecard to SharePoint dashboard

SharePoint dashboards also use the workflow functionality already built into SharePoint. For example: If a salesperson reviews his dashboard and finds he is likely to miss his quota he can submit a request to his manager for an adjustment. His manager can approve or reject the request before any change is reflected in the dashboard.

Reference: Delivering Intelligence with SharePoint Dashboards, Redmond magazine

~ Ramya


In the previous post I had written about some of the challenges faced during mobile app development. The following lists some of the solutions implemented for overcoming the challenges:

  • Choose technology
    • Development team can choose between commonly used web technologies, native languages or a combination of both when developing the application
    • Ability to use third party libraries to enhance and streamline the development and integration process
  • Design for usability
    • Optimize the application for mobile use
    • Consistent UI design
  • Selecting devices
    • Consider range of devices that will be supported
    • Cross platform development
  • Conserving memory and power
    • Ability to balance application functionality between client and server to enhance application performance and reduce system loads

HTML5 is a critical step for mobile web application development towards providing a rich application performance. Offline support, canvas and video, GeoLocation API and advance API are some of the key elements. Hybrid application frameworks also rely on HTML5 features. iPhone, Android, Nokia are all based on open source Webkit browser engine. Windows Mobile and Blackberry do not use the Webkit. HTML5 capabilities are available in Windows Mobile through Google Gears plug-in. So have you started exploring HTML5?

~ Ramya

This post is a continuation of QTP code snippets. You can check QTP Code Snippets – Part 1 here.

  • Formatting the date and time value

FormatDateTime() function returns an expression formatted as date and time. The function has Date part and NamedFormat part. Example: If the application returns the time stamp and we need only date and not time then we can use the function as shown:

createdTime = FormatDateTime(“06/05/2009 10:15 AM”,2)




  • Comparing difference in date

DateDiff() function returns the number of intervals between two dates

DateDiff(interval, date1, date2 [,firstdayofweek[, firstweekofyear]])

Example: We are going to compare the present date with the date passed through FormatDateTime() function to check if it Today’s date.

createdTime = FormatDateTime(“06/05/2009 10:15 AM”,2)

If DateDiff(“d”,createdTime,date) = 0 Then

Msgbox(“Its Present Date”)


Msgbox(“Its not Todays date, its another day”)

End If

  • Passing parameter from one action to another

Before passing a parameter from one action to another input parameter needs to be created for the action which is going to accept a value as input from another action. Lets take Action 2 is going to get an value from Action 1 as a parameter, then first create an input parameter for the Action 2. This can be done by right clicking on the Action 2 Action Properties à Clicking on Properties Tab and Clicking the “+” sign to create a parameter. Now lets say we are going to pass an integer variable from Action 1 to Action 2, hence I can create a number parameter in the input parameter of Action2. The code snippet will look like the following:


a = 10

b= 20

c= a+b

RunAction “Action2″, oneIteration,c



d = 10

result = Parameter(“c”)

e = result+d


Note: Set c as input parameter in Action2

More code snippets in the next post.

Starting from this post, I am going to publish QTP code snippets that we use in our everyday projects. Starting off, I am listing the basic but very important code snippets.

  • Get an object property

There are two types of methods by which one can get the property of an object: GetROproperty and GetTOproperty

Google Submit Button

For knowing the button type (of Submit button in Google search engine as shown above), we will use the GetROproperty of the object as one shown below the code:

Browser(“Google”).Page(“tectrick – Google “).WebButton(“Search”).GetROProperty(“type”).

The type of button is “Submit”. Hence we can uniquely identify the object in a web page.

  • Setting the run time property for an object

There are situations where the object changes dynamically in applications (Web site mainly) and hence the object stored in Object repository will be different to the object available in application.In order to set the property for the object during run-time we use a fascinating method available in QTP, which is SetTOProperty. Eg: If we are in a situation to change the type of the above shown Google button as “Submit2” from “Submit” then we can use the code snippet as one shown.

Browser(“Google”).Page(“tectrick – Google “).WebButton(“Search”).SetTOProperty “type”, “Submit2”

  • Get value of text using VB script

We can use inbuilt functions Mid () Function available in VB Script.

Eg: If we have a web page with the Screen showing the text as 1-10 of 20. This happens mostly in list screen.

Dim Count

Count = Mid (“1 -10 of 20″, 9,9)


Now this will return 20 as the Value.

  • Using Regular Expression

There are Totally 11 special characters used Regular Expressions, they are the opening square bracket [, the backslash \, the caret ^, the dollar sign $, the period or dot ., the vertical bar or pipe symbol |, the question mark ?, the asterisk or star *, the plus sign +, the opening round bracket ( and the closing round bracket ). These special characters are often called “metacharacters”.

Eg: If there is any word say 1+1=2, then you can use it as in regular Expression as 1\+1=2. Meaning “+” has special meaning, in order to skip the meaning we use “\”

\d matches a single character that is a digit,

\w matches a “word character” (alphanumeric characters plus underscore), and

\s matches a white space character (includes tabs and line breaks).

The actual characters matched by the shorthand depend on the software you’re using. Usually, non-english letters and numbers are included.

As in our above example, the list screen Value 1-10 of 20, which will be recognized by QTP until the value in Object Repository exactly matches with AUT (Application Under Test). But here is the situation were you are adding some data and the application list screen count changes from 20 to 21, and try to run the same script, OOPs !!!!.

The QTP throws Error saying, “No object found in Object repository.” Try to run in Maintenance mode!.

Hence we can change the already recorded value of 1-10 of 20, in Object Repository with Regular Expression, since here 20 is just a digit (Numeric) we can use /d. Now the Object Repository should look like one shown below.