The Anatomy of a LightSwitch Application Series Part 1 - Architecture Overview

The Anatomy of a LightSwitch Application Series Part 1 - Architecture Overview

Rate This
  • Comments 21

The announcement of Visual Studio LightSwitch this week has generated a lot of discussion, and as expected a number of questions about "what is LightSwitch really building under the covers?".  To help shed some light on that (sorry, couldn't resist) we're putting together a blog series that takes a more in depth look at the Anatomy of a LightSwitch application.  We'll start with this high-level architectural overview and then drill into each architectural layer and other specific topics over the coming weeks. 

Here's an outline of topics we're thinking about:

(UPDATE: In Visual Studio 2012 (LightSwitch v2) we have updated the middle-tier architecture to use OData Services. See: LightSwitch Architecture: OData)

(UPDATE: In Visual Studio 2012 Update 2 (LightSwitch v3) we have added an additional client option, HTML5. See The LightSwitch HTML Client: An Architectural Overview

With that, let's get started...

The Anatomy of a LightSwitch Application - Architecture Overview

Microsoft Visual Studio LightSwitch applications are built on a classic three-tier architecture. Each tier runs independently of the others and performs a specific role in the application. The presentation tier is responsible for human interaction with the application. Its primary concern is data visualization and editing. The logic tier processes requests from a client to fetch data, update data, or to perform other operations. This tier’s primary role is to shield direct access to the data from unwanted or invalid reads and updates. This helps to ensure the long-term integrity and security of the data. The data storage tier is responsible for durable storage of the application data.

A typical three-tier application

Designing a new three-tier application from scratch can be difficult and complex. Each tier presents a myriad of technology choices and internal system design. Each has distinct deployment and manageability concerns. Each must handle communications with the adjacent tier, and ensure secure access from trusted sources.

LightSwitch removes the complexity of building a three-tier application by making specific technology choices for you. You concentrate on the business logic and not the plumbing.

When we map the specific technologies used in LightSwitch to this architecture you find that the LightSwitch presentation tier is a Silverlight 4.0 application. It can run as a Windows desktop application or hosted in a browser. The LightSwitch logic tier exposes a set of WCF RIA DomainServices running in ASP.NET 4.0. The logic tier process can be hosted locally (on the end-user’s machine), on an IIS server, or in a Windows Azure WebRole. A LightSwitch application’s primary application storage uses SQL Server or SQL Azure and can consume data from existing SharePoint 2010 lists, databases accessible via an Entity Framework provider, and custom build WCF RIA DomainServices.

A LightSwitch 1.0 three-tier application

As you can see, a LightSwitch application is built on top of existing .NET technologies and proven architectural design patterns.


Leave a Comment
  • Please add 1 and 2 and type the answer here:
  • Post
  • Yay! This should be a fun ride.  I'm getting some popcorn.  :)

    p.s. Lightswitch is desparately needed for small businesses that need low-cost/quick solutions. Snooty developers that don't have to pay for business costs out of pocket should not be judging this!  I can't think of a small business that could not benefit from this.

  • Thanks for the feedback, Mike! We're really excited here as well. Stay tuned for lot's more content here as well as on Channel 9 & the Dev center (

  • This look really good, I'm looking forward to getting on the band waggon with this, will there or are there a Forum for this. I currently do a lot of work with ASP.NET Dynamic Data and get involved on the forum (,  I see this as something like that but with way more potential.

    I am looking forward to the Beta :)

  • Hi Sjnaugton,

    Thanks for the interest in LightSwitch! The forum is here:

    Also make sure to keep checking the Developer Center for more content and the Beta 1 download that will be available on the 23rd.


  • I'd just like to second Mike's comment. I work for a small business (<40 employees) in the water purification industry. We are currently working with half a dozen Access databases and need to a) move to SQL server to prevent data duplication and b) update the database software to cope with the large number of records currently displayed in any combo box or search result. This technology looks like an ideal intermediate step as the business grows.

  • Love it conceptually. It appears to be targeted at 'small' businesses although the 3 tier architecture would imply significant scalability. Can you clarify that? For example, is it agile enough to handle a firm with a couple hundred users, a couple hundred input forms and a hundred reports? How about 1000 users?

  • Will it support desktop applications (such as WPF) as well?

    What about customizing and adding functionality, are the class partial and can be improved?

    It's stated that LightSwitch is for the non-programmer dev.

    The question is if it can be powerful for programmers too...

    Way to go, I am waiting to start using this program (Scrum in my own computer...)

  • Also, will its designer templates be editable?

    Is it T4 templates or what.

  • Hi Jimshine,

    That's the idea, although scalability has a lot to do with the actual database server and data size as well. Stay tuned for a post on scalability.

  • Hi Shimmy,

    Check out this thread in the forums, I think Sheel answered a similar question there:

  • Is this same as selecting Silverlight business application with RIA as project template in VS2010? If yes, what is the difference between LightSwitch and selecting project template as Silverlight business app with RIA Services?

  • MikeV,

    No, the Silverlight / RIA business application templates are an entirely different animal from LightSwitch.

    While LightSwitch apps will use many of the same technologies already available in Visual Studio, the development experience, and the resultant LightSwitch applications, are considerably more prescriptive, and give you much more "for free" than the existing RIA/Silverlight templates do.

  • I see the dust rising in the distance as thousands of Access power users trample each other to be the first to use this. This will replace Access as the work-group developer's tool of choice, in the places where the "developer" is just the power user who is least afraid to try. I see a sizeable potential user-base for this tool and I can't wait to see where MS goes with it!

    I agree with Mike that there is a need for this sort of tool, a need Access and Excel have filled but without the beauty of managed code. Sure, as a professional developer I hope and believe we will always be needed, but there is a huge segment of the business-user market that needs more than a few macros will give them but way less than a complete customized solution. This is a much-needed tool to fill that gap.

  • Watched the video , read the articles and now it's time to play! And to think, I was looking at ASP MVC 3.0, yikes. This is going to get rid of a lot of the donkey work for the Accounts/CRM app that I'd planned. I do note that there will still be the need for the clever coder. It appears to be a beautiful and well thought-out enhancement to the Visual Studio Tools. Big Tick as far as I'm concerned. PS There will no doubts be some anglo/ european customisation issues!

  • Honest Appraisal?

    I'm just getting into this series. I'm a developer, one of the "snooty developers" Mike mentioned. While some part of me is dying inside while reading this, another part of me understands that this technology is sorely needed. I wouldn't compare it to the Access generation of development, but an evolution of that. Will it put developers like myself out of business? Hardly. But if successful, it will certainly have a significant impact on the development landscape of the .NET development world. The key is to embrace change, not fight it. Otherwise, you're left holding your nuts in the cold alone and confused. By nuts, I mean walnuts of course. What'd ya think I meant?

Page 1 of 2 (21 items) 12