Building a social networking portal on Windows Azure in
Download
Report
Transcript Building a social networking portal on Windows Azure in
Building a social networking portal
on Windows Azure in 1 hour
Saranya Sriram
Developer Evangelist
Microsoft, India
Over the next 60 mins
• We will build TechEd India 2011 Agenda Builder site and
host it on Azure.
http://techedindiasessions.cloudapp.net/
• We will use
–
–
–
–
–
ASP.NET MV3 & Razor
SQL Server DB and migrate to SQL Azure DB
Azure tables
Facebook Javascript APIs & FBML
Azure hosting
Flow of Demo
Create
MVC 3
App
Cloud
Enable
the App
Use Azure
Table
Storage
Integrate
Facebook
API
Publish to
Azure
Hosting
demo
Agenda Builder App
Step 1 : Create the MVC3 App
Model
• ADO.NET Entity Model
• Create Repository(Wrappers)
Controller
• Create Session Controller
• Manage Routes in Global.asax
Views
• Create cshtml views for Day 1,2 & 3
• Write Razor Code
Step 2 : Enable Cloud Simulation
Cloud
Project
SQL Azure
• Add Cloud template and link MVC App
• Add Azure references to MVC App
• Migrate database schema & data
• Manage portal settings
• Point application to SQL Azure
Database
Step 3 : Integrate Azure Storage
Model
Controller
• Create Azure Table Data Model
• Create Azure Table Data ServiceContext
• Create DataSource Wrapper Classes
• Create Agenda Controller
• Manage CRUD operations
• Create CRUD Views
View
Step 4 : Integrate Facebook
Iframe
• Integrate Like, Activity Feeds into HTML using iFrame
FBML
• Include FBML references
• Use Facebook Markup
JavaScript API
• Create Facebook App to get APPID
• Update Site URL and Canvas URL on Facebook
• Wire up JavaScript Code for publishing
Step 5 : Publish to Azure
DataCenter
• Create Hosted Service
• Create Storage Service
Azure Portal
• Point Table Storage to Cloud
Application • Include MVC3 Setup as Startup Task
Publish
• Configure Remote Desktop
• Add Certificates
• Publish your app to cloud
Summary
• All .NET Developers are cloud developers
–
–
–
–
Visual Studio (express & licensed)
WebMatrix
LighTSwitch
REST access
• Easy to integrate
– Windows Azure runs on Windows Server 2008 R2 in data center
– .NET framework
– Can remote desktop
• Can run startup tasks and install other assemblies and
components
Resources
http://microsoft.com/windowsazure
Software Application Developers
Infrastructure Professionals
http://msdn.microsoft.com/
http://technet.microsoft.com/
msdnindia
@msdnindia
technetindia
@technetindia
© 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in
the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft
must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any
information provided after the date of this presentation.
MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
A quick look at Razor
.NET 4
ASP.NET MVC 3
CSHTML
Web Matrix
VBHTML
Razor
Layouts