Non-Microsoft Technologies Which Microsoft is Embracing
-
Upload
sixeyed -
Category
Technology
-
view
2.654 -
download
1
description
Transcript of Non-Microsoft Technologies Which Microsoft is Embracing
E LT O N S T O N E M A N , U KC S U G : A P R I L 2 0 1 3
NON-MICROSOFT TECHNOLOGIES
MICROSOFT IS EMBRACING
AGENDA
• JSON• JavaScript• NoSQL• Node.js• AMQP
JSON
• Serialization format• “JavaScript Object Notation”• Concise, human-readable, interoperable• No schema
XML<vehicle xmlns=“http://schemas.xyz.com/vehicles”>
<makeCode>audi</makeCode><modelCode>a3</modelCode>
</vehicle>JSON{ "modelCode": "a3", "makeCode": "audi"}
JSON: WHY SHOULD I CARE?
• Performance• Interop (json.org)• Ease of access• Modernity
MICROSOFT AND JSON
• Available in WCF from Fx 3.5• DataContractJsonSerializer• WebHttpBinding
• First-class option in ASP.NET Web API• MVC 4 & Fx 4.5• 3rd party JSON.NET library
JSON IN .NET
• WCF Demo
JSON IN .NET
• WCF Demo – Recap• Explicit in service definition• [WebGet(UriTemplate="makes", ResponseFormat= WebMessageFormat.Json)]
• Hard to customise
JSON IN .NET
• ASP.NET WebApi Demo
JSON IN .NET
• ASP.NET WebApi Demo - Recap• Implicitly available, by client request• Accept: application/json
• Easily customisable
JAVASCRIPT
• Weakly-typed OO language• Interpreted, browser runtime• Event loop & callback mechanism
window.setInterval(function() { document.getElementById("container").innerHTML+='<p>More</p>';}, 500);
function writeMore() { document.getElementById("container").innerHTML+='<p>More</p>';}
window.setInterval(writeMore, 500);
JsFiddle
JsFiddle
JAVASCRIPT: WHY SHOULD I CARE?
• Rapid development/prototyping• Widen API reach• Single codebase for JS runtimes• Web apps and mobile apps
• Inherently async• Server-side applications
MICROSOFT AND JAVASCRIPT
• jQuery in ASP.NET + IntelliSense• Knockout (MVVM), modernizr (HTML5)
• TypeScript• Superset of JavaScript, adds type-safety, class
& interface definition• Compiler generates pure JS• Eases learning curve from .NET• VS plugin (and Vim, Emacs) + WebEssentials• Pre-dates ECMAScript 6
JAVASCRIPT
• TypeScript Demo
FROM TYPESCRIPT
module ApiClient { export class Vehicles {
getModels(makeCode: string) { return 'someJSON'; };
static baseUrl = 'http://localhost/Sixeyed.CarValet.Services/VehicleService.svc'; }}
var client: ApiClient.Vehicles = new ApiClient.Vehicles;var models = client.getModels('rover');
• TypeScript Demo - Recap
TO JAVASCRIPT
var ApiClient;(function (ApiClient) { var Vehicles = (function () { function Vehicles() { } Vehicles.prototype.getModels = function (makeCode) { return 'someJSON'; }; Vehicles.baseUrl = 'http://localhost/Sixeyed.CarValet.Services/VehicleService.svc'; return Vehicles; })(); ApiClient.Vehicles = Vehicles; })(ApiClient || (ApiClient = {}));var client = new ApiClient.Vehicles();var models = client.getModels('rover');
JsFiddle
NOSQL
• “Not-only SQL” -> document databases• No schema, collections of objects• Mature products• Rich, efficient querying (+LINQ)• Indexing• Map/reduce
NOSQL: WHY SHOULD I CARE?
• Easy access, REST+JSON• Cloud integration – Shared Database• Accelerated delivery• Fewer moving parts• Simpler solution • Simpler maintenance
• Performance & scale-out
MICROSOFT AND NOSQL
• SQL Azure beta -> Table Storage• NoSQL, with limitations
• MongoLabs Azure Add-On• MongoDB hosted on Azure
NOSQL
• MongoDB Demo
NOSQL
• MongoDB Demo – Recap• Azure Add-On, NuGet driver• GetServer().GetDatabase().GetCollection<
>()• LINQ• Wrapper class• BSON ObjectId
NODE.JS
• JavaScript platform• Built on Google’s JS runtime
• Server • Websites• Accelerators• Gateways
NODE.JS: WHY SHOULD I CARE?
• Single-threaded, non-blocking, async• Efficient & scalable
• Large, dedicated community• Rich package management (NPM)• Leading-edge – Socket.io, MongoDB
MICROSOFT AND NODE.JS
• IISNode• IIS Express, Node.js extension for IIS7
• Node.js on Azure
NODE.JS
• FormatService Demo
NODE.JS
• FormatService Demo – Recap• Simple HTTP server• Require modules (internal/external)• JS async model – passing callbacks
• Hosted on Azure websites• Git publishing• Platform agnostic
AMQP
• Advanced Messaging Queuing Protocol• Interopable, standards-based wire protocol• Fast, durable, scalable• History & heavy usage in finance industry
• Industry adopters• RabbitMQ - VMWare • Apache Qpid• Windows Azure Service Bus
AMQP: WHY SHOULD I CARE?
• Rich functionality & messaging patterns• Interoperable MQ standard• Ignore protocol, focus on message
• Multiple providers• Choose your cloud (StormMQ…)
• BUT• Few full AMQP providers • And notable missing parties (SQS, ZeroMQ)
• How interoperable?• Traction?
MICROSOFT AND AMQP
• v1.0 launch (2011)• AMQP support for Azure Service Bus • Queue, topic, subscription
• Limited client support…
AMQP
• Node.js + RabbitMQ Demo
AMQP
• Node.js + RabbitMQ Demo Recap• 3rd party AMQP module• Built for RabbitMQ
• RabbitMQ .NET client library• Durable messaging• Multiple consumers
AMQP
• Node.js + Service Bus Queues Demo
AMQP
• Node.js + Service Bus Queues Demo – Recap• Azure Node.js module• AMQP module doesn’t connect to Azure
• Azure .NET Client Library• RabbitMQ client library doesn’t connect to
Azure
CONTACT
• [email protected]• http://geekswithblogs.net/eltonstoneman