11 out of 19 rated this helpful Rate this topic

Visual Studio LightSwitch

Visual Studio 2010

Visual Studio LightSwitch 2011 is a development tool that helps you build business applications quickly. LightSwitch provides a simplified development environment that enables you to concentrate on the business logic instead of the application infrastructure.

Most business applications are forms-over-data applications that provide a UI for viewing, adding, and modifying data. When you use other development tools to build forms-over-data applications, much of your time is spent on repetitive tasks. You write code to interact with a database, you write code for the user interface, and you write code for the business logic. When you use LightSwitch, much of the repetitive work is done for you and, in fact, you can create a LightSwitch application without writing any code at all! For most applications, the only code you have to write is the code that only you can write: the business logic.

Features of Business Applications

Modern business applications require many features, such as search capabilities, the ability to sort and rearrange grids, and the ability to export data. LightSwitch applications have those features, and more, already built in. In addition, typical data operations such as adding, updating, saving, and deleting are also built in, as is basic data validation logic.

By using the extensibility features in LightSwitch, you can change the appearance of your applications by applying themes, by using custom controls, and by using shell extensions to change the layout. You can use the custom business types to reduce the amount of code that you write and to simplify formatting in the user interface.

Data Entities and Screens

LightSwitch simplifies the development of business applications by using data entities and screens.

Data entities, or tables, are how LightSwitch represents data. You create data entities by using the built-in application database, or by importing data from an external database, a SharePoint list, or other data source. You can create relationships between entities, even when entities are from different data sources. You can also create queries over the data by using a graphical designer, and you can further modify the queries in code.

Screens, or forms, are how LightSwitch displays data. Screens are based on predefined templates. All you have to do to bind data to a screen is specify the entities or queries to be displayed. After you create a screen, you can modify its appearance in the designer; no code is required.

Data Validation, Testing, and Deployment

You can handle basic validation in the IDE by using required fields and string lengths. For more complex validation based on business logic, you have to write code. At run time, the user interface to handle validation is built into the screens.

To test your application, just run it. You can make changes to the user interface directly in the running application. By impersonating a role under debug permissions, you can test authentication and authorization. When your application is complete, you can deploy it by using ClickOnce, which allows for silent updates in the future.

Title

Description

Getting Started with LightSwitch

Provides links to introductory and learning topics.

Projects: The Container for Your Application

Describes basic tasks for working with projects.

Data: The Information Behind Your Application

Describes the Entity Designer and related tasks.

Screens: The User Interface of Your Application

Describes the Screen Designer and related tasks.

Queries: Retrieving Information from a Data Source

Describes the Query Designer and related tasks.

Debugging: Finding and Fixing Errors

Describes basic tasks for debugging an application.

Extensions: Adding New Capabilities to LightSwitch

Describes tasks related to extensions.

Deployment: Distributing and Maintaining Your Application

Describes basic tasks for deploying an application.

Did you find this helpful?
(2000 characters remaining)
Community Content Add
Annotations FAQ
Tutorial woks fine - need to have sql express started before tutorial
It seems that my earlier issue might be related to the fact that I didn't start the sql express after I added all the tables, relationships and screens.  I re-created the project with sql express started before adding any tables and it works fine now.
First tutorial failes to build
Followed the visual patient tutorial, wihtout adding any code, get the following error when trying build - nothing to indicate what went wrong.  I am on windows 2008R2 64bit with both sql and sql express started.

------ Rebuild All started: Project: Common, Configuration: Debug Any CPU ------
Common -> c:\users\harry\documents\visual studio 2010\Projects\LSHello\LSHello\Common\Bin\Application.Common.dll
------ Rebuild All started: Project: Server, Configuration: Debug Any CPU ------
Server -> c:\users\harry\documents\visual studio 2010\Projects\LSHello\LSHello\Server\bin\Debug\Application.Server.dll
------ Rebuild All started: Project: Client, Configuration: Debug Any CPU ------
Client -> c:\users\harry\documents\visual studio 2010\Projects\LSHello\LSHello\Client\Bin\Debug\LSHello.Client.dll
------ Rebuild All started: Project: ServerGenerated, Configuration: Debug Any CPU ------
ServerGenerated -> c:\users\harry\documents\visual studio 2010\Projects\LSHello\LSHello\ServerGenerated\bin\Debug\Application.ServerGenerated.dll
------ Rebuild All started: Project: ClientGenerated, Configuration: Debug Any CPU ------
ClientGenerated -> c:\users\harry\documents\visual studio 2010\Projects\LSHello\LSHello\ClientGenerated\Bin\Debug\LSHello.ClientGenerated.dll
Begin application manifest generation
Application manifest generation completed successfully
------ Rebuild All started: Project: LSHello, Configuration: Debug Any CPU ------
Done building project "ServerGenerated.csproj" -- FAILED.
Done building project "LSHello.lsproj" -- FAILED.
I'll second that!
I agree with RDW2. Printing out sections that one is interested in is a huge PITA. I updated my VS local help and tried printing from there, but its just as painful...still printing a subtopic at a time although it is just a little quicker because its not refreshing from the internet.

I realize that you're updating the content frequently, but isn't there some way to create a nightly or weekly build of the docs in a downloadable format that can be autoposted someplace on MSDN?

Thank You, Though. Lightswitch is completely awesome and I can see that its just going to continue to get better....Woo Hoo
Dami, read what they wrote carefully!
Dami, you didn't read it right.

The version number of Lightswitch is 2011, but the Lightswitch product can slot in to Visual Studio 2010. If you read it carefully, you'll see that they only use the year 2010 in reference to VS, and the year 2011 in reference to Lightswitch. Quite logical really.
VS 2010 or VS 2011?
Make up your mind. You're calling it Visual Studio 2011 everywhere, but at the top of this and all the MSDN pages about it, it says "Visual Studio 2010".

Edit: No, it's Lightswitch 2011, which slots into Visual Studio 2010. Look carefully at what they write, and you'll see that the year 2010 is only applied to VS, and the ear 2011 is only applied to Lightswitch.
Give us a break, let us print the manual
Okay, I understand that I just downloaded the trial version of LightSwitch and there isn't a manual "in the box" . . . but at least give us the option of downloading or, at least, printing the manual as one set of information.  If I follow the link to the "manual", I get a BOL equivalent . . . but that means I am pointing and clicking a LOT and I have to have a web connection to even do that.