light-up-your-out-of-the-box lightswitch application
DESCRIPTION
LightSwitch Extensions. How to light up your out-of-the-box LightSwitch Application. Presented at CodeCamp NYC 2011-10-01 at Pace University Park Row.TRANSCRIPT
![Page 1: Light-up-your-out-of-the-box LightSwitch Application](https://reader034.vdocuments.net/reader034/viewer/2022051609/547cf23b5906b561378b4606/html5/thumbnails/1.jpg)
Boulos Dib
October 1, 2011
![Page 2: Light-up-your-out-of-the-box LightSwitch Application](https://reader034.vdocuments.net/reader034/viewer/2022051609/547cf23b5906b561378b4606/html5/thumbnails/2.jpg)
Boulos Dib - @boulosdib Independent Consultant – Napeague Inc. Software Development since 1983 First Personal Computer 1980 – TRS-80 III First Z80 based product (EPROM based Protocol Adpator – 1984) First Commercial PC-DOS product (Telex on IBM PC, 50 Baud – 1985) Started 16-bit Windows Development using Win 3.1 Developed on: 8080/Z80, 68xxx, PDP/RSX,VAX-VMS and x86/x64
(C/C++/C#) Develop in: ASP.Net, SilverLight, SharePoint I also have a life
Favorite sport – Windsurfing Favorite hobby – Playing my sunburst Fender Stratocaster+ guitar. Favorite guitar players
Wes Montgomery, Larry Carlton and Ritchie Blackmore (Deep Purple, Rainbow)
![Page 3: Light-up-your-out-of-the-box LightSwitch Application](https://reader034.vdocuments.net/reader034/viewer/2022051609/547cf23b5906b561378b4606/html5/thumbnails/3.jpg)
Thank You – Marquee Sponsor
![Page 4: Light-up-your-out-of-the-box LightSwitch Application](https://reader034.vdocuments.net/reader034/viewer/2022051609/547cf23b5906b561378b4606/html5/thumbnails/4.jpg)
Thank You – Platinum Sponsor
![Page 5: Light-up-your-out-of-the-box LightSwitch Application](https://reader034.vdocuments.net/reader034/viewer/2022051609/547cf23b5906b561378b4606/html5/thumbnails/5.jpg)
Thank You – Platinum Sponsor
![Page 6: Light-up-your-out-of-the-box LightSwitch Application](https://reader034.vdocuments.net/reader034/viewer/2022051609/547cf23b5906b561378b4606/html5/thumbnails/6.jpg)
Thank You – Gold Sponsor
![Page 7: Light-up-your-out-of-the-box LightSwitch Application](https://reader034.vdocuments.net/reader034/viewer/2022051609/547cf23b5906b561378b4606/html5/thumbnails/7.jpg)
Thank You – Gold Sponsor
![Page 8: Light-up-your-out-of-the-box LightSwitch Application](https://reader034.vdocuments.net/reader034/viewer/2022051609/547cf23b5906b561378b4606/html5/thumbnails/8.jpg)
Thank You – Gold Sponsor
![Page 9: Light-up-your-out-of-the-box LightSwitch Application](https://reader034.vdocuments.net/reader034/viewer/2022051609/547cf23b5906b561378b4606/html5/thumbnails/9.jpg)
Thank You – Gold Sponsor
![Page 10: Light-up-your-out-of-the-box LightSwitch Application](https://reader034.vdocuments.net/reader034/viewer/2022051609/547cf23b5906b561378b4606/html5/thumbnails/10.jpg)
Thank You – Gold Sponsor
![Page 11: Light-up-your-out-of-the-box LightSwitch Application](https://reader034.vdocuments.net/reader034/viewer/2022051609/547cf23b5906b561378b4606/html5/thumbnails/11.jpg)
Thank You – Gold Sponsor
![Page 12: Light-up-your-out-of-the-box LightSwitch Application](https://reader034.vdocuments.net/reader034/viewer/2022051609/547cf23b5906b561378b4606/html5/thumbnails/12.jpg)
Thank You – Silver Sponsors
![Page 13: Light-up-your-out-of-the-box LightSwitch Application](https://reader034.vdocuments.net/reader034/viewer/2022051609/547cf23b5906b561378b4606/html5/thumbnails/13.jpg)
Thank You
Greg Shackles For creating the Code Camp Mobile
App
For Providing me with the raw data for my sample
![Page 14: Light-up-your-out-of-the-box LightSwitch Application](https://reader034.vdocuments.net/reader034/viewer/2022051609/547cf23b5906b561378b4606/html5/thumbnails/14.jpg)
Agenda LightSwitch Overview
Demo Simple OOTB LightSwitch Application
Survey Extensibility Model and Options
Demos
Consume Silverlight Extension
Consume Silverlight Custom Control
Create a LightSwitch Theme Extension
Wrap-up
![Page 15: Light-up-your-out-of-the-box LightSwitch Application](https://reader034.vdocuments.net/reader034/viewer/2022051609/547cf23b5906b561378b4606/html5/thumbnails/15.jpg)
Assumptions Familiarity with .Net Development.
You can develop a simple application in C# (or VB.Net) using Visual Studio.
Have some understanding of Silverlight.
![Page 16: Light-up-your-out-of-the-box LightSwitch Application](https://reader034.vdocuments.net/reader034/viewer/2022051609/547cf23b5906b561378b4606/html5/thumbnails/16.jpg)
What is Visual Studio LightSwitch Simplest Development Environment for creating Line
Of Business Applications (LOB)
Able to consume data from Databases, SharePoint, and WCF RIA Services.
Can run as a web application or as a desktop application
LightSwitch Web Applications can be deployed locally or in Windows Azure WebRole.
![Page 17: Light-up-your-out-of-the-box LightSwitch Application](https://reader034.vdocuments.net/reader034/viewer/2022051609/547cf23b5906b561378b4606/html5/thumbnails/17.jpg)
Why LightSwitch? Simple(r) development tool.
Silverlight based infrastructure
Advanced development skills not required to build applications.
Based on Entity Framework
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.
![Page 18: Light-up-your-out-of-the-box LightSwitch Application](https://reader034.vdocuments.net/reader034/viewer/2022051609/547cf23b5906b561378b4606/html5/thumbnails/18.jpg)
LightSwitch Development
Start
Describe your data
Create screens for common tasks
Refine
Author business logic
Customize screen layouts
Define custom queries
Extend
Explore ecosystem
Create Custom Silverlight Controls
Integrate With Custom Data Sources
![Page 19: Light-up-your-out-of-the-box LightSwitch Application](https://reader034.vdocuments.net/reader034/viewer/2022051609/547cf23b5906b561378b4606/html5/thumbnails/19.jpg)
LightSwitch Architecture
Methods Controls Screens
Data Workspace
Submit Pipeline Queries
Data Workspace
Data Access Middle Tier Client Tier
![Page 20: Light-up-your-out-of-the-box LightSwitch Application](https://reader034.vdocuments.net/reader034/viewer/2022051609/547cf23b5906b561378b4606/html5/thumbnails/20.jpg)
LightSwitch Building Blocks LightSwitch VS Pro Ecosystem
![Page 21: Light-up-your-out-of-the-box LightSwitch Application](https://reader034.vdocuments.net/reader034/viewer/2022051609/547cf23b5906b561378b4606/html5/thumbnails/21.jpg)
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
![Page 22: Light-up-your-out-of-the-box LightSwitch Application](https://reader034.vdocuments.net/reader034/viewer/2022051609/547cf23b5906b561378b4606/html5/thumbnails/22.jpg)
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
![Page 23: Light-up-your-out-of-the-box LightSwitch Application](https://reader034.vdocuments.net/reader034/viewer/2022051609/547cf23b5906b561378b4606/html5/thumbnails/23.jpg)
Extending LightSwitch Utilize .Net Assemblies
Incoporate Silverlight Controls
Add LightSwitch Extensions
Amazing Third Party Extensions
Great Open Source and Community Driven Extensions
Roll Your Sleeves and Build your own
![Page 24: Light-up-your-out-of-the-box LightSwitch Application](https://reader034.vdocuments.net/reader034/viewer/2022051609/547cf23b5906b561378b4606/html5/thumbnails/24.jpg)
Requirements for Building Extensions
Visual Studio Pro or Ultimate + SP1
Visual Studio LightSwitch
Visual Studio SDK
Needed to build VSIX packages
LightSwitch Extension Toolkit
![Page 25: Light-up-your-out-of-the-box LightSwitch Application](https://reader034.vdocuments.net/reader034/viewer/2022051609/547cf23b5906b561378b4606/html5/thumbnails/25.jpg)
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….
![Page 26: Light-up-your-out-of-the-box LightSwitch Application](https://reader034.vdocuments.net/reader034/viewer/2022051609/547cf23b5906b561378b4606/html5/thumbnails/26.jpg)
LightSwitch Extension Types Silverlight Controls
Screen Templates
Business Types
Themes
Shell
Custom Data Sources
![Page 27: Light-up-your-out-of-the-box LightSwitch Application](https://reader034.vdocuments.net/reader034/viewer/2022051609/547cf23b5906b561378b4606/html5/thumbnails/27.jpg)
Extension Projects Project Purpose
Client Contains client implementations that should be deployed with a LightSwitch application but are not found in the Common project. For example, controls, shells, and themes.
Client.Design Contains implementations necessary during the debugging of a LightSwitch application. For example, control images or custom property editors for the runtime screen designer.
Common Contains implementations that are common to both the client and the server. For example, metadata loaders and validators.
Design Contains implementations for design time integrated development environment (IDE) operations. For example, a screen template.
Server Contains server implementations that should be deployed with a LightSwitch application but are not 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
![Page 28: Light-up-your-out-of-the-box LightSwitch Application](https://reader034.vdocuments.net/reader034/viewer/2022051609/547cf23b5906b561378b4606/html5/thumbnails/28.jpg)
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.
![Page 29: Light-up-your-out-of-the-box LightSwitch Application](https://reader034.vdocuments.net/reader034/viewer/2022051609/547cf23b5906b561378b4606/html5/thumbnails/29.jpg)
Creating a Theme Extension We will create a theme
Modify few resources
Test it against a simple application
![Page 30: Light-up-your-out-of-the-box LightSwitch Application](https://reader034.vdocuments.net/reader034/viewer/2022051609/547cf23b5906b561378b4606/html5/thumbnails/30.jpg)
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
![Page 31: Light-up-your-out-of-the-box LightSwitch Application](https://reader034.vdocuments.net/reader034/viewer/2022051609/547cf23b5906b561378b4606/html5/thumbnails/31.jpg)
References Andrew Brust – LightSwitch White Papers
http://bit.ly/pjD6Ke
Michael Washington
http://lightswitchhelpwebsite.com/
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