Back from the Depths: My Work on Visual Studio LightSwitch

I’m back.  And this time for good.  I promise.

During the past couple of years, I’ve been working on a cool new developer tool product called Visual Studio LightSwitch.  If you haven’t heard of it, Jason Zander has a good blog post about it which you should read.  Basically, it’s a new rapid application development SKU in Visual Studio that lets you build LOB applications for the desktop or web.  And last week it was finally publicly announced with a beta due to drop on August 23.

This has been a fun product to work on and I’m excited for the world to see it.  Going forward in this blog, I will be writing about my experiences in using LightSwitch to build applications as well as some detailed information on the features areas for which I am responsible (such as authentication and authorization).  I plan to offer tips and tricks on how you can best use LightSwitch to create your applications.  And most of all, I’d love to respond to any of your questions on LightSwitch.

Comments (2)

  1. josh reuben says:

    How extensible is lightswitch and what are the extension points?

    when you hit the wall, what is the process of swapping out components (eg replace part of the service tier, add reliable messaging etc)?

    how abstracted is the experience – once I start customizing the code, can I still use the code generation?

    Does Workflow 4.0 play any role in the dev experience?

    What is the level of modeling support ? – eg can I extend using Visual Studio Feature Builder?

  2. Matt Thalman says:

    @josh reuben:

    Great questions, Josh.

    [How extensible is lightswitch and what are the extension points?]

    LightSwitch has been architected to have numerous extension points.  This allows for the ability to create a completely new shell for the runtime application or defining a new theme (with customized colors, fonts etc.).  It also allows developers to define new application data types.  For example, LightSwitch will ship with an EmailAddress and PhoneNumber data type.  These semantic types can provide a custom UI when presented on a screen and have their own validation.  Another extension point would be the creation of screen templates that can be selected in the designer.  These are just a few examples.  Be sure to check out the LightSwitch Forums at…/vslightswitch.  I'm sure there will probably be an Extensibility forum on there at some point.

    [when you hit the wall, what is the process of swapping out components?]

    We've made a conscious effort to provide what we call "escape hatches" that allow the developer to manually do something that LightSwitch does not provide functionality for.  For example, we provide a designer to allow a developer to model a query.  The designer, however, does not support all possible queries that you may need.  So we allow you to drop into code and write your own query logic in LINQ, for example.  Another case would be if you needed to have a custom authentication provider.  Our authentication logic is built on top of ASP.NET so can plug your own MembershipProvider, RoleProvider, etc. in the web.config and LightSwitch will just run using those custom providers.

    [how abstracted is the experience – once I start customizing the code, can I still use the code generation?]

    Absolutely.  LightSwitch code generation produces partial classes where you can write your custom logic.  The other portion of the partial class containing all the real generated code is produced in a file that is essentially hidden from your view.  Your hookpoints in these generated classes are partial methods that you implement.

    [Does Workflow 4.0 play any role in the dev experience?]

    The first version of LightSwitch does not make use of WWF.

    [What is the level of modeling support?]

    LightSwitch provides its own designers which produce the model that is consumed by the LightSwitch runtime.  It also creates all the generated code necessary for the application to run.  So when modeling LightSwitch concepts like tables and screens, the LightSwitch designers should be used.  Of course, for any of your own custom code you are free to use whatever tools you wish to produce that code.