Skip to main content

Exploring LightSwitch Architecture

What is LightSwitch? Microsoft Visual Studio LightSwitch is a development environment designed to simplify and shorten the development of businesses applications. Regardless of your development skills—whether you’re a beginner or an experienced developer—LightSwitch enables you to quickly create professional-quality business applications and data services.

LightSwitch makes it easy to create data-centric business applications that can consume a variety of data sources and create clients that can run on a variety of devices. With LightSwitch, your application can point to an existing data source—or databases that are automatically created—without the need to write plumbing code. LightSwitch can aggregate multiple data sources and exposes a set of OData service automatically.

For the user interfaces, LightSwitch provides screens that are based on predefined templates that you can customize. They allow you to display data automatically by simply specifying which elements you want to show. You can create rich desktop clients that are optimized for navigating large amounts of data with a mouse and keyboard, and you can create HTML5-based clients that are optimized for touch-enabled modern mobile devices. The screens are customizable which means you can use third-party controls and extensions or roll your own.

For the business logic, LightSwitch allows you to do simple validation such as required fields, formatting, and minimum numeric values. But LightSwitch also gives developers the ability to write more complex business logic code for scenarios like controlling changes to a data source or performing authorization operations.

Go deeper and explore the architecture of a LightSwitch application. LightSwitch applications are built on a classic three-tier architecture, on top of existing .NET technologies and proven architectural design patterns. LightSwitch applications can be deployed to Windows Azure, or hosted on your own web server. Optionally, LightSwitch apps can be hosted in Office 365 / SharePoint 2013 and work with SharePoint assets. 

See how LightSwitch works under the covers.

LightSwitch Architecture

  • Anatomy of a LightSwitch Application

    Read this multi-part article series that explains the layered architecture of LightSwitch applications.

  • The LightSwitch HTML Client: An Architectural Overview

    In Visual Studio 2012 Update 2, LightSwitch provides an additional HTML client option. See how the view layer was architected in terms of the standards-based HTML5 model.

  • LightSwitch Architecture: OData

    In Visual Studio 2012, LightSwitch data services publish OData feeds and LightSwitch clients can consume OData feeds. This is an implementation change from LightSwitch 2011 where we used WCF RIA Services as the data protocol between client and server.

  • A New API for LightSwitch Server Interaction: The ServerApplicationContext

    In Visual Studio 2012 Update 2, LightSwitch added a simple but powerful API to the middle tier to address the need to write custom services against the LightSwitch data and business logic. Among its many uses, the API allows you to write custom reporting dashboards, kick off LightSwitch middle-tier workflows, and provide custom services support such as WebAPI.

  • SharePoint Hosting & Authentication Options for LightSwitch

    In Visual Studio 2012 Update 2, LightSwitch provides the option to deploy to Office 365 / SharePoint 2013 and work with SharePoint assets and authentication. Read more about the supported hosting models.