Lightswitch (under the hood)

Okay.. coming from my previous blog about Visual Studio Lightswitch I promised to put up a short demo. But since that time, a lot has already happened and many of the folks I know has already tried it. So here, in this second installment, I will show some of the things happening under the hood of Visual Studio Lightswitch.

As most know, VS Lightswitch is either a separate install or an install on top of Visual Studio 2010 that enables devs to rapidly create a pretty rich application, very easily. Reception has been mixed, ranging from some developers just shrugging it off as yet another free product that just won’t cut it as a development platform, to those who see it as a very quick way to make a buck 😉

Here in this blog, I will try to illustrate some deeper functionality that LS offers and a short look at what a VS-LS application looks like from the inside.

A Lightswitch Application basically follows the tiered architecture where you will have a UI layer, a Business layer and a Data Layer. The separation of concerns regarding where to put the code, or where the code goes, is taken care of by lightswitch and follows industry standards. Let’s take a look at all three layers.

The Client Tier or the UI Tier is generated by LS as either a desktop hosted or browser hosted application. This workspace is a combination of WCF RIA services and Silverlight 4.0. Now here comes the question, “Silverlight for desktop?”. The answer is yes, LS applications are built with Silverlight and the desktop version of your VS-LS application is basically a Silverlight OOB(Out Of Browser) application. The good thing about this, is you can use (if you have one) your existing RIA services if you create an application using VS-LS. So the basic concept here is, when your application talks to data, the “talking” happens through RIA Services.

The Middle Tier of a VS LS application is in full essence, an Entity Framework layer. VS-LS will create for you an EF layer, that takes care of talking to your datasource. IIS7 hosts the middle layer (ASP.NET 4.0), which is good news if you have already been developing using these technologies.

Now with the middle tier being an EF layer, we can say straightforward that any data source with an EF wrapper can be the data tier of a Light-Switch application.

The Data Tier of a VS LS application will basically be your datasource. As mentioned, any datasource that can be wrapped with an EF layer of can interact with EF can be a datasource whether it be SQL Server, Azure or Sharepoint.

Alright! With all that said and done, wait for my next blog on Visual Studio Lightswitch and I’ll show how to create a simple application, and we will drill down into each layer to show just how powerful VS-LS is right now.

Also, we will try to answer a few of the frequently asked questions that I have come along with like:

  1. Can I do TDD with LightSwitch?
  2. How do I connect to a different datasource other than SQL Server?
  3. Can I put my code in some form of code repository or version control?
  4. How can I change the look and feel of my LightSwitch Application?
  5. How far or how deep can I customize the Screens?
  6. How far or how deep can I customize the code?
Advertisements
This entry was posted in Computers and Internet. Bookmark the permalink.

Leave a Reply

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

WordPress.com Logo

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

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s