build and deploy lightswitch application on windows azure
DESCRIPTION
Visual Studio LightSwitch is the simplest way to build business applications for the desktop and cloud. LightSwitch simplifies the development process by letting you concentrate on the business logic, while LightSwitch handles the common tasks for you.In this session you see the demo, Which shows you end-to-end, how to build and deploy a data-centric business application using LightSwitch and deploy to Windows AzureTRANSCRIPT
Community {Technology} Update 2012
Build and Deploy LightSwitch Application on Windows Azure
K.Mohamed FaizalLead Consultant @ NCS (P) Ltd. Jan 7th 2012
Agenda
Introduction to Windows Azure Introduction to LightSwitch Build Application on LightSwitch Deploy Application to Windows Azure
About Me
15
Community {Technology} Update
Marketplace
Windows Azure Platform
Windows Azure
Compute Storage Virtual Network
Web Role
Worker Role
VM Role
Blob
Table
Queue
Connect
Traffic Manager
CDN
SQL Azure
Database Sync Service Reporting Service
• Familiar relational database model
• Built for the cloud with high availability
• Accessible via ADO, TDS, REST
• Two-way sync of SQL Azure DBs across DCs
• Enables geo-redundancy & Hybrid models
• Reporting service in the cloud
• Generate reports using familiar SSRS tools
AppFabric
Service Bus Access Control Caching
• Single place provides federated authentication and rules-driven, claims-based authorization
• Application level distributed cache for better performance
• Application expose endpoints in the cloud that can be accessed by other applications whether on-premises
“Windows Azure Platform” In One Slide
Service Bus
Access Control
Caching
Data Sync
Database
Reporting
Storage• Tables• Blob• Queu
e
Compute• Web• Worker• VM
• Connect• Traffic
Manager
Virtual Network
Types Of Cloud Environments
A smooth on-ramp to development
Built-in plumbing that handles common application requirements
Simple and flexible deployment
LightSwitch is for End User Developers
LightSwitch is for Professional Developers
LightSwitch Application Overview
•SQL Server/Express
•SQL Azure•SharePoint 2010
•ASP.NET 4.0•WCF RIA Services•Entity Framework
•Silverlight 4.0•WCF RIA Services Client
LightSwitch App Architecture
Presentation
Logic
Data
LS DLLs
IIS/Azure (Middle-
tier)
In-Browser (Mac/Windows)
Out-Of-Browser (Windows Client)
Out-Of-Browser (Windows Client)
Storage
LightSwitch Building Blocks
Screens
Entities
Queries
Business Logic
Custom WCF Services
Silverlight Controls
Data Providers
Application Themes
Application Shells
Business Types
Custom Controls
Screen Templates
LightSwitch VS Pro Ecosystem
Customer information.
Product Information
Relationship between customer and order details
Community {Technology} Update 2012Introduction to LightSwitch
Demo
Entities
Can be local (SQL Server Express) or attached (SQL Server, SQL Azure, SharePoint, WCF RIA service)
Custom business typesProvide validation and formatting
Calculated propertiesWrite code to generate value
Can create relationships within and across data sources
Can validate at the entity or property level
Screens
Variety of built in screensNew, search, details, editable grid, list and details
Always based on queriesCan use auto-generated screens for
adding/editing or create your ownDevelopers can modify screens at design-time
and runtimeGenerated screens do not expose XAML
You can use Silverlight controls you create yourself
You can add UI elements packaged as extensions
Queries
LightSwitch creates queries automaticallySelect * query is a collection, eg.
CustomerCollection
Select where query is a detail, eg. CustomerDetail
You can edit existing queriesFilter, sort, add parameters
You can create new queriesYou can base queries on other queries
Community {Technology} Update 2012
Access Control
Demo
Security in LightSwitch Apps
2 Types of Authentication
Windows Authentication
Forms Authentication (user is automatically prompted for the user
name and pw)
Users are managed within the running application
built-in administration screens available within the running
application (only users with built-in SecurityAdministrator
permission have the ability to manage users)
Security API providing access points to perform security checks
Detetmine who the current user is (this.Application.User)
Info about permissions and roles
Deployment Options
2-tier desktop applicationApplication runs entirely on user’s computer
3-tier desktop applicationUser interface runs on user’s computer
Middle-tier components run on Internet Information Services (IIS) or Windows Azure
3-tier web applicationUser interface is browser based
Middle-tier components run on IIS or Windows Azure
2-Tier Deployment
NET Framework 4 All LightSwitch Components (DLLs) SQL Server Or SQL Express
Windows Clients
Database
Clients & Database are on the same Network (LAN)
2-Tier Deployment
NET Framework 4 All LightSwitch Components (DLLs) SQL Server Or SQL Express
Windows Clients
Database
Clients & Database are on the same Network (LAN)
Direct Connection
Direct Connection
DomainName/User1
DomainName/User2
UserID=<sqlUser>;Password=<sqlPwd>
3-Tier Deployment
Silverlight 4 LightSwitch Client Application
(Desktop apps = Windows Clients
Browser apps = Mac/Windows)
Clients
Database
Clients can be on the Internet or same network
Web Server
Internet OR
Network LAN/WAN
Same network or same machine
NET Framework 4 Internet Information Services (IIS) LightSwitch Application Services SQL Server OR SQL Express
Direct ConnectionDomain\User Or SQL
user / pass
IIS Authentication: Anonymous (no login),Windows (auto login),Forms (login prompt)
3-Tier Deployment
Silverlight 4 LightSwitch Client Application
(Desktop apps = Windows Clients
Browser apps = Mac/Windows)
Clients
SQL Azure
Clients are on the Internet and connect to Windows Azure
Windows Azure
Internet
LightSwitch Application Services SQL Server
Compute• Web• Worker
SQL user / pass
IIS Authentication: Anonymous (no login),Forms (login prompt)
Community {Technology} Update 2012
Deployment
Demo
Extending LightSwitch
LightSwitch has 6 extensibility points
Installing Extensions
LightSwitch developers can install extensions via Extension Manager
Or just click on the VSIX package to install
LightSwitch Extensions are installed like any other Visual Studio extension and managed via the Extension Manager
Requirements for Building LightSwitch Extensions
Visual Studio Pro (or higher) + SP1Visual Studio LightSwitchVisual Studio SDK
For building VSIX packages
LightSwitch Extension Development Kit (coming soon)
Upload to VS Galleryhttp://visualstudiogallery.msdn.microsoft.com/
Extensibility Toolkit
http://visualstudiogallery.msdn.microsoft.com/0dfaa2eb-3951-49e7-ade7-b9343761e1d
Publishing LightSwitch App
How to publish LightSwitch App on Windows
Azure
http://
blogs.msdn.com/b/lightswitch/archive/2011/03/18/step-by-step-ho
w-to-publish-to-windows-azure-andy-kung.aspx
How to configure IIS to Host LightSwitch App
http://
blogs.msdn.com/b/bethmassi/archive/2011/03/23/deployment-gui
de-how-to-configure-a-web-server-to-host-lightswitch-applications.
aspx
@kmdfaizal
http://faizal-comeacross.blogspot.com/
K.Mohamed FaizalLead Consultant @ NCS (P) Ltd. Jan 7th 2012
http://www.facebook.com/kmdfaizal