34
Community {Technology} Update 2012 Build and Deploy LightSwitch Application on Windows Azure K.Mohamed Faizal Lead Consultant @ NCS (P) Ltd. Jan 7 th 2012

Build and Deploy LightSwitch Application on Windows Azure

Embed Size (px)

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 Azure

Citation preview

Page 1: Build and Deploy LightSwitch Application on Windows Azure

Community {Technology} Update 2012

Build and Deploy LightSwitch Application on Windows Azure

K.Mohamed FaizalLead Consultant @ NCS (P) Ltd. Jan 7th 2012

Page 2: Build and Deploy LightSwitch Application on Windows Azure

Agenda

Introduction to Windows Azure Introduction to LightSwitch Build Application on LightSwitch Deploy Application to Windows Azure

Page 3: Build and Deploy LightSwitch Application on Windows Azure

About Me

15

Community {Technology} Update

Page 4: Build and Deploy LightSwitch Application on Windows Azure

Marketplace

Windows Azure Platform

Page 5: Build and Deploy LightSwitch Application on Windows Azure

Windows Azure

Compute Storage Virtual Network

Web Role

Worker Role

VM Role

Blob

Table

Queue

Connect

Traffic Manager

CDN

Page 6: Build and Deploy LightSwitch Application on Windows Azure

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

Page 7: Build and Deploy LightSwitch Application on Windows Azure

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

Page 8: Build and Deploy LightSwitch Application on Windows Azure

“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

Page 9: Build and Deploy LightSwitch Application on Windows Azure

Types Of Cloud Environments

Page 10: Build and Deploy LightSwitch Application on Windows Azure

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

Page 11: Build and Deploy LightSwitch Application on Windows Azure

LightSwitch Application Overview

Page 12: Build and Deploy LightSwitch Application on Windows Azure

•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

Page 13: Build and Deploy LightSwitch Application on Windows Azure

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

Page 14: Build and Deploy LightSwitch Application on Windows Azure

Customer information.

Product Information

Relationship between customer and order details

Page 15: Build and Deploy LightSwitch Application on Windows Azure

Community {Technology} Update 2012Introduction to LightSwitch

Demo

Page 16: Build and Deploy LightSwitch Application on Windows Azure
Page 17: Build and Deploy LightSwitch Application on Windows Azure

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

Page 18: Build and Deploy LightSwitch Application on Windows Azure

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

Page 19: Build and Deploy LightSwitch Application on Windows Azure

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

Page 20: Build and Deploy LightSwitch Application on Windows Azure

Community {Technology} Update 2012

Access Control

Demo

Page 21: Build and Deploy LightSwitch Application on Windows Azure

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

Page 22: Build and Deploy LightSwitch Application on Windows Azure

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

Page 23: Build and Deploy LightSwitch Application on 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)

Page 24: Build and Deploy LightSwitch Application on 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)

Direct Connection

Direct Connection

DomainName/User1

DomainName/User2

UserID=<sqlUser>;Password=<sqlPwd>

Page 25: Build and Deploy LightSwitch Application on Windows Azure

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)

Page 26: Build and Deploy LightSwitch Application on Windows Azure

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)

Page 27: Build and Deploy LightSwitch Application on Windows Azure

Community {Technology} Update 2012

Deployment

Demo

Page 28: Build and Deploy LightSwitch Application on Windows Azure

Extending LightSwitch

LightSwitch has 6 extensibility points

Page 29: Build and Deploy LightSwitch Application on Windows Azure

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

Page 30: Build and Deploy LightSwitch Application on Windows Azure

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/

Page 31: Build and Deploy LightSwitch Application on Windows Azure

Extensibility Toolkit

http://visualstudiogallery.msdn.microsoft.com/0dfaa2eb-3951-49e7-ade7-b9343761e1d

Page 32: Build and Deploy LightSwitch Application on Windows Azure

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

Page 33: Build and Deploy LightSwitch Application on Windows Azure

@kmdfaizal

http://faizal-comeacross.blogspot.com/

[email protected]

K.Mohamed FaizalLead Consultant @ NCS (P) Ltd. Jan 7th 2012

http://www.facebook.com/kmdfaizal

Page 34: Build and Deploy LightSwitch Application on Windows Azure