When should I use Visual Studio Lightswitch?

I have had my hands on Visual Studio Lightswitch since its fairly earlier stages. Back a few years ago, there were bugs with the designer that had to be addressed periodically. Now the project is much more robust and can be used with major implementations. But not all implementations would go well with how Lightswitch is designed.

Lightswitch now has two methods of rendering a project: the Silverlight client and an HTML5 export. Silverlight is used for a few major applications like Netflix and some smaller applications for web input. Of course, Netflix has announced that they would like to move away from Silverlight to HTML5 when it is feasible, as Microsoft had announced the end of support for silverlight by 2021.

So why is Silverlight being phased out?

Although Microsoft Silverlight is a proprietary software it is meant to be compatible with most devices. Silverlight is in a way similar to Adobe’s flash player plugin, only that it can focus on data driven applications much better than flash, where flash is more of an artistic solution. But what is the same is that both forms of media require a browser plugin in order to use the software. Some see this as a security issue, others see it as an inconvenience. Microsoft probably realizes that a

Difficulties with Silverlight

I have been working on Silverlight software for the past couple of years with Lightswitch to organize everything into one location that is easily manageable. Along with this, every person using the software now had to make sure that they had the Silverlight plugin installed and activated, which was not always the case. This is extra maintenance that goes into ensuring that the users are properly set up to use the application.

Now with the Lightswitch Silverlight client, it is very easy to publish to the web server once you have the server properly configured. However, the client itself is a full-page application that by default will take up the entire page, and only provides tools to edit the Silverlight application. Furthermore, when loading all of the controls into the browser, the Silverlight client can take up a considerable amount of RAM and CPU processing power while using it, compared with an HTML form.

The Lightswitch Application

The Lightswitch clients both output complete pages of the application you are trying to make. It uses your data model and provides a framework to reference your data within your application, as you will most likely need to code some attributes under the drag-and-drop layout design at some point. With the complete page, each client has a built-in navigation that is displayed on top.

You are also limited to what you can use inside of the application. For example, Lightswitch does not come with any complex forms of reporting. There are plugins available, for example from ComponentOne, but it does cost more than a professional-level license of visual studio. You can also include web pages into the screen with some coding, but is not a good strategy considering that you now have web content inside of Silverlight content.

Okay on to the main point: Reasons to Use Lightswitch

Lightswitch makes it easy to publish an app to the server and make any changes it needs to. When installing the Lightswitch deployment package for the server, it attempts to configure the server to what is needed to have the application work properly. Although, this often does need to be fine tuned to fit your needs. It also will work with Windows Authentication quite nicely, avoiding the need to even sign in manually or messing with group permissions between a file server and the app itself. This alone is a great reason to use this kind of software: compatibility.

Lightswitch is meant to make it easy for developers to quickly create an app to display and edit information from their database. The advantages of this method is being able to generate the underlying information needed for the controls and data that is used. Of course, you must be sure to follow the procedure of working from the data-level, updating the data-source in Lightswitch, making any necessary changes, then publishing the changes. You must also be sure that the clients refresh and have the latest version of the application that has not been pulled from their cache.

Recently, they have also improved their HTML5 client, that is able to be run on any device. This can be especially useful when using tablets or other smaller and simpler devices to quickly get and modify information. Being able to export in both formats while using the same data back-end is especially impressive and can save a lot of time.

It provides a way to quickly generate forms and grids that allow you to edit and display the content of your database. It provides good controls to quickly show a pop-up window, or choose a date or select from a drop-down list to filter results. Each screen can be created from a list of organization groups and controls, and can even be modified while testing. But that could be the extent of it before it gets complicated.

Problems with Lightswitch

Microsoft advertises Lightswitch as an easy solution that developers do not need to have much knowledge of programming in order to build applications. Depending on the applications you want to build, this may not be the case at all. While it is great to quickly create forms to edit outside of the database-level, it can get just as complex when working with more advanced applications. When the demands are getting to the point where information is being moved around, default values are needed based on how data is added, or disabling or highlighting grid rows, programming will be needed.

Using the Silverlight will require the user to have the plugin installed and need it to be activated. This is an extra step needed that is better than having files of MS access laying around for example, but is not as expected from an internal website. Luckily, Microsoft has introduced the HTML5 client that can work on any device to help solve this problem, but it is not quite the same as using traditional web forms, as this export is intended to be used with mobile and touch-screen devices.

Overall Conclusions: Should I make an App using Lightswitch?

Lightswitch is a software that has the ability to be used on any device, is easy and quick to develop with from a variety of data sources, can publish easily and quickly to a windows server, and can use windows authentication. I’d like to stress two things here: easy, quick, and windows authentication. I’d also emphasize the fact that it is also quite limited, so your requirements for the application should be fairly minimal and straightforward before coding becomes fairly involved.

I see Lightswitch as a good tool for creating quick ways for users to access certain information without having to use other ways to do it (ex: MS Access, Excel, requesting SQL Management Studio access, etc.). In which case I highly recommend giving it a try.

But, when creating more involved software, you may want to consider using web forms, actual applications, or other solutions that specialize in this area. Lightswitch controls are not always customizable to what users would hope for, but that is at the expense of using an organized and built-in control interface.

It is also important to understand how they want to be using the software. Lightswitch does not have any built-in reporting, unlike Silverlight applications that can use these controls with less problems, built right into a webpage. There are other forms of reporting software out there that might be easier to use than Lightswitch, like in Microsoft Excel, or other web solutions.

PROS: Rapid development, Simple and organized interface with built-in controls, easy data-source import, easy publishing to Microsoft server, Windows Authentication

CONS: No included reporting abilities (costs extra), often requires programming when working on anything more complex, uses Silverlight client for desktop approach, can be restrictive in design needs and capabilities.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s