Dave Noderer's Blog

South Florida does .NET!

  Home  |   Contact  |   Syndication    |   Login
  202 Posts | 0 Stories | 363 Comments | 28 Trackbacks

News

Twitter












Tag Cloud


Article Categories

Archives

Post Categories

Image Galleries

.NET Community

Life at the Beach

My Blog Friends

Friday, August 20, 2010 #

On Tuesday August 18th, the first publicly available beta for the Microsoft Lightswitch development tool was posted on MSDN.

For more information about this Silverlight application generator addition to Visual Studio 2010 visit: http://msdn.microsoft.com/en-us/lightswitch/default.aspx

Because it is still a beta I installed the 500mb ISO on a Windows 7 virtual pc VM which already had Visual Studio 2010. I had not spun up this VM for over 4 months so there were LOTS of updates to apply first. Although some have reported problems, mine went smoothly.

The default 512mb memory on the VM was not enough. Understandably it was very slow and when I first tried to run the generated program it timed out. So I increased the VM to 2gig and it ran much better!

For consultant time keeping, I’ve been using a classic asp website and access admin program for over 10 years. I could never justify making a change (nobody is paying for it).

I created a new Lightswitch project, both VB and C# are available:

image

I created a new datasource pointing to a SQL 2k5 server (2k5 or above is required) at my web host (http://www.Appliedi.net) where the Computer Ways timesheet data resides. Knowing that Lightswitch is based on Entity Framework and also that I’ve been meaning to do it, I added foreign key relationships on the main tables I would need. In the past this was enforced by the application originally on Access then SQL 7.

This process of adding a datasource is easy and familiar. It starts the datasource wizard:

image 

and ending up in the table / view selections for Entity Framework:

image 

Next I added a new “Screen” which brought up the data model, defaulting to Consultant but I switched to default of TimeSheetDetail by double clicking on it. This switched the view to what you see below by using the navigation on the objects which in turn is based on the foreign keys.

image

From here I could click on screen and decide on a format to display the data. I selected editable grid:

image

Running the project (no code at all so far), the program comes right up

image

I was able to actually add some hours for the day. Baked in is the relationships so selecting a consultant, for example, brings up this screen:

image

For many corporate and personal applications, this will be a great help. Unlike Access, this is .net in Visual Studio with a number of extension points.

This default screen can be customized in many ways, here is the “Customize Screen” view:

image

I have not deployed this but you get the option of web or client (it is Silverlight).

I’ll definitely expand on this over time and can see lots of applications.