Extending Lightswitch Applications
Upcoming SlideShare
Loading in...5
×
 

Extending Lightswitch Applications

on

  • 2,766 views

Presentation given to New York City .Net Developers on April 19, 2012.

Presentation given to New York City .Net Developers on April 19, 2012.

http://www.nycdotnetdev.com/EventDetail.aspx?f=list&event=4/19/2012

Statistics

Views

Total Views
2,766
Views on SlideShare
2,765
Embed Views
1

Actions

Likes
0
Downloads
20
Comments
0

1 Embed 1

https://www.linkedin.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Extending Lightswitch Applications Extending Lightswitch Applications Presentation Transcript

    • Boulos Dib April 19, 2012NYC .Net User Group
    • 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.
    • 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