Myth Busting Visual Studio LightSwitch

Earlier this week, at the VSLive conference in Redmond, WA (on the Microsoft campus) Jason Zander announced a new Visual Studio product that we’ve been working on – Visual Studio LightSwitch – the simplest way to build business applications for the desktop and cloud.

This is exciting for us – we’ve been working on this product in secret for some time now. Finally we are able to share this work with the world.

Of course, as can often happen, the announcement was followed up with some confusion. Since we aren’t releasing the Beta 1 bits until August 23, 2010, no one (other than the 700 people at VSLive using the hands-on-labs) can actually see LightSwitch in action and get a feel for it. As a result, there is some confusion around what LightSwitch is, what it does, and who should use it. So let me try and dispel a few myths.

Who is LightSwitch for? Who should use it?

LightSwitch is intended for anyone who needs to quickly and affordably create line-of-business applications. LightSwitch is also an ideal tool for professional developers who need to build great-looking custom applications and want to kick start the development with a business application based on the LightSwitch templates.

How is LightSwitch different than Microsoft Access?

Access provides the tools to build and maintain database applications. LightSwitch provides the tools and templates to develop line-of-business applications that can pull data from Access, SQL Server, SQL Azure, SharePoint and any data provided by a WCF RIA Service (Access is not a supported data source in Beta 1). LightSwitch applications can run on the desktop, a web server or in the cloud. As the needs and usage of the application grow, because LightSwitch applications run on the .NET Framework, and use the Visual Studio project system, they can be opened in Visual Studio 2010 Professional and higher, enabling more sophisticated customization of the application.

Can LightSwitch make LOB applications for Windows Phone 7?

LightSwitch is intended for building line-of-business applications that connect with existing applications, legacy systems, Web services, and the cloud. LightSwitch includes support for a variety of form factors, however; development for applications running on mobile devices is not supported at this time. LightSwitch supports publishing applications to the desktop, a web server, or the cloud (publish to cloud is not available in Beta 1).

Does LightSwitch use WPF for desktop applications, and Silverlight for Web applications?

LightSwitch currently creates Silverlight 4 applications. Since Silverlight 4 supports running out-of-browser, or in-browser, LightSwitch can easily generate the application form factor that you prefer.

How do I open a LightSwitch application in Visual Studio Pro?

There is no magic here. LightSwitch is a Visual Studio product. It uses the Visual Studio shell, and the Visual Studio project system. LightSwitch applications are Visual Studio applications. To open a LightSwitch application in Visual Studio 2010 Professional, simply open the .lsproj (LightSwitch Project) or .sln (Solution) file. Of course, you will need the LightSwitch runtime to support the application. If you have Visual Studio 2010 Professional (or higher) installed, simply install Visual Studio LightSwitch. The LightSwitch runtime and LightSwitch project templates will be installed and available through Visual Studio 2010.

When I define a new data source in LightSwitch, what is being created?

LightSwitch can work with several types of data sources, including Access (not available in Beta 1), SQL Server/Azure and SharePoint. If you decide to create a new data source (aka Application Data in LightSwitch lingo) you are defining a new SQL Server database. Under the covers LightSwitch uses SQL Server Express and creates a new ApplicationDatabase.mdf file for the new, local application data. You can also define new tables in other connected data sources (provided your credentials have the permissions to create tables). For example, you can connect to an existing SQL Server or SQL Azure data base, and choose the Add Table option to create a new table on your remote data source. If you don’t have the appropriate permissions, the Add Table option will not be available (as shown here).

How is LightSwitch different than WebMatrix?

WebMatrix is a tool that includes a Web server (IIS Developer Express), a database (SQL Server Compact), and programming framework (ASP.NET). WebMatrix makes it easier to create new websites from scratch, or use Microsoft’s Web Application Gallery to customize popular ASP.NET and PHP open source community applications. It is targeted at non-professional developers, primarily. Although WebMatrix seamlessly integrates with Visual Studio’s professional development tools, it’s not related to LightSwitch. In contrast, LightSwitch is targeted at professional developers looking to create custom LOB applications leveraging data from multiple sources that can be easily deployed to the desktop or cloud.

Does LightSwitch support version control?

Yes. LightSwitch comes with the Visual Studio Team Explorer installed making connecting to Team Foundation Server easy.

Does LightSwitch support custom controls?

Developers can create custom controls, themes and skins for LightSwitch applications. This is done in Visual Studio 2010 Professional and made available as a vsix installation (the Visual Studio Gallery is supported).

LightSwitch is great for developers (also overheard as ‘No it isn’t’)

Its important to understand the role LightSwitch will play in the world of a professional developer. If you are a Coder™ (make your living, or aspire to make your living writing code), LightSwitch may not be for you. Of course, you may use the LightSwitch runtime and project type inside Visual Studio 2010 Professional if you want to quickly build an LOB app or jump start some project development, but typically this isn’t you. The real user of LightSwitch is probably Code-Enabled™ (someone who has some basic coding skill – not like you – who will write or copy-and-paste code as needed to get what they need done). These are typically professionals in some industry who need apps for projects or specific needs, who you can’t be bothered with (think of the account manager who keeps asking you to build a tracking tool for them, and who you reject because you don’t have time). The reality is that there are a lot of Code-Enabled™ out there, and they will find a way to build what they need. The pain for you comes when their app “grows up” and you inherit it, are tasked with maintaining it, or worse yet, have to extend it. This is really when LightSwitch is good for developers. If the LOB app was built with LightSwitch, you are now inheriting a .NET based application, build on standard best practices (such as n-tier architecture with clear tier separation, data in SQL Server, proper data architecture, validation on the appropriate tiers, etc.). So while you may be thinking LightSwitch is not for you, it can still make your life better.

I promise more to come, including some demos. In the meantime, check out Jay Schmelzer’s The Anatomy of a LightSwitch Application Series.


Leave a Reply

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

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

Facebook photo

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

Connecting to %s