A review of Microsoft Visual Studio LightSwitch
Microsoft LightSwitch is a Rapid Application Development (RAD) tool. It provides a fast way to create professional applications for the desktop, the web, and the cloud – with little or no Visual Basic code.
Business applications can be created with predefined screen templates. It is an easy way to provide CRUD (Create, Read, Update, Delete) functionality on a database.
LightSwitch is fully integrated with Visual Studio 2015. There are two options for Line Of Business (LOB) software – an HTML5 Client for Web access or SilverLight 5 for the Desktop User Interface (UI). This means that all operating systems are now catered for – Windows, Mac, IPad, Tablets, Mobiles, etc.
LightSwitch uses the free LocalDB (a cut down version of SQL Server Express) for its Back-End database. This overcomes the 2 Gigabyte size limitation of Microsoft Access.
The market aimed at is the application that is written using Microsoft Access, FoxPro or FileMaker.
The features of LightSwitch
- LightSwitch attempts to eliminate the usual spaghetti code and bad design.
- The structure of LightSwitch is constrained, preventing the design problems that are usually the result of amateur programming attempts.
- LightSwitch uses a consistent design pattern for each Screen.
- LINQ is used so that Queries can be created with VB.Net code.
- Transaction consistency is maintained
- Conflicting updates are trapped
- The Colours and Fonts of the User Interface (UI) can be styled with Themes
Setting up a Screen is somewhat fiddly – a Wizard is needed.
Which to Choose – An HTML Client or Silverlight for the Desktop?
The advantages of an HTML Client application:
- The application can be used from any location.
- The application can be used on Mobiles, Tablets, PCs, Macs, iPads, etc.
The advantages of a desktop Silverlight Client:
- Response times will be better than an HTML Client
- Functionality will be better than an HTML Client
- Can use Microsoft Word and Outlook automation
- Multiple Screens can be used
Skill Level Required
LightSwitch is targeted at the technically skilled programmer or business analyst. Extensive training in the LightSwitch software is needed before attempting to create any project. Unlike Microsoft Access, LightSwitch is just too daunting for the novice.
The Limitations of LightSwitch
LightSwitch has a Data-Centric architecture - that is the logic is Table-Driven and determined by the structure of the Database. This approach has limitations:
- LightSwitch cannot link to Access database Tables
- LightSwitch cannot connect to any database using ODBC
- The developer has fewer options for individuality or a tailored solution
- LightSwitch does not have Reporting – SQL Server Reporting Services must be used
- Customisation of the User Interface is restricted
- Stored Procedures can only be called using VB.Net code
- SQL Server Express has CPU, Memory, and Size limitations – an upgrade to the full version of SQL Server is easy – but costly
LightSwitch and Microsoft Access
LightSwitch is an attempt at replacing Microsoft Access – and the venerable Visual Basic for Applications (VBA) programming language.
The adoption of LightSwitch has been slow. It has not been accepted at all by the professional VB.Net programmer.
Microsoft Access is still very popular – and thousands upon thousands of users are unlikely to ever adopt LightSwitch.
There is no prospect of "Access.Net" software (i.e. replacing VBA with VB.Net) becoming available.
LightSwitch and VB.Net
It may be argued that a skilled Visual Basic programmer could create a desktop application which is more friendly, maintainable, functional and at the same cost compared to the LightSwitch alternative. When it comes to creating an HTML browser application, LightSwitch could be faster – but it is unlikely to ever be adopted.
For Desktop applications, the cost and speed of development of the LightSwitch solution is illusory. The VB.Net option will prove to be more cost effective. As has happened with many Microsoft Access applications, LightSwitch systems will have a habit of growing. And becoming more complex. And requiring additional functionality which LightSwitch will not be able to handle.
It will never be practicable to convert LightSwitch to VB.Net at a later stage. An upgrade will mean a complete rewrite of the LightSwitch system.
A word of caution
LightSwitch is still very new and in a state of flux – and will take some time to mature. A huge array of changes are still to be made – and bugs to be fixed. LINQ is still in its infancy. Documentation of LightSwitch 2015 is sparse. It will be wise to hold off until the dust has well and truly settled, before the product is released for any business critical process.
LightSwitch applications should be limited initially to simple and discrete solutions.
The future of Silverlight
Microsoft's LightSwitch will no longer be supported. Visual Studio 2015 is the last release that will include LightSwitch.
LightSwitch will be replaced by PowerApps. PowerApps is a development tools that can be used by the non-professional programmer who needs to build custom line-of-business apps. PowerApps will share mobile business applications on iOS, Android and Windows devices.