2. Boulos Dib - @boulosdib
Independent Consultant – Napeague Inc.
Software Developer since 1983
First Commercial Personal Computer 1980 – TRS-80 III
First Z80 based product (EPROM based Protocol Adaptor – 1984)
First Commercial PC-DOS product (Telex on IBM PC, 50 Baud – 1985)
Started 16-bit Windows Development using Win 3.x
Used: 8080/Z80, 68xxx, PDP/RSX,VAX-VMS and x86 (C/C++/C#)
Develop in: ASP.Net, SilverLight, Adobe Flex, SharePoint, SQL Server,
PowerShell, Exchange, Active Directory, Javascript, HTML, CSS and…
Co-organizer of NYC XAML Meetup and New York Windows Phone User
Group.
Speaker and Volunteer at local user groups .
I also have a life not touched by Computers:
Favorite sport – Windsurfing
Favorite hobby – Guitar Playing, Electric & Acoustic.
3. Agenda
Introduction to Visual Studio LightSwitch.
Create Simple Out-of-the-box LightSwitch Application
Survey Extensibility Model and Options
Demos
Consume Silverlight Custom Control
Consume LightSwitch Custom Control
Consume LightSwitch Extension
Create a LightSwitch Extension(s)
Wrap-up
4. Assumptions
Familiarity with .Net Development.
You can develop a simple application in C# (or VB.Net)
using Visual Studio (Demo with C#).
Have some understanding of Silverlight.
5. What is Visual Studio LightSwitch
Simplest Development Environment for creating Line
Of Business Applications (LOB).
Yeah, we heard that before, didn’t we?
Microsoft Access, VB, C# etc…
6. Line of Business Applications
Wikipedia says:
"line-of-business application" is one of the set of critical
computer applications perceived as vital to running an
enterprise.
I say:
Line of Business application is one of the set of unique,
custom and potentially critical computer applications
perceived as vital to running an enterprise.
7. Are all LOB applications built by
developers?
Based on my experience: NOT!!!
Introducing: Citizen Developers
Gartner Says *
Citizen Developers Will Build at Least
25 Percent of New Business
Applications by 2014
http://www.gartner.com/it/page.jsp?id=1744514
8. What is Visual Studio LightSwitch
Simplest Development Environment for creating Line
Of Business Applications .
Able to consume data from Databases, SharePoint,
Clouds, WCF RIA Services and OData (VS-11 Beta).
Can run as a web or desktop application
LightSwitch Web Applications can be deployed on
local or remote IIS, as well as in Windows Azure
WebRole.
9. 2 Types of LightSwitch Developers
Development IN LightSwitch - Superset of Citizen Devs
Uses Visual Studio LightSwitch 2010
Write Data Driven LightSwitch Applications
Uses Silverlight and LightSwitch Controls Written by Microsoft, 3rd
Party Vendors and the community.
Development FOR LightSwitch- Professional Developers
Visual Studio Professional 2010 or greater
Visual Studio LightSwitch 2010
Write Silverlight Custom Controls
Write LightSwitch Controls and Extensions
10. Why LightSwitch?
Simple(r) development tool.
Silverlight/Windows based infrastructure
Advanced development skills not required to build
simple data-driven applications.
Easy deployment to IIS and Azure
Connectivity to SharePoint
Consumer of SQL Server and Other Databases
Consumer of almost any data source via custom WCF
RIA Services (and with VS2011, OData)
11. LightSwitch Development
Start Refine Extend
Describe your data Author business logic Explore ecosystem
Create screens for Customize screen Create Custom
common tasks layouts Silverlight Controls
Integrate With Custom
Define custom queries
Data Sources
12. LightSwitch Architecture
Screens Methods Controls Submit Pipeline Queries
Data Workspace Data Workspace
Client Tier Middle Tier Data Access
14. Application Structure
Folder Use
Client Screens and Client Code
Common Code Common to Client
and Server
Data Data Model
Server Server specific code
15. Demo – Simple LightSwitch Application
Data and Screens
Screens are automatically generated based on entities.
Queries for both Entities and Screens
Business Logic
Demo
Simple LightSwitch Application
16. Beyond Simple LightSwitch Development
Even with LightSwitch, developers can access
LightSwitch APIs, Silverlight and the .Net Framework
Including
Custom Screen Layouts
Save Pipeline, Validation & Access Control Hooks
Customize Complex and Composite LINQ Queries (i.e.
EntityName_All EntityName_Single)
Client and Server Project Code
COM Interop
Publish to IIS or Windows Azure
17. Extending LightSwitch
Utilize .Net Assemblies
Incorporate Silverlight Controls
Add LightSwitch Extensions
Amazing Third Party Extensions
Great Open Source and Community Driven Extensions
Roll Your Sleeves and Build your own
18. Requirements for Building Extensions
Visual Studio Pro or Ultimate + SP1
http://www.microsoft.com/visualstudio/en-
us/products/2010-editions
Visual Studio LightSwitch
http://www.microsoft.com/visualstudio/en-us/lightswitch
Visual Studio 2010 SP1 SDK (Needed to build VSIX
packages)
http://www.microsoft.com/download/en/details.aspx?id=218
35
LightSwitch Extensibility Toolkit
http://visualstudiogallery.msdn.microsoft.com/0dfaa2eb-
3951-49e7-ade7-b9343761e1d2
19. Extensions - Ecosystem
You do not need to build extensions, there are many
available and the list is growing.
Vendors
ComponentOne - OLAP for LightSwitch
DevExpress – DXEditors & XtraReports for LightSwitch
FirstFloor – Document Toolkit for LightSwitch
Infragistics – NetAdvantage for Visual Studio LightSwitch
Telerik – Rad Controls for Silverlight
RSSBus – Data Providers for: Google, PowerShell, Facebook,
Quickbooks, Salesforce, Sharepoint, Twitter
Community Driven
Look in the Gallery….
20. LightSwitch Extension Types
Silverlight
Controls
Custom Data Screen
Sources Templates
Business
Shell
Types
Themes
21. Extension Projects
Project Purpose
Contains client implementations that should be deployed with a LightSwitch application but are not
Client
found in the Common project. For example, controls, shells, and themes.
Contains implementations necessary during the debugging of a LightSwitch application. For example,
Client.Design
control images or custom property editors for the runtime screen designer.
Contains implementations that are common to both the client and the server. For example, metadata
Common
loaders and validators.
Contains implementations for design time integrated development environment (IDE) operations. For
Design
example, a screen template.
Contains server implementations that should be deployed with a LightSwitch application but are not
Server
found in the Common project. For example, data sources.
Project Purpose
.Lspkg .Lspkg packages the above five projects so that LightSwitch can unpack and reference them when the
package is installed
.Vsix .Vsix project packages the generated .Lspkg file into a .Vsix package so that it can be added to
LightSwitch through the Extension Manager
22. Using Extensions
Installing Extensions
Manually double-clicking a VSIX package.
Extension Manager Within Visual Studio Pro ++
Visual Studio RESTART almost always required.
For Shell and Theme Extensions:
Activate Extension by Opening Project Properties and
check the Extensions tab.
To Apply a theme or a shell, Open the same Project
Properties and theme or shell in the General properties.
23. Creating a Theme Extension
We will create a theme
Modify few resources
Test it against a simple application
24. Using Silverlight Custom Controls
Easier to use than writing
Do not know anything about LightSwitch
There 2 possibilites
Build a control for a specific entity (VM) and bind it to a
specific entity - less code but not re-usable. Can not be
used for any other entity or data.
Build a control and bind the code in the LightSwitch
code – More LightSwitch code but Silverlight Control
can be re-used across screens and applications.
Demo – based on Code Magazine article by LightSwitch
team member Karol Zadora-Przylecki
25. References - Sites
Beth Massi
http://blogs.msdn.com/b/bethmassi/
Andrew Brust – Microsoft LightSwitch White Papers
http://bit.ly/pjD6Ke
LightSwitch Community Site – Michael Washington
http://lightswitchhelpwebsite.com/
Jan Van Der Haegen
http://janvanderhaegen.wordpress.com/extensionsmadeeasy/
Code Magazine July/August 2011
Using Custom Controls to Enhance LightSwitch Application UI by
Karol Zadora-Przylecki
Visual Studio Gallery
http://visualstudiogallery.msdn.microsoft.com/site/search
26. Books
Beginning Microsoft Visual Microsoft Visual Studio Pro Visual Studio
Studio LightSwitch LightSwitch Unleashed LightSwitch 2011
Development Alessandro Del Sole Development
Istvan Novak
Yann Duran, Tim Leung
27. Thank You and Follow-up
Contact:
http://blog.boulosdib.com
@boulosdib