Brian Jordan Developer Technology Specialist Microsoft - Federal Websites, Web Services and Cloud Applications with Microsoft ® Visual Studio ® 2013 Oh My!
Jan 14, 2015
Brian JordanDeveloper Technology SpecialistMicrosoft - Federal
Websites, Web Services and Cloud Applications with Microsoft® Visual Studio® 2013Oh My!
Agenda
Web Applications & Services - One ASP.NET
Services Deeper Dive - Web API 2, OData, SignalR 2.0
Cloud Applications and Services - Windows Azure
ASP.NET
Web Forms
Websites
Web-pages
Single-PageApps
MVC Web API SignalR
Services
One ASP.NET
ASP.NET 4.5
VS2012
Sept 201
2
ASP.NET and Web Tools
2012.2
Feb 201
3VS2013
Fall201
3
ASP.NET and Web Tools CadenceContinuous innovation: Release every ~6 months
No “upfront decision” on any ASP.NET technologyUnified dialog
One Project: Web Forms, MVC, Web API
Add any framework to any project
Scaffolding works across all frameworks
Configurable authentication
Bootstrap used for layout and stylingTemplates based on Bootstrap.js
Popular CSS layout framework
Many themes available
Completely new scaffolding system for One ASP.NETWeb application code generation based on your data model
Targets data-driven and CRUD boilerplate code
One ASP.NET
ASP.NET Identity (a.k.a. Membership)
Complete rewrite of the old Membership feature
Default authentication against different storage providers
Easier to customize
Can be used from different ASP.NET technologies
Integrated with external logons through providers
Active Directory, Windows Azure Active Directory,
Microsoft Account, Facebook, Twitter, and Google
New Membership system
One ASP.NET Identity system
Supports claims-based authentication
Integrated with external logons
One ASP.NETBrowser Link HighlightsIt improves the way you develop web apps; no need to start/stop. Just “refresh” and see how your app runs in browsers. Make changes in Visual Studio and force an update in connected browsers
A bi-directional channel
Built on open web standards
New HTML editor
AngularJS IntelliSense
Enable Edit and ContinueBy default for new web apps
Browser Link(“Artery”)
Demo
One ASP.NET
Available as stand-alone NuGet packages
Web API security (CORS, OAuth 2.0)
Attribute routing
OWIN integration
Web API OData
ASP.NET Web API 2
Cross-Origin Requests
Enable CORS in web APIPer action
Per controller
Globally
[EnableCors(origins: "http://www.example.com", headers: "*", methods: "*")]public class ItemsController : ApiController{ public HttpResponseMessage GetAll() { ... } public HttpResponseMessage GetItem(int id) { ... } public HttpResponseMessage Post() { ... }
[DisableCors] public HttpResponseMessage PutItem(int id) { ... }}
OWIN
OWIN = Open Web Interface for .NETCommon interface that decouples apps from servers
Standards for connecting servers to frameworksDeeply integrated with the ASP.NET pipeline
Run your web APIs on any OWIN-compliant host (your own process)
What is Katana?OWIN components that are built and released by Microsoft Infrastructure components, as hosts and servers Authentication components Bindings to frameworks such as SignalR and ASP.NET Web API
High-Level Goals of Katana
PortableEasily substituted for new components
Third-party frameworks can seamlessly run on Microsoft servers
Microsoft frameworks can potentially run on third-party servers and hosts
Modular/flexibleSmall and focused components
Lightweight
Lightweight/performance/scalableConsume fewer computing resources
Handle more load
Attribute RoutingBring your routes closer to your resources
config.Routes.MapHttpRoute( name: “TodosForTodoList", routeTemplate: "api/todolists/{id}/todos", defaults: new { controller = “todolists”, action = “GetTodos” });
Controller Selector
Action Selector
public IEnumerable<TodoItem> GetTodos() { … }
Bring your routes closer to your resources
config.MapHttpAttributeRoutes();
[HttpGet("api/todolists/{id}/todos")]public IEnumerable<TodoItem> GetTodos(int id) { … }
Attribute Routing
Attribute Routing
Optional values Default values[HttpGet(“Demographics/{zipcode?}")]public Demographics Get(int? zipcode) { … }
[HttpGet("Demographics/{zipcode=98052}")]public Demographics Get(int zipcode) { … }[HttpGet("people/{id:int}")]public Person Get(int id) { … }
[HttpGet("people/{name:alpha}")]public Person Get(string name) { … }
Taking Web APIs to the Next LevelHow to add support for:Relationships?Query?Paging?Action?Batching?Clients?
OData provides a standard solution for common Web API patterns
ASP.NET Web API ODataComponents for implementing OData servicesModel builders, formatters (Atom/JSON/XML), path and query parsers, LINQ expression generator, etc.
Built on ODataLibSame underpinnings as WCF Data Services
Open SourceAccepting contributions
Now supports $select, $expand, and $batch
What is ASP.NET SignalR?
Incredibly simple real-time web for .NETSimplicity
Reach
Performance
How can I use real-time functionality in my app?Anytime a user refreshes the page or you use pollingDashboards and monitoringCollaborative anythingGamingReal-time forms and concurrency management
ASP.NET SignalR 2.0OWINSimplified dependency graph
Unified startup configuration story
Highly portable between IIS and self-host
Portable Class LibraryClient libs for WinRT, WPF, WP8 and SL5
OWIN integration
Portable Class Library client
Xamarin client (iOS, Android, and Mac)
C++ client for Windows
Demo
Web API 2Attribute RoutingODataSignalR
Windows Azure for Dev/TestSandbox environments for application development and testing on supported OSQA and application compatibility on new O/S (e.g., WS 2012) or software (e.g., SQL Server 2012)Stress & load testing SharePoint 2013 dev/test sandboxReproduction and bug fixing for s/w and app stack failuresEnvironment for doing training, learning and application demosTFS: Customized TFS setup with < 2200 users; testing TFS upgrades and roll-outs
Dev/TestTest/Dev VMs in the cloud1
Leverage existing skillset to move test/dev to cloud
2
Connectivity with on-premises data and applications
3
Common identity4
Common dev tools and frameworks for on-premise & cloud
5
Accessed by a geographically dispersed team
6
Hyper-VVHD
Deploy
Windows ServerActive
DirectoryData
Non-Virtualize
d Applicatio
n
Virtualized Application
On-premises
P2V
V2V
Dispersed Teams
Azure StorageSandbox Test/Dev VMs
Saved Disk State
VPN Tunnel
Windows Azure
564
3
2
1
MSDN Subscribers
Activate your MSDN Windows Azure benefit and receive up to $150 in credit each month to use on any Windows Azure service including VMs, Websites, Databases and more.http://aka.ms/vsAzure
Core technologies that enable a truly hybrid application platform
Investments in Hybrid
CLOUD ON PREM
Application-Layer Services/Messaging & Identity
Service Bus & Windows Azure Active Directory
Data SynchronizationSQL Data Sync
Secure Site-to-Machine ConnectivityVirtual Network Point-to-Site VPN
Secure Site-to-Site Network Connectivity
Virtual Network Site-to-Site VPN
Upstream hardware
load-balancers
Front-end application
request router
Front-end application
request router
…..
Persistent storage
Server or virtual machine
Local routing logic
Web workers
Temporary per-
app file storage
Web application databases
Web application
file directories
Cluster topology and run-time state
Web Sites cluster
Worker process(w3wp)
Resource usage data
End user
HTTP/S Request
Developer tools and protocols
ProtocolsDevelopment Tools
Visual Studio,WebMatrix
Source control integrationVisual Studio Team Foundation Server 2010
FTP, Git, WebDeploy, HTTP
Development tools and protocols supportDecrease onboarding costs and increase customer satisfaction
Demo
Cloud Applications and Services
SummaryFrameworks for scalable, available servicesAll of our ASP.NET Web Frameworks work together with similar features
Tooling for modern applicationsEasier than ever to build modern applications Integrated with the most popular frameworks
Rapid application development toolsWindows Azure provides a comprehensive set of services that you can selectively compose to build your IT in the cloud
Calls to Action
Download Visual Studio 2013http://www.microsoft.com/visualstudio
Try Visual Studio OnlineActivate your MSDN benefit or sign up for a plan
http://www.visualstudio.com
Get started with Windows AzureActivate your MSDN Benefit and try it, or get a Windows Azure Free Trial Account.
http://www.windowsazure.com
© 2013 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.