Visual Studio LightSwitch is a new tool from Microsoft for developing business applications. Currently available development technologies from Microsoft (like VS C#) are general purpose and can be used to develop a wide variety of applications. LightSwitch, on the other hand, is focused on simplifying development of business applications by handling the basic plumbing itself.
I downloaded the currently available Beta1 version of LightSwitch and started playing with it. It took about 5 minutes to get following application ready.
The above sample application supports addition, updation and deletion of employee records along with employee qualifications and skills. It is an impressive output considering the effort that was put in.
I performed the following steps to develop the sample app.
- Click on ‘create table’ in App Designer, name the table as Employee and define its attributes.
- Do the same as step 1, for Qualification and Skill.
- Create the relationship two relationships using designer i.e. employee-qualification and employee-skills.
- Click on ‘new screen’ in App Designer and specify the table and desired layout.
- Hurrah! Application is ready.
LightSwitch Application Designer:
Following is the LightSwitch application designer for tables. Additional settings are available for each attribute from the properties window.
Below is the screen shot of application designer for screens. I didn’t make any changes here except changing the display names for qualification and skill tabs.
LightSwitch also has a query designer. Queries can also be used as a basis of screen design apart from tables. Following screen shot shows the query designer.
- We can extend the functionality of LightSwitch application by writing code in C#.Net or VB.Net. LightSwitch allows the developers to easily hook their business logic in application events. We can even write a custom control or fully custom screen.
I believe this is the single most important feature of LightSwitch, this is where most of the LightSwitch precursors struggled.
- Another important feature is the ability of LightSwitch to connect to various data sources, its not tied up to a particular back-end technology. It support Sql Server, Azure (Cloud), SharePoint, Entity Framework as data sources.
- The application generated by LightSwitch is a Silverlight application. It runs in out-of-browser mode if application type is desktop. So multiple platforms are supported.
- Support Master details screen (e.g. invoice and invoice lines)
- Support searching, sorting and paging of records without writing any code.
- Support user authentication and role based security using ASP.Net Membership Provider.
- Handle image as one of the basic attributes of an object.