Alessandro Del Sole's Blog

/* A programming space about Microsoft® .NET® */
posts - 159, comments - 0, trackbacks - 0

My Links

News

Your host

This is me! This space is about Microsoft® .NET® and Microsoft® Visual Basic development. Enjoy! :-)

These postings are provided 'AS IS' for entertainment purposes only with absolutely no warranty expressed or implied and confer no rights.

Microsoft MVP

My MVP Profile

I'm a VB!

Watch my interview in Seattle

My new book on VB 2015!

Pre-order VB 2015 Unleashed Pre-order my new book "Visual Basic 2015 Unleashed". Click for more info!

My new book on LightSwitch!

Visual Studio LightSwitch Unleashed My book "Visual Studio LightSwitch Unleashed" is available. Click the cover!

Your visits

Follow me on Twitter!

CodePlex download Download my open-source projects from CodePlex!

Article Categories

Archives

Post Categories

.NET Framework

Blogroll

Help Authoring

Microsoft & MSDN

Setup & Deployment

Visual Basic 2005/2008/2010

Rapid application development with Visual Studio LightSwitch

Probably many of you already know that recently Microsoft announced the first beta of a new product in the Visual Studio family, called Visual Studio LightSwitch that is publicly available since August 23rd. In this blog post I'm going to make an overview of LightSwitch with a few words and some pictures.

What Visual Studio LightSwitch Is (and my personal thought for VB 6 developers)

Visual Studio LightSwitch is an integrated development environment for rapidly developing Line Of Business Applications. Rapid because the pipeline is: "I create my data -> I define my screens -> LightSwitch prepares the infrastructure -> I just press F5 and get a full application even with no code". Maybe this is familiar to you if you ever used Access/VBA to develop data-centric apps (although LightSwitch is absolutely not an Access replacement) and this is an important opportunity for VB 6 developers to migrate to the most modern .NET technologies fast.

Who should use it

VisualStudio LightSwitch is typically for:

  • small companies that do not need to develop deeply complex applications
  • developers who are not expert or who also are, but that need to be productive quickly

What LightSwitch uses

LightSwitch applications take advantage, behind the scenes, modern technologies and advanced patterns although the developer is not required to know this. It uses: Silverlight 4, WCF RIA Services, SQL Server Express, SharePoint 2010, SQL Azure, MVVM pattern, N-Tier architecture.

How it works

Start Splash screen:

The Start Page and the environment look similar to Visual Studio 2010:

It's easy to choose what kind of app you want to create, since you just have 2 choices: VB or C#:

First you decide how to create a data source, starting from scratch or connecting to an existing data source (such as SQL Server, SharePoint 2010, WCF RIA Services):

Imagine you start from scratch by creating a new table. You can notice new business data types specific for email addresses and phone numbers. These are important because the offer built-in data validation features (the Italian sentence drawn on next picture says that there are 2 new types):

Once you have your data, you can create screens. There is a number of default templates. First, you select a screen template in order to show a list of elements:

Next, you need a screen for creating and adding new elements:

The designer will show how the screen is composed, listing command controls and data-bound controls:

 

You just press F5 and get your application working:

This is nothing but a Silverlight 4 application that is running on the desktop as an "Out-of-browser" application, storing data into a SQL Server database that LightSwitch generated for the application. Also notice:

  1. Ribbon control containing main commands
  2. Task tab containing navigation commands between screens
  3. automatic data validation, without writing a single line of code

Then we can show the list of items (the Italian sentences drawn on the picture say that exporting to Excel and the search field are provided by LightSwitch):

The screen includes by default:

  1. search capabilities
  2. exporting data to Microsoft Excel
  3. data paging at the bottom of the screen

If you want to add a new table to be associated to the first one, adding a relationship is also very easy:

 

By default LightSwitch apps are 2-tier applications but you can move to 3-tier desktop (passing through IIS) or 3-tier in-browser:

 

When you use the in-browser option, the Silverlight app runs inside your default Web browser:

Visual Studio LightSwitch is absolutely not only what I described here. You can in fact write also complex code, such as LINQ queries, setting custom validations, customizing the user interface at runtime, accessing SharePoint, creating enumerations inside tables, interacting with Azure. In some next post I will cover some more specific topics related to this new exciting tool. For now be sure to periodically check out the LightSwitch Developer Center, where you can find a lot of learning materials.

Alessandro

Print | posted on mercoledì 25 agosto 2010 18:20 | Filed Under [ Visual Studio 2010 Visual Basic Silverlight/Windows Phone Visual Studio LightSwitch ]

Feedback

No comments posted yet.

Post Comment

Title  
Name  
Email
Url
Comment   
Please add 1 and 5 and type the answer here:

Powered by:
Powered By Subtext Powered By ASP.NET