E LT O N S T O N E M A N , U K C S U G : A P R I L 2 0 1 3NON-MICROSOFTTECHNOLOGIESMICROSOFT IS EMBRACING
AGENDA• JSON• JavaScript• NoSQL• Node.js• AMQP
JSON• Serialization format• “JavaScript Object Notation”• Concise, human-readable, interoperable• No schemaXML<vehiclexmln...
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.NE...
JSON IN .NET• WCF Demo
JSON IN .NET• WCF Demo – Recap• Explicit in service definition• [WebGet(UriTemplate="makes", ResponseFormat=WebMessageForm...
JSON IN .NET• ASP.NET WebApi Demo
JSON IN .NET• ASP.NET WebApi Demo - Recap• Implicitly available, by client request• Accept: application/json• Easily custo...
JAVASCRIPT• Weakly-typed OO language• Interpreted, browser runtime• Event loop & callback mechanismwindow.setInterval(func...
JAVASCRIPT: WHY SHOULD I CARE?• Rapid development/prototyping• Widen API reach• Single codebase for JS runtimes• Web apps ...
MICROSOFT AND JAVASCRIPT• jQuery in ASP.NET + IntelliSense• Knockout (MVVM), modernizr (HTML5)• TypeScript• Superset of Ja...
JAVASCRIPT• TypeScript Demo
FROM TYPESCRIPTmodule ApiClient {export class Vehicles {getModels(makeCode: string) {return someJSON;};static baseUrl =htt...
TO JAVASCRIPTvar ApiClient;(function (ApiClient) {var Vehicles = (function () {function Vehicles() { }Vehicles.prototype.g...
NOSQL• “Not-only SQL” -> document databases• No schema, collections of objects• Mature products• Rich, efficient querying ...
NOSQL: WHY SHOULD I CARE?• Easy access, REST+JSON• Cloud integration – Shared Database• Accelerated delivery• Fewer moving...
MICROSOFT AND NOSQL• SQL Azure beta -> Table Storage• NoSQL, with limitations• MongoLabs Azure Add-On• MongoDB hosted on A...
NOSQL• MongoDB Demo
NOSQL• MongoDB Demo – Recap• Azure Add-On, NuGet driver• GetServer().GetDatabase().GetCollection<>()• LINQ• Wrapper class•...
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 ...
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 cal...
AMQP• Advanced Messaging Queuing Protocol• Interopable, standards-based wire protocol• Fast, durable, scalable• History & ...
AMQP: WHY SHOULD I CARE?• Rich functionality & messaging patterns• Interoperable MQ standard• Ignore protocol, focus on me...
MICROSOFT AND AMQP• v1.0 launch (2011)• AMQP support for Azure Service Bus• Queue, topic, subscription• Limited client sup...
AMQP• Node.js + RabbitMQ Demo
AMQP• Node.js + RabbitMQ Demo Recap• 3rd party AMQP module• Built for RabbitMQ• RabbitMQ .NET client library• Durable mess...
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 Cl...
CONTACT• elton@sixeyed.com• http://geekswithblogs.net/eltonstoneman
Upcoming SlideShare
Loading in …5
×

Non-Microsoft Technologies Which Microsoft is Embracing

3,532 views

Published on

A look at new technologies Microsoft is embracing in the Azure and .NET platforms, including JSON, JavaScript, Node.js, MongoDB and AMQP.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
3,532
On SlideShare
0
From Embeds
0
Number of Embeds
480
Actions
Shares
0
Downloads
19
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Open VehicleService – WebGetCall makes-WCF in RESTClientShow XML versionOpen DiagnosticsServiceShow status-WCF with date &amp; enum
  • Open VehicleService – WebGetCall makes-WCF in RESTClientShow XML versionOpen DiagnosticsServiceShow status-WCF with date &amp; enum
  • Open VehicleController – WebApi overviewCall vehicle-API in RESTClientGet as XML with AcceptOpen DiagnosticsControllerShow status-WCF with date &amp; enum, show formatting options in global.asax
  • Open VehicleController – WebApi overviewCall vehicle-API in RESTClientGet as XML with AcceptOpen DiagnosticsControllerShow status-WCF with date &amp; enum, show formatting options in global.asax
  • 1. Load ApiClient.ts2. TS constucts – module, export, class, “:” type3. Generates .js or .min.js on save - WebEssentials + TS plugin4. Show intellisense – var vehicle = client.get…
  • 1. Load ApiClient.ts2. TS constucts – module, export, class, “:” type3. Generates .js or .min.js on save - WebEssentials + TS plugin4. Show intellisense – var vehicle = client.get…
  • Azure Portal -&gt; MongoLabs portalShow collectionREST client – get &amp; searchOpen VehiclesController; NuGet – installed packages, 10gen MongoGet Server – MongoLab, db – my db, collection – whateverStandard LINAOpen CachedVehicleModel – Mongo-specific wrapper
  • Open FormatService.js &amp; walkthrough - imports, functions, HTTP serverRun FormatService.cmd &amp; browse to Local – change input and show consoleOpen Azure console, show Web site &amp; browse to Azure serviceBack to Mac, open TextWrangler &amp; editOpen SourceTree, and commit – with push, show all – deployment text
  • Open FormatService.js &amp; walkthrough - imports, functions, HTTP serverRun FormatService.cmd &amp; browse to Local – change input and show consoleOpen Azure console, show Web site &amp; browse to Azure serviceBack to Mac, open TextWrangler &amp; editOpen SourceTree, and commit – with push, show all – deployment text
  • Open PasswordReset.js &amp; walkthrough – connect to AMQP, create &amp; bind queue, HTTP serverOpen RabbitMQmgmtStart PasswordReset.cmd &amp; fire requestsRabbitMQmgmt – messages in queue, view messageOpen AmqpConsumerprogram.csStart AmqpConsumer &amp; PaperCut – process messages; start x2 and submit more
  • Open PasswordReset.js &amp; walkthrough – connect to AMQP, create &amp; bind queue, HTTP serverOpen RabbitMQ mgmtStart PasswordReset.cmd &amp; fire requestsRabbitMQ mgmt – messages in queue, view messageOpen AmqpConsumerprogram.csStart AmqpConsumer &amp; PaperCut – process messages; start x2 and submit more
  • Moan – AMQP should interop, but notOpen AzurePasswordReset.js &amp; walkthrough – connect to Azure, create queue, HTTP serverStart AzurePasswordReset.cmd &amp; fire requestsAzure console – messages in queueOpen AzureConsumerprogram.csStart AzureConsumer &amp; PaperCut – process messages; start x2 and submit more
  • Moan – AMQP should interop, but notOpen AzurePasswordReset.js &amp; walkthrough – connect to Azure, create queue, HTTP serverStart AzurePasswordReset.cmd &amp; fire requestsAzure console – messages in queueOpen AzureConsumerprogram.csStart AzureConsumer &amp; PaperCut – process messages; start x2 and submit more
  • Non-Microsoft Technologies Which Microsoft is Embracing

    1. 1. E LT O N S T O N E M A N , U K C S U G : A P R I L 2 0 1 3NON-MICROSOFTTECHNOLOGIESMICROSOFT IS EMBRACING
    2. 2. AGENDA• JSON• JavaScript• NoSQL• Node.js• AMQP
    3. 3. JSON• Serialization format• “JavaScript Object Notation”• Concise, human-readable, interoperable• No schemaXML<vehiclexmlns=“http://schemas.xyz.com/vehicles”><makeCode>audi</makeCode><modelCode>a3</modelCode></vehicle>JSON{"modelCode":"a3","makeCode":"audi"
    4. 4. JSON: WHY SHOULD I CARE?• Performance• Interop (json.org)• Ease of access• Modernity
    5. 5. 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
    6. 6. JSON IN .NET• WCF Demo
    7. 7. JSON IN .NET• WCF Demo – Recap• Explicit in service definition• [WebGet(UriTemplate="makes", ResponseFormat=WebMessageFormat.Json)]• Hard to customise
    8. 8. JSON IN .NET• ASP.NET WebApi Demo
    9. 9. JSON IN .NET• ASP.NET WebApi Demo - Recap• Implicitly available, by client request• Accept: application/json• Easily customisable
    10. 10. JAVASCRIPT• Weakly-typed OO language• Interpreted, browser runtime• Event loop & callback mechanismwindow.setInterval(function() {document.getElementById("container").innerHTML+=<p>More</p>;}, 500);function writeMore() {document.getElementById("container").innerHTML+=<p>More</p>;}window.setInterval(writeMore, 500);JsFiddleJsFiddle
    11. 11. 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
    12. 12. 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
    13. 13. JAVASCRIPT• TypeScript Demo
    14. 14. FROM TYPESCRIPTmodule 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
    15. 15. TO JAVASCRIPTvar 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
    16. 16. NOSQL• “Not-only SQL” -> document databases• No schema, collections of objects• Mature products• Rich, efficient querying (+LINQ)• Indexing• Map/reduce
    17. 17. 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
    18. 18. MICROSOFT AND NOSQL• SQL Azure beta -> Table Storage• NoSQL, with limitations• MongoLabs Azure Add-On• MongoDB hosted on Azure
    19. 19. NOSQL• MongoDB Demo
    20. 20. NOSQL• MongoDB Demo – Recap• Azure Add-On, NuGet driver• GetServer().GetDatabase().GetCollection<>()• LINQ• Wrapper class• BSON ObjectId
    21. 21. NODE.JS• JavaScript platform• Built on Google’s JS runtime• Server• Websites• Accelerators• Gateways
    22. 22. 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
    23. 23. MICROSOFT AND NODE.JS• IISNode• IIS Express, Node.js extension for IIS7• Node.js on Azure
    24. 24. NODE.JS• FormatService Demo
    25. 25. 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
    26. 26. 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
    27. 27. 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?
    28. 28. MICROSOFT AND AMQP• v1.0 launch (2011)• AMQP support for Azure Service Bus• Queue, topic, subscription• Limited client support…
    29. 29. AMQP• Node.js + RabbitMQ Demo
    30. 30. AMQP• Node.js + RabbitMQ Demo Recap• 3rd party AMQP module• Built for RabbitMQ• RabbitMQ .NET client library• Durable messaging• Multiple consumers
    31. 31. AMQP• Node.js + Service Bus Queues Demo
    32. 32. 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
    33. 33. CONTACT• elton@sixeyed.com• http://geekswithblogs.net/eltonstoneman

    ×