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
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.
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…
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.
Are all LOB applications built bydevelopers? 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
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.
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
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)
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
LightSwitch Architecture Screens Methods Controls Submit Pipeline Queries Data Workspace Data Workspace Client Tier Middle Tier Data Access
LightSwitch Building Blocks LightSwitch VS Pro Ecosystem
Application StructureFolder UseClient Screens and Client CodeCommon Code Common to Client and ServerData Data ModelServer Server specific code
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
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
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
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
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….
LightSwitch Extension Types Silverlight Controls Custom Data Screen Sources Templates Business Shell Types Themes
Extension ProjectsProject Purpose Contains client implementations that should be deployed with a LightSwitch application but are notClient 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, metadataCommon loaders and validators. Contains implementations for design time integrated development environment (IDE) operations. ForDesign example, a screen template. Contains server implementations that should be deployed with a LightSwitch application but are notServer 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
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.
Creating a Theme Extension We will create a theme Modify few resources Test it against a simple application
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
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
BooksBeginning Microsoft Visual Microsoft Visual Studio Pro Visual StudioStudio LightSwitch LightSwitch Unleashed LightSwitch 2011Development Alessandro Del Sole DevelopmentIstvan Novak Yann Duran, Tim Leung
Thank You and Follow-up Contact: http://blog.boulosdib.com @boulosdib