Demo:
File->New Project
Demo: Bundling &
Minification
<script [email protected](“~/Scripts/Site.js”)”></script>
<script src=”~/Scripts/Site.js”)”></script>
@{
}
string myClass = null;
if (someCondition) {
myClass = ”shinyFancy”;
}
<div @{if (myClass != null) { <text>[email protected]</text> } }>Content</div>
@{
}
string myClass = null;
if (someCondition) {
myClass = ”shinyFancy”;
}
<div [email protected]>Content</div>
Database
Migrations
Demo: Database
Migrations with EF 4.3
Why Web APIs?
Build Richer Apps
Reach More Clients
+ 100%
+ 50%
+ 3400%
+ 235%
+ 71%
+ 86%
+ 46%
Source: www.programmableweb.com – current APIs: 4535
+ 63%
Embrace HTTP
Demo: Building
a Web API
Demo: Calling a Web
API from JavaScript
Demo: Unit Testing
a Web API
Demo: Hosting
Web APIs
Mobile Web
Adaptive
Rendering
Display
Modes
Mobile
Template
Demo: Mobile Web
https://github.com/signalr/
Client – JavaScript
Server - .NET
var hub = $.connection.chat;
public class Chat : Hub
{
public void SendMessage(string message)
{
Clients.addMessage(message);
}
}
hub.addMessage = function (msg) {
$("#msgs").append("<li>" + msg + "</li>");
};
$.connection.hub.start().done(function() {
$("#send").click(function() {
hub.sendMessage($("#msg").text());
});
});
Demo: SignalR
http://myserver.com/products
public class
public void
WebClient
new WebClient
“result"
new Uri "http://www.bing.com/"
public ActionResult
return
public class
public async Task ActionResult
WebClient
new WebClient
await
return
"www.bing.com/"
Questions
Descargar

Document