SlideShare a Scribd company logo
1 of 64
Formatvorlage des Untertitelmasters durch Klicken bearbeiten
Platin-Partner: Gold-Partner: Veranstaltungs-Partner: Medien-Partner:
Echtzeitanwendungen für SharePoint
mit SignalR und knockout.js
Christian Heindel, Communardo Software GmbH
SignalR @c_heindel
Lösungen für die Kommunikation und Zusammenarbeit im Unternehmen
Wir sind Ihr Partner für Softwarelösungen, mit denen Sie die Kommunikation und
Zusammenarbeit in Ihrem Unternehmen, sowie mit Ihren Kunden und Lieferanten nachhaltig
stärken. Als Enterprise 2.0 Lösungshaus bieten wir alle Leistungen für die Realisierung und
erfolgreiche Einführung, mit einem umfassenden Service an Produkten, Beratung,
Softwareentwicklung, Training und Application Management.
Wir sind zertifizierter Partner von Microsoft, IBM und Atlassian und damit erster Ansprechpartner
für die Planung und Umsetzung Ihrer Enterprise 2.0
Lösung.
Agenda
Realtime applications
• Goals, use cases, examples
Push technologies
• WebSockets, Comet
SignalR
• Connections and hubs
• Client libraries, supported
platforms, scalability
MVVM in JavaScript
• knockout.js, jQuery, JSON,
oDATA
Events in SharePoint
• Overview
Bringing it all together
• SharePoint 2010
• SharePoint 2013
• SharePoint Online
Agenda
Realtime applications
• Goals, use cases, examples
Push technologies
• WebSockets, Comet
SignalR
• Connections and hubs
• Client libraries, supported
platforms, scalability
MVVM in JavaScript
• knockout.js, jQuery, JSON,
oDATA
Events in SharePoint
• Overview
Bringing it all together
• SharePoint 2010
• SharePoint 2013
• SharePoint Online
Goals
Improve user experience
Reduce server load
Use cases
In general
• Adjust prices in
real-time, e.g. for
flight tickets
• Show new
comments as they
come in
• Activity streams
In SharePoint
• Show changes to list
items
• "Who is online?"
• Chat / Shoutbox
• Download counter
• Task status
dashboard
TFS – Team Room
Quelle: http://tfs.visualstudio.com/en-us/news/2013-jun-3
Shopping cart
Quelle: http://tech.pro/tutorial/1146/building-a-shopping-cart-with-signalr-aspnet-web-api-and-knockoutjs
Stock Ticker
Quelle: SignalR
Download counter
Quelle: http://melcher.it/2012/05/signalr-and-sharepoint-live-download-tracking/
Upload visualizer
Quelle: http://blog-aspc.azurewebsites.net/sharepoint-with-signalr/
Realtime ASP.NET Web API tracing with SignalR
Video:
http://www.strathweb.com/
2012/11/realtime-asp-net-web-
api-tracing-with-signalr/
JabbR
Collaborative chat done right
• Project:
http://about.jabbr.net/
• Code:
https://github.com/JabbR/JabbR
• Live demo:
https://jabbR.net
ShootR
Multiplayer space ship game
built on the SignalR framework.
• Code:
https://github.com/
ntaylormullen/shootr
• Live demo:
http://shootr.signalr.net/
Tic-Tac-Toe
• Code:
https://github.com/fekberg/Tic-Tac-Toe
• Live demo:
http://signalr-tictactoe.azurewebsites.net/
DEMO
http://www.christian-heindel.de/SignalRServer/
Agenda
Realtime applications
• Goals, use cases, examples
Push technologies
• WebSockets, Comet
SignalR
• Connections and hubs
• Client libraries, supported
platforms, scalability
MVVM in JavaScript
• knockout.js, jQuery, JSON,
oDATA
Events in SharePoint
• Overview
Bringing it all together
• SharePoint 2010
• SharePoint 2013
• SharePoint Online
Refresh a page after it has loaded
How you could try it…
• Client pull
– F5, Ctrl+F5, press the
“Delete cache”
button hard and
often, then F5
– Polling: AJAX Request
every 60 seconds?
Every 5 seconds?
How you should do it…
• Server push
– WebSocket
connection
– Comet techniques
as fallback
Comet (a.k.a. Ajax Push, Reverse Ajax, HTTP Streaming, HTTP server push)
• No page-by-page request or polling, but a long-held HTTP request
• Biggest problem: HTTP 1.1 (max. 2 simultaneous connections)
• Streaming:
– Hidden iFrame
– XMLHttpRequest
– Ajax with long polling
– XMLHttpRequest with long polling
– Script tag long polling
WebSockets
• Full-duplex communication channel over a single TCP connection
• Persistent connection
• Cross origin support built in (CORS)
• IETF RFC 6455
• Port 80
• WebSockets API (W3C Recommendation)
• Web browser + web server need to implement it
– IIS 8.0, Apache 2.x, nginx 1.3.13+, lighttpd, node.js, …
– Google Chrome 14+, Internet Explorer 10+, Firefox 6+, Safari 6+ and
Opera 12.10+
caniuse.com
Agenda
Realtime applications
• Goals, use cases, examples
Push technologies
• WebSockets, Comet
SignalR
• Connections and hubs
• Client libraries, supported
platforms, scalability
MVVM in JavaScript
• knockout.js, jQuery, JSON,
oDATA
Events in SharePoint
• Overview
Bringing it all together
• SharePoint 2010
• SharePoint 2013
• SharePoint Online
ASP.NET SignalR
• SignalR started in July 2011 as a project by
– David Fowler (Senior Software Design Engineer, ASP.NET Team)
– Damien Edwards (Senior Program Manager, Microsoft)
• Now official part of the ASP.NET Technologies: http://asp.net/signalr
• MSDN documentation (since 03/2013):
http://msdn.microsoft.com/en-us/library/jj891071(v=vs.111).aspx
• Source code on GitHub
• Available via NuGet Gallery (22.000+ downloads in last 6 weeks)
Introduction to SignalR
Quelle: http://www.asp.net/signalr/overview/getting-started/introduction-to-signalr
SignalR: Features
• Ready to use libraries for server and clients
• Automatic connection management
(send to all clients, to specific clients)
• Uses WebSockets when available, fallback otherwise
(abstraction layer)
• Scale out to thousands of clients
SignalR: Transports and fallbacks
HTML 5 transports
These transports depend on support for HTML 5. If the client browser does not support the HTML 5 standard, older transports will
be used.
• WebSocket
• Server Sent Events, also known as EventSource (if the browser supports Server Sent Events, which is basically all browsers
except Internet Explorer.)
Comet transports
The following transports are based on the Comet web application model, in which a browser or other client maintains a long-held
HTTP request, which the server can use to push data to the client without the client specifically requesting it.
• Forever Frame
– for Internet Explorer only, hidden Iframe, one-way realtime connection from server to client, connection from client to server uses a
separate connection, a new connection is created for each piece of data that needs to be sent
• Ajax long polling
– no persistent connection, but instead polling the server with a request that stays open until the server responds, at which point the
connection closes, and a new connection is requested immediately, latency while the connection resets
SignalR: Architecture diagram
Quelle: SignalR
SignalR: Connections
- Simple endpoint for sending single-recipient, grouped, or broadcast
messages
- Connection API (represented in .NET code by the
PersistentConnection class)
- direct access to the low-level communication network that SignalR
exposes
- familiar to developers who have used connection-based APIs such as
Windows Communication Foundation
SignalR: Hubs
- high-level pipeline built upon the Connection API
- allows client and server to call methods on each other directly
- SignalR handles dispatching across machine boundaries as if by magic
- For different types of messages, it is recommended that you use the Hub class, so that you
won't have to create your own dispatching
- using the Hub, you can call methods on the clients, rather than sending an explicit message
that needs to be received, interpreted, and acted upon
- familiar to developers who have used remote invocation APIs such as .NET Remoting
SignalR: Supported platforms (server side)
http://blogs.msdn.com/b/timlee/archive/2013/02/27/deploy-the-signalr-getting-started-sample-as-a-windows-azure-web-site.aspx
SignalR: Supported platforms (client side)
• Browsers (JavaScript)
• Windows Desktop
(Forms)
• Silverlight
• Windows Store (.NET)
• Windows Store
(JavaScript)
• Windows Phone (IE)
• Windows Phone (.NET)
• Console
• Web Services
• iOS (Objective-C)
• …
SignalR: System requirements (Windows)
• On Facebook you’d say: “It’s complicated.”
• Excerpt from the documentation:
• Server: 2012*, 2008 r2, Azure Website, Windows 8*, Windows 7
• .NET Framework: 4.0 / 4.5*
• IIS: 7,7.5,8*, 8 Express*
• Browser: IE10*
• Silverlight: N/A (restr. 5+)
• WP8: IE* (restr. WP8 App)
• Only * supports WebSockets… 
SignalR: Performance and scalability (I)
• Standard limit in IIS: 5.000 connections per CPU
• You can override this limit!
• For SignalR about 20.000 connections per CPU usually
also work, depends on your appliaction…
• Special load test tool available:
https://github.com/SignalR/SignalR/tree/dev/src/Microsoft.AspNet.SignalR.Crank
SignalR: Performance and scalability (II)
• ScaleOut providers available since SignalR 1.1
– Azure Service Bus
– SQL Server
– Redis
SignalR: Performance and scalability (III)
• Helpful documentation on MSDN library
• How to notify the user about disconnections
• How to continuously reconnect
$.connection.hub.connectionSlow(function() {
notifyUserOfConnectionProblem();
// Your function to notify user.
});
$.connection.hub.disconnected(function() {
setTimeout(function() {
$.connection.hub.start();
}, 5000);
// Restart connection after 5 seconds.
});
Agenda
Realtime applications
• Goals, use cases, examples
Push technologies
• WebSockets, Comet
SignalR
• Connections and hubs
• Client libraries, supported
platforms, scalability
MVVM in JavaScript
• knockout.js, jQuery, JSON,
oDATA
Events in SharePoint
• Overview
Bringing it all together
• SharePoint 2010
• SharePoint 2013
• SharePoint Online
Why MVVM in JavaScript?
• Separate design from code
• Two-way DataBinding for properties
• Command binding
• Templates
Which framework to choose?
knockout.js
(Microsoft)
spine.js SproutCore JavascriptMVC ember.js
Angular.js
(Google)
…
knockout.js
• Simplify dynamic JavaScript UIs by applying
the Model-View-View Model (MVVM) pattern
• By Steve Sanderson (Microsoft employee),
inspired by XAML, supports legacy browsers…
Declarative Bindings
Easily associate DOM
elements with model data
using a concise,
syntaxreadable
Automatic UI Refresh
When your data model's
state changes, your UI
updates automatically
Dependency Tracking
Implicitly set up chains of
relationships between model
data, to transform and
combine it
Templating
Quickly generate
sophisticated, nested UIs as
a function of your model data
knockout.js
Load JavaScript:
DataBinding in HTML:
Define ViewModel:
Start listening:
Refresh values:
knockout.js
Load JavaScript:
DataBinding in HTML:
Define ViewModel:
Start listening:
Refresh values:
JSON?
JSON – JavaScript Object Notation
• Derived from JavaScript
• Language independant
• Human readable
• Specified by Douglas Crockford
in RFC 4627
• json.org launched in 2002
{
"id": 1,
"name": "Foo",
"price": 123,
"tags": [ "Bar", "Eek" ],
"stock": {
"warehouse": 300,
"retail": 20
}
}
oDATA – Open Data Protocol
• standardized protocol for creating and consuming data APIs
• builds on REST web services
• uniform way to expose full-featured data APIs
• from Microsoft, submitted as OASIS standard
• AtomPub protocol as
envelope for JSON
• REST methods available
on sources
• http://www.odata.org/
oDATA – Open Data Protocol
• standardized protocol for creating and consuming data APIs
• builds on REST web services
• uniform way to expose full-featured data APIs
• from Microsoft, submitted as OASIS standard
• AtomPub protocol as
envelope for JSON
• REST methods available
on sources
• http://www.odata.org/
Agenda
Realtime applications
• Goals, use cases, examples
Push technologies
• WebSockets, Comet
SignalR
• Connections and hubs
• Client libraries, supported
platforms, scalability
MVVM in JavaScript
• knockout.js, jQuery,
oDATA, JSON)
Events in SharePoint
• Overview
Bringing it all together
• SharePoint 2010
• SharePoint 2013
• SharePoint Online
Events in SharePoint
Synchronous or
asynchronous
(before or after)
Local, app or
remote (new in SP2013)
Events in SharePoint
• Item events
adding, added,
deleting, deleted,
updating, updated,
fileconverted,
filemoving,
filemoved,
checkingin,
checkedin,
checkingout, checked
out,
attachmentadding,
attachmentadded,
attachmentdeleting,
attachmentdeleted
• List field events
adding, added,
deleting, deleted,
updating, updated
• List events
adding, added,
deleting, deleted
• Web events
adding, provisioned,
deleting, deleted,
moving, moved
• Site events
deleting, deleted
• App events
installed, uninstalling,
upgraded
• And more…
EmailReceived,
WorkflowCompleted,
WorkflowPostponed,
WorkflowStarted,
WorkflowStarting,
FeatureEventReceive
r installation,
activation,
deactivation, and
removal
Agenda
Realtime applications
• Goals, use cases, examples
Push technologies
• WebSockets, Comet
SignalR
• Connections and hubs
• Client libraries, supported
platforms, scalability
MVVM in JavaScript
• knockout.js, jQuery, JSON,
oDATA
Events in SharePoint
• Overview
Bringing it all together
• SharePoint 2010
• SharePoint 2013
• SharePoint Online
Integration in SharePoint (on-premises)
SharePoint 2010
• uses .NET Framework 3.5
• SignalR requires .NET Framework 4.0 / 4.5
•  Coding of a proxy necessary (WCF, HttpHandler or similar)
SharePoint 2013
• uses .NET Framework 4.0
But:
– SignalR attaches itself to the „App_Start“ event and registers a route „~/signalr/hubs“
(so that clients always find the hub)
– In SharePoint, there is no „App_Start“! ¯_(ツ)_/¯
Global.asax cannot be modified in a way that deployablesolution: write a HttpModule
Integration in SharePoint (on-premises)
So in order to get it working you have to write:
• HttpModule
• SPWebConfigModificationHandler
• VirtualPathProvider
Thanks to Max Melcher, you don‘t have to: Go to
Codeplex
SPSignalR - real-time applications with SharePoint 2013
• enables you to host SignalR in a SharePoint WebApplication
• web application feature, AppPool recycle, yoursharepoint.com/signalr/hubs
Weak points
• CORS (cross site scripting)
– Different browsers handle this with different
success… ;-)
• Proxying required
Integration in SharePoint Online (I)
• Remote Event Receiver - Declaration
Integration in SharePoint Online (II)
• Remote Event Receiver - Implementation
Integration in SharePoint Online (III)
• SignalRHub in same project as
RemoteEventReceiver
DEMO
5
6
Agenda
Realtime applications
• Goals, use cases, examples
Push technologies
• WebSockets, Comet
SignalR
• Connections and hubs
• Client libraries, supported
platforms, scalability
MVVM in JavaScript
• knockout.js, jQuery, JSON,
oDATA
Events in SharePoint
• Overview
Bringing it all together
• SharePoint 2010
• SharePoint 2013
• SharePoint Online
Resources
• Active community
– Forums: http://forums.asp.net/1254.aspx
– Github: We've found 493 repository results
• Official website: http://asp.net/SignalR
• Videos: http://channel9.msdn.com/search?term=signalr
• Trainings:
http://www.pluralsight.com/training/Courses/TableOfContents/signalr-
introduction
• JavaScript libraries: Angular, http://smoothiecharts.org/
• Books: Pushing Data: Integrating with ASP.NET SignalR Hubs
http://henriquat.re/server-
integration/signalr/integrateWithSignalRHubs.html
• More links: https://delicious.com/c.heindel/signalr
Open Source projects using SignalR
JabbR
• JabbR is an open source, real-time web chat system built using ASP.NET and SignalR. Source
code is at https://github.com/davidfowl/jabbr.
ShootR
• ShootR is an open source, real-time, multi-player HTML5 space shooter game, using SignalR
for real-time server-client communications. Source code is at
https://github.com/NTaylorMullen/ShootR.
ElmahR = ELMAH & SignalR
• A real-time monitoring solution for ASP.NET applications built with ELMAH and SignalR.
SignalR-ObjC
• A community maintained Objective-C client for SignalR, for use with iOS and Mac.
FRAGEN ?
SharePoint Camp
ab 08. Juli in München
ab 05. August in Berlin
ab 02. September in Karlsruhe
in zwei speziellen Versionen
www.SharePointCamp.de
Trainings und Events der ppedv
Mehr als 100 verschiedene Trainings auf
Microsoft-Technologien spezialisiert
11 Standorte in AT & D Maßgeschneiderte Trainings direkt bei Ihnen vor Ort!
www.ppedv.at
Wir sehen uns wieder!
Hat Ihnen mein Vortrag gefallen?
Ich freue mich auf Ihr Feedback!
VIELEN DANK!
Platin-Partner: Gold-Partner: Veranstaltungs-Partner: Medien-Partner:
Communardo Software GmbH
Kleiststraße 10 a
01129 Dresden
http://www.communardo.de
info@communardo.de
Phone: +49 (351) 833 820
Standort Stuttgart
Leinfelder Straße 64
70771 Leinfelden-Echterdingen
Phone: +49 (711) 220469-61
Thank you for listening!
Christian Heindel
info@christian-heindel.de
www.communardo.de
Mobile: +49 (0) 171 - 3123924
Twitter: @c_heindel
Blog: http://blog.christian-heindel.de
Blog: http://www.communardo.de/techblog/

More Related Content

What's hot

Lotusphere 2012 - Show115 - Socialize Your Apps Using OpenSocial
Lotusphere 2012 - Show115 - Socialize Your Apps Using OpenSocialLotusphere 2012 - Show115 - Socialize Your Apps Using OpenSocial
Lotusphere 2012 - Show115 - Socialize Your Apps Using OpenSocial
Ryan Baxter
 
Wired2Win Webinar: Build Enterprise Apps with Live Tiles & Notifications with...
Wired2Win Webinar: Build Enterprise Apps with Live Tiles & Notifications with...Wired2Win Webinar: Build Enterprise Apps with Live Tiles & Notifications with...
Wired2Win Webinar: Build Enterprise Apps with Live Tiles & Notifications with...
WinWire Technologies Inc
 

What's hot (19)

Development Workshop on ET1, Android and Motorola RhoElements
Development Workshop on ET1, Android and Motorola RhoElementsDevelopment Workshop on ET1, Android and Motorola RhoElements
Development Workshop on ET1, Android and Motorola RhoElements
 
Programmatic Access to and Extensibility of the IBM SmartCloud for Social Bus...
Programmatic Access to and Extensibility of the IBM SmartCloud for Social Bus...Programmatic Access to and Extensibility of the IBM SmartCloud for Social Bus...
Programmatic Access to and Extensibility of the IBM SmartCloud for Social Bus...
 
2014 HTML5 총정리
2014 HTML5 총정리2014 HTML5 총정리
2014 HTML5 총정리
 
2013년 html5 총정리 (Summary of HTML5 Trend in 2013)
2013년 html5 총정리 (Summary of HTML5 Trend in 2013)2013년 html5 총정리 (Summary of HTML5 Trend in 2013)
2013년 html5 총정리 (Summary of HTML5 Trend in 2013)
 
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hour
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hourConvert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hour
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hour
 
10 top web development frameworks (new version 21 11)
10 top web development frameworks (new version 21 11)10 top web development frameworks (new version 21 11)
10 top web development frameworks (new version 21 11)
 
Bp209
Bp209Bp209
Bp209
 
Frontend development of the (current) future
Frontend development of the (current) futureFrontend development of the (current) future
Frontend development of the (current) future
 
Experience with Google Glass and Business Applications
Experience with Google Glass and Business ApplicationsExperience with Google Glass and Business Applications
Experience with Google Glass and Business Applications
 
Building a bot with an intent
Building a bot with an intentBuilding a bot with an intent
Building a bot with an intent
 
AnDevCon: Introduction to Darwino
AnDevCon: Introduction to DarwinoAnDevCon: Introduction to Darwino
AnDevCon: Introduction to Darwino
 
Integrate any Angular Project into WebSphere Portal
Integrate any Angular Project into WebSphere PortalIntegrate any Angular Project into WebSphere Portal
Integrate any Angular Project into WebSphere Portal
 
Vue Storefront - Progressive Web App for Magento (1.9, 2.x) - MM18DE speech
Vue Storefront - Progressive Web App for Magento (1.9, 2.x) - MM18DE speechVue Storefront - Progressive Web App for Magento (1.9, 2.x) - MM18DE speech
Vue Storefront - Progressive Web App for Magento (1.9, 2.x) - MM18DE speech
 
Intro to Bot Framework v3
Intro to Bot Framework v3Intro to Bot Framework v3
Intro to Bot Framework v3
 
Lotusphere 2012 - Show115 - Socialize Your Apps Using OpenSocial
Lotusphere 2012 - Show115 - Socialize Your Apps Using OpenSocialLotusphere 2012 - Show115 - Socialize Your Apps Using OpenSocial
Lotusphere 2012 - Show115 - Socialize Your Apps Using OpenSocial
 
Philipe Riand - Building Social Applications using the Social Business Toolki...
Philipe Riand - Building Social Applications using the Social Business Toolki...Philipe Riand - Building Social Applications using the Social Business Toolki...
Philipe Riand - Building Social Applications using the Social Business Toolki...
 
HTML5 Technical Executive Summary
HTML5 Technical Executive SummaryHTML5 Technical Executive Summary
HTML5 Technical Executive Summary
 
Wired2Win Webinar: Build Enterprise Apps with Live Tiles & Notifications with...
Wired2Win Webinar: Build Enterprise Apps with Live Tiles & Notifications with...Wired2Win Webinar: Build Enterprise Apps with Live Tiles & Notifications with...
Wired2Win Webinar: Build Enterprise Apps with Live Tiles & Notifications with...
 
Staying connected: An Overview of Announcements from Microsoft’s Connect();
Staying connected: An Overview of Announcements from Microsoft’s Connect();Staying connected: An Overview of Announcements from Microsoft’s Connect();
Staying connected: An Overview of Announcements from Microsoft’s Connect();
 

Similar to Asynchrone Echtzeitanwendungen für SharePoint mit SignalR und knockout.js

SignalR powered real-time x-plat mobile apps!
SignalR powered real-time x-plat mobile apps!SignalR powered real-time x-plat mobile apps!
SignalR powered real-time x-plat mobile apps!
Sam Basu
 
SignalR Powered X-Platform Real-Time Apps!
SignalR Powered X-Platform Real-Time Apps!SignalR Powered X-Platform Real-Time Apps!
SignalR Powered X-Platform Real-Time Apps!
Sam Basu
 
SignalR Dublin ALT.NET
SignalR Dublin ALT.NETSignalR Dublin ALT.NET
SignalR Dublin ALT.NET
Dorin Manoli
 
Real time Communication with Signalr (Android Client)
Real time Communication with Signalr (Android Client)Real time Communication with Signalr (Android Client)
Real time Communication with Signalr (Android Client)
Deepak Gupta
 
FEDSPUG April 2014: Visual Studio 2013 for Application Lifecycle Management &...
FEDSPUG April 2014: Visual Studio 2013 for Application Lifecycle Management &...FEDSPUG April 2014: Visual Studio 2013 for Application Lifecycle Management &...
FEDSPUG April 2014: Visual Studio 2013 for Application Lifecycle Management &...
WSPDC & FEDSPUG
 

Similar to Asynchrone Echtzeitanwendungen für SharePoint mit SignalR und knockout.js (20)

Web e device in real time con asp.net Signal R
Web e device in real time con asp.net Signal RWeb e device in real time con asp.net Signal R
Web e device in real time con asp.net Signal R
 
Introduction to SignalR
Introduction to SignalRIntroduction to SignalR
Introduction to SignalR
 
Introduction to SignalR
Introduction to SignalRIntroduction to SignalR
Introduction to SignalR
 
Signal R 2015
Signal R 2015Signal R 2015
Signal R 2015
 
Building Real time Application with Azure SignalR Service
Building Real time Application with Azure SignalR ServiceBuilding Real time Application with Azure SignalR Service
Building Real time Application with Azure SignalR Service
 
SignalR powered real-time x-plat mobile apps!
SignalR powered real-time x-plat mobile apps!SignalR powered real-time x-plat mobile apps!
SignalR powered real-time x-plat mobile apps!
 
SignalR
SignalR SignalR
SignalR
 
SignalR Powered X-Platform Real-Time Apps!
SignalR Powered X-Platform Real-Time Apps!SignalR Powered X-Platform Real-Time Apps!
SignalR Powered X-Platform Real-Time Apps!
 
SignalR Dublin ALT.NET
SignalR Dublin ALT.NETSignalR Dublin ALT.NET
SignalR Dublin ALT.NET
 
Real time Communication with Signalr (Android Client)
Real time Communication with Signalr (Android Client)Real time Communication with Signalr (Android Client)
Real time Communication with Signalr (Android Client)
 
Building Real Time Applications with ASP.NET SignalR 2.0 by Rachel Appel
Building Real Time Applications with ASP.NET SignalR 2.0 by Rachel AppelBuilding Real Time Applications with ASP.NET SignalR 2.0 by Rachel Appel
Building Real Time Applications with ASP.NET SignalR 2.0 by Rachel Appel
 
Docker & aPaaS: Enterprise Innovation and Trends for 2015
Docker & aPaaS: Enterprise Innovation and Trends for 2015Docker & aPaaS: Enterprise Innovation and Trends for 2015
Docker & aPaaS: Enterprise Innovation and Trends for 2015
 
FEDSPUG April 2014: Visual Studio 2013 for Application Lifecycle Management &...
FEDSPUG April 2014: Visual Studio 2013 for Application Lifecycle Management &...FEDSPUG April 2014: Visual Studio 2013 for Application Lifecycle Management &...
FEDSPUG April 2014: Visual Studio 2013 for Application Lifecycle Management &...
 
A164 enterprise javascript ibm node sdk
A164 enterprise javascript ibm node sdkA164 enterprise javascript ibm node sdk
A164 enterprise javascript ibm node sdk
 
Real time communication with Azure Functions with Azure SignalR
Real time communication with Azure Functions with Azure SignalRReal time communication with Azure Functions with Azure SignalR
Real time communication with Azure Functions with Azure SignalR
 
IoT Physical Servers and Cloud Offerings.pdf
IoT Physical Servers and Cloud Offerings.pdfIoT Physical Servers and Cloud Offerings.pdf
IoT Physical Servers and Cloud Offerings.pdf
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development Pipeline
 
Building production-quality apps with Node.js
Building production-quality apps with Node.jsBuilding production-quality apps with Node.js
Building production-quality apps with Node.js
 
Delivering Developer Tools at Scale
Delivering Developer Tools at ScaleDelivering Developer Tools at Scale
Delivering Developer Tools at Scale
 
IoT with SignalR & .NET Gadgeteer - NetMF@Work
IoT with SignalR & .NET Gadgeteer - NetMF@WorkIoT with SignalR & .NET Gadgeteer - NetMF@Work
IoT with SignalR & .NET Gadgeteer - NetMF@Work
 

More from Christian Heindel

More from Christian Heindel (8)

Nintex Forms als Ersatz für InfoPath?
Nintex Forms als Ersatz für InfoPath?Nintex Forms als Ersatz für InfoPath?
Nintex Forms als Ersatz für InfoPath?
 
MobileCamp 2014: on{x} - Google Now zum Selberbauen
MobileCamp 2014: on{x} - Google Now zum SelberbauenMobileCamp 2014: on{x} - Google Now zum Selberbauen
MobileCamp 2014: on{x} - Google Now zum Selberbauen
 
Social Workflows mit Nintex Workflow und SharePoint 2013
Social Workflows mit Nintex Workflow und SharePoint 2013Social Workflows mit Nintex Workflow und SharePoint 2013
Social Workflows mit Nintex Workflow und SharePoint 2013
 
Scratch und LEGO WeDo - Wie mache ich mein Kind fit für SharePoint? ;-)
Scratch und LEGO WeDo - Wie mache ich mein Kind fit für SharePoint? ;-)Scratch und LEGO WeDo - Wie mache ich mein Kind fit für SharePoint? ;-)
Scratch und LEGO WeDo - Wie mache ich mein Kind fit für SharePoint? ;-)
 
Push-Benachrichtigungen in SharePoint via SignalR
Push-Benachrichtigungen in SharePoint via SignalRPush-Benachrichtigungen in SharePoint via SignalR
Push-Benachrichtigungen in SharePoint via SignalR
 
Collaboration Days 2011 - Mobile Anwendungen für SharePoint mit HTML5
Collaboration Days 2011 - Mobile Anwendungen für SharePoint mit HTML5Collaboration Days 2011 - Mobile Anwendungen für SharePoint mit HTML5
Collaboration Days 2011 - Mobile Anwendungen für SharePoint mit HTML5
 
SharePoint, HTML5 und mobile Geräte (SharePoint UserGroup Dresden 11/2011)
SharePoint, HTML5 und mobile Geräte (SharePoint UserGroup Dresden 11/2011)SharePoint, HTML5 und mobile Geräte (SharePoint UserGroup Dresden 11/2011)
SharePoint, HTML5 und mobile Geräte (SharePoint UserGroup Dresden 11/2011)
 
Mobile applications for SharePoint using HTML5
Mobile applications for SharePoint using HTML5Mobile applications for SharePoint using HTML5
Mobile applications for SharePoint using HTML5
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

Asynchrone Echtzeitanwendungen für SharePoint mit SignalR und knockout.js

  • 1. Formatvorlage des Untertitelmasters durch Klicken bearbeiten Platin-Partner: Gold-Partner: Veranstaltungs-Partner: Medien-Partner: Echtzeitanwendungen für SharePoint mit SignalR und knockout.js Christian Heindel, Communardo Software GmbH SignalR @c_heindel
  • 2. Lösungen für die Kommunikation und Zusammenarbeit im Unternehmen Wir sind Ihr Partner für Softwarelösungen, mit denen Sie die Kommunikation und Zusammenarbeit in Ihrem Unternehmen, sowie mit Ihren Kunden und Lieferanten nachhaltig stärken. Als Enterprise 2.0 Lösungshaus bieten wir alle Leistungen für die Realisierung und erfolgreiche Einführung, mit einem umfassenden Service an Produkten, Beratung, Softwareentwicklung, Training und Application Management. Wir sind zertifizierter Partner von Microsoft, IBM und Atlassian und damit erster Ansprechpartner für die Planung und Umsetzung Ihrer Enterprise 2.0 Lösung.
  • 3. Agenda Realtime applications • Goals, use cases, examples Push technologies • WebSockets, Comet SignalR • Connections and hubs • Client libraries, supported platforms, scalability MVVM in JavaScript • knockout.js, jQuery, JSON, oDATA Events in SharePoint • Overview Bringing it all together • SharePoint 2010 • SharePoint 2013 • SharePoint Online
  • 4. Agenda Realtime applications • Goals, use cases, examples Push technologies • WebSockets, Comet SignalR • Connections and hubs • Client libraries, supported platforms, scalability MVVM in JavaScript • knockout.js, jQuery, JSON, oDATA Events in SharePoint • Overview Bringing it all together • SharePoint 2010 • SharePoint 2013 • SharePoint Online
  • 6. Use cases In general • Adjust prices in real-time, e.g. for flight tickets • Show new comments as they come in • Activity streams In SharePoint • Show changes to list items • "Who is online?" • Chat / Shoutbox • Download counter • Task status dashboard
  • 7. TFS – Team Room Quelle: http://tfs.visualstudio.com/en-us/news/2013-jun-3
  • 12. Realtime ASP.NET Web API tracing with SignalR Video: http://www.strathweb.com/ 2012/11/realtime-asp-net-web- api-tracing-with-signalr/
  • 13. JabbR Collaborative chat done right • Project: http://about.jabbr.net/ • Code: https://github.com/JabbR/JabbR • Live demo: https://jabbR.net
  • 14. ShootR Multiplayer space ship game built on the SignalR framework. • Code: https://github.com/ ntaylormullen/shootr • Live demo: http://shootr.signalr.net/
  • 15. Tic-Tac-Toe • Code: https://github.com/fekberg/Tic-Tac-Toe • Live demo: http://signalr-tictactoe.azurewebsites.net/
  • 16. DEMO
  • 18. Agenda Realtime applications • Goals, use cases, examples Push technologies • WebSockets, Comet SignalR • Connections and hubs • Client libraries, supported platforms, scalability MVVM in JavaScript • knockout.js, jQuery, JSON, oDATA Events in SharePoint • Overview Bringing it all together • SharePoint 2010 • SharePoint 2013 • SharePoint Online
  • 19. Refresh a page after it has loaded How you could try it… • Client pull – F5, Ctrl+F5, press the “Delete cache” button hard and often, then F5 – Polling: AJAX Request every 60 seconds? Every 5 seconds? How you should do it… • Server push – WebSocket connection – Comet techniques as fallback
  • 20. Comet (a.k.a. Ajax Push, Reverse Ajax, HTTP Streaming, HTTP server push) • No page-by-page request or polling, but a long-held HTTP request • Biggest problem: HTTP 1.1 (max. 2 simultaneous connections) • Streaming: – Hidden iFrame – XMLHttpRequest – Ajax with long polling – XMLHttpRequest with long polling – Script tag long polling
  • 21. WebSockets • Full-duplex communication channel over a single TCP connection • Persistent connection • Cross origin support built in (CORS) • IETF RFC 6455 • Port 80 • WebSockets API (W3C Recommendation) • Web browser + web server need to implement it – IIS 8.0, Apache 2.x, nginx 1.3.13+, lighttpd, node.js, … – Google Chrome 14+, Internet Explorer 10+, Firefox 6+, Safari 6+ and Opera 12.10+
  • 23. Agenda Realtime applications • Goals, use cases, examples Push technologies • WebSockets, Comet SignalR • Connections and hubs • Client libraries, supported platforms, scalability MVVM in JavaScript • knockout.js, jQuery, JSON, oDATA Events in SharePoint • Overview Bringing it all together • SharePoint 2010 • SharePoint 2013 • SharePoint Online
  • 24. ASP.NET SignalR • SignalR started in July 2011 as a project by – David Fowler (Senior Software Design Engineer, ASP.NET Team) – Damien Edwards (Senior Program Manager, Microsoft) • Now official part of the ASP.NET Technologies: http://asp.net/signalr • MSDN documentation (since 03/2013): http://msdn.microsoft.com/en-us/library/jj891071(v=vs.111).aspx • Source code on GitHub • Available via NuGet Gallery (22.000+ downloads in last 6 weeks)
  • 25. Introduction to SignalR Quelle: http://www.asp.net/signalr/overview/getting-started/introduction-to-signalr
  • 26. SignalR: Features • Ready to use libraries for server and clients • Automatic connection management (send to all clients, to specific clients) • Uses WebSockets when available, fallback otherwise (abstraction layer) • Scale out to thousands of clients
  • 27. SignalR: Transports and fallbacks HTML 5 transports These transports depend on support for HTML 5. If the client browser does not support the HTML 5 standard, older transports will be used. • WebSocket • Server Sent Events, also known as EventSource (if the browser supports Server Sent Events, which is basically all browsers except Internet Explorer.) Comet transports The following transports are based on the Comet web application model, in which a browser or other client maintains a long-held HTTP request, which the server can use to push data to the client without the client specifically requesting it. • Forever Frame – for Internet Explorer only, hidden Iframe, one-way realtime connection from server to client, connection from client to server uses a separate connection, a new connection is created for each piece of data that needs to be sent • Ajax long polling – no persistent connection, but instead polling the server with a request that stays open until the server responds, at which point the connection closes, and a new connection is requested immediately, latency while the connection resets
  • 29. SignalR: Connections - Simple endpoint for sending single-recipient, grouped, or broadcast messages - Connection API (represented in .NET code by the PersistentConnection class) - direct access to the low-level communication network that SignalR exposes - familiar to developers who have used connection-based APIs such as Windows Communication Foundation
  • 30. SignalR: Hubs - high-level pipeline built upon the Connection API - allows client and server to call methods on each other directly - SignalR handles dispatching across machine boundaries as if by magic - For different types of messages, it is recommended that you use the Hub class, so that you won't have to create your own dispatching - using the Hub, you can call methods on the clients, rather than sending an explicit message that needs to be received, interpreted, and acted upon - familiar to developers who have used remote invocation APIs such as .NET Remoting
  • 31. SignalR: Supported platforms (server side) http://blogs.msdn.com/b/timlee/archive/2013/02/27/deploy-the-signalr-getting-started-sample-as-a-windows-azure-web-site.aspx
  • 32. SignalR: Supported platforms (client side) • Browsers (JavaScript) • Windows Desktop (Forms) • Silverlight • Windows Store (.NET) • Windows Store (JavaScript) • Windows Phone (IE) • Windows Phone (.NET) • Console • Web Services • iOS (Objective-C) • …
  • 33. SignalR: System requirements (Windows) • On Facebook you’d say: “It’s complicated.” • Excerpt from the documentation: • Server: 2012*, 2008 r2, Azure Website, Windows 8*, Windows 7 • .NET Framework: 4.0 / 4.5* • IIS: 7,7.5,8*, 8 Express* • Browser: IE10* • Silverlight: N/A (restr. 5+) • WP8: IE* (restr. WP8 App) • Only * supports WebSockets… 
  • 34. SignalR: Performance and scalability (I) • Standard limit in IIS: 5.000 connections per CPU • You can override this limit! • For SignalR about 20.000 connections per CPU usually also work, depends on your appliaction… • Special load test tool available: https://github.com/SignalR/SignalR/tree/dev/src/Microsoft.AspNet.SignalR.Crank
  • 35. SignalR: Performance and scalability (II) • ScaleOut providers available since SignalR 1.1 – Azure Service Bus – SQL Server – Redis
  • 36. SignalR: Performance and scalability (III) • Helpful documentation on MSDN library • How to notify the user about disconnections • How to continuously reconnect $.connection.hub.connectionSlow(function() { notifyUserOfConnectionProblem(); // Your function to notify user. }); $.connection.hub.disconnected(function() { setTimeout(function() { $.connection.hub.start(); }, 5000); // Restart connection after 5 seconds. });
  • 37. Agenda Realtime applications • Goals, use cases, examples Push technologies • WebSockets, Comet SignalR • Connections and hubs • Client libraries, supported platforms, scalability MVVM in JavaScript • knockout.js, jQuery, JSON, oDATA Events in SharePoint • Overview Bringing it all together • SharePoint 2010 • SharePoint 2013 • SharePoint Online
  • 38. Why MVVM in JavaScript? • Separate design from code • Two-way DataBinding for properties • Command binding • Templates
  • 39. Which framework to choose? knockout.js (Microsoft) spine.js SproutCore JavascriptMVC ember.js Angular.js (Google) …
  • 40. knockout.js • Simplify dynamic JavaScript UIs by applying the Model-View-View Model (MVVM) pattern • By Steve Sanderson (Microsoft employee), inspired by XAML, supports legacy browsers… Declarative Bindings Easily associate DOM elements with model data using a concise, syntaxreadable Automatic UI Refresh When your data model's state changes, your UI updates automatically Dependency Tracking Implicitly set up chains of relationships between model data, to transform and combine it Templating Quickly generate sophisticated, nested UIs as a function of your model data
  • 41. knockout.js Load JavaScript: DataBinding in HTML: Define ViewModel: Start listening: Refresh values:
  • 42. knockout.js Load JavaScript: DataBinding in HTML: Define ViewModel: Start listening: Refresh values: JSON?
  • 43. JSON – JavaScript Object Notation • Derived from JavaScript • Language independant • Human readable • Specified by Douglas Crockford in RFC 4627 • json.org launched in 2002 { "id": 1, "name": "Foo", "price": 123, "tags": [ "Bar", "Eek" ], "stock": { "warehouse": 300, "retail": 20 } }
  • 44. oDATA – Open Data Protocol • standardized protocol for creating and consuming data APIs • builds on REST web services • uniform way to expose full-featured data APIs • from Microsoft, submitted as OASIS standard • AtomPub protocol as envelope for JSON • REST methods available on sources • http://www.odata.org/
  • 45. oDATA – Open Data Protocol • standardized protocol for creating and consuming data APIs • builds on REST web services • uniform way to expose full-featured data APIs • from Microsoft, submitted as OASIS standard • AtomPub protocol as envelope for JSON • REST methods available on sources • http://www.odata.org/
  • 46. Agenda Realtime applications • Goals, use cases, examples Push technologies • WebSockets, Comet SignalR • Connections and hubs • Client libraries, supported platforms, scalability MVVM in JavaScript • knockout.js, jQuery, oDATA, JSON) Events in SharePoint • Overview Bringing it all together • SharePoint 2010 • SharePoint 2013 • SharePoint Online
  • 47. Events in SharePoint Synchronous or asynchronous (before or after) Local, app or remote (new in SP2013)
  • 48. Events in SharePoint • Item events adding, added, deleting, deleted, updating, updated, fileconverted, filemoving, filemoved, checkingin, checkedin, checkingout, checked out, attachmentadding, attachmentadded, attachmentdeleting, attachmentdeleted • List field events adding, added, deleting, deleted, updating, updated • List events adding, added, deleting, deleted • Web events adding, provisioned, deleting, deleted, moving, moved • Site events deleting, deleted • App events installed, uninstalling, upgraded • And more… EmailReceived, WorkflowCompleted, WorkflowPostponed, WorkflowStarted, WorkflowStarting, FeatureEventReceive r installation, activation, deactivation, and removal
  • 49. Agenda Realtime applications • Goals, use cases, examples Push technologies • WebSockets, Comet SignalR • Connections and hubs • Client libraries, supported platforms, scalability MVVM in JavaScript • knockout.js, jQuery, JSON, oDATA Events in SharePoint • Overview Bringing it all together • SharePoint 2010 • SharePoint 2013 • SharePoint Online
  • 50. Integration in SharePoint (on-premises) SharePoint 2010 • uses .NET Framework 3.5 • SignalR requires .NET Framework 4.0 / 4.5 •  Coding of a proxy necessary (WCF, HttpHandler or similar) SharePoint 2013 • uses .NET Framework 4.0 But: – SignalR attaches itself to the „App_Start“ event and registers a route „~/signalr/hubs“ (so that clients always find the hub) – In SharePoint, there is no „App_Start“! ¯_(ツ)_/¯ Global.asax cannot be modified in a way that deployablesolution: write a HttpModule
  • 51. Integration in SharePoint (on-premises) So in order to get it working you have to write: • HttpModule • SPWebConfigModificationHandler • VirtualPathProvider Thanks to Max Melcher, you don‘t have to: Go to Codeplex SPSignalR - real-time applications with SharePoint 2013 • enables you to host SignalR in a SharePoint WebApplication • web application feature, AppPool recycle, yoursharepoint.com/signalr/hubs
  • 52. Weak points • CORS (cross site scripting) – Different browsers handle this with different success… ;-) • Proxying required
  • 53. Integration in SharePoint Online (I) • Remote Event Receiver - Declaration
  • 54. Integration in SharePoint Online (II) • Remote Event Receiver - Implementation
  • 55. Integration in SharePoint Online (III) • SignalRHub in same project as RemoteEventReceiver
  • 57. Agenda Realtime applications • Goals, use cases, examples Push technologies • WebSockets, Comet SignalR • Connections and hubs • Client libraries, supported platforms, scalability MVVM in JavaScript • knockout.js, jQuery, JSON, oDATA Events in SharePoint • Overview Bringing it all together • SharePoint 2010 • SharePoint 2013 • SharePoint Online
  • 58. Resources • Active community – Forums: http://forums.asp.net/1254.aspx – Github: We've found 493 repository results • Official website: http://asp.net/SignalR • Videos: http://channel9.msdn.com/search?term=signalr • Trainings: http://www.pluralsight.com/training/Courses/TableOfContents/signalr- introduction • JavaScript libraries: Angular, http://smoothiecharts.org/ • Books: Pushing Data: Integrating with ASP.NET SignalR Hubs http://henriquat.re/server- integration/signalr/integrateWithSignalRHubs.html • More links: https://delicious.com/c.heindel/signalr
  • 59. Open Source projects using SignalR JabbR • JabbR is an open source, real-time web chat system built using ASP.NET and SignalR. Source code is at https://github.com/davidfowl/jabbr. ShootR • ShootR is an open source, real-time, multi-player HTML5 space shooter game, using SignalR for real-time server-client communications. Source code is at https://github.com/NTaylorMullen/ShootR. ElmahR = ELMAH & SignalR • A real-time monitoring solution for ASP.NET applications built with ELMAH and SignalR. SignalR-ObjC • A community maintained Objective-C client for SignalR, for use with iOS and Mac.
  • 61. SharePoint Camp ab 08. Juli in München ab 05. August in Berlin ab 02. September in Karlsruhe in zwei speziellen Versionen www.SharePointCamp.de Trainings und Events der ppedv Mehr als 100 verschiedene Trainings auf Microsoft-Technologien spezialisiert 11 Standorte in AT & D Maßgeschneiderte Trainings direkt bei Ihnen vor Ort! www.ppedv.at Wir sehen uns wieder!
  • 62. Hat Ihnen mein Vortrag gefallen? Ich freue mich auf Ihr Feedback!
  • 63. VIELEN DANK! Platin-Partner: Gold-Partner: Veranstaltungs-Partner: Medien-Partner:
  • 64. Communardo Software GmbH Kleiststraße 10 a 01129 Dresden http://www.communardo.de info@communardo.de Phone: +49 (351) 833 820 Standort Stuttgart Leinfelder Straße 64 70771 Leinfelden-Echterdingen Phone: +49 (711) 220469-61 Thank you for listening! Christian Heindel info@christian-heindel.de www.communardo.de Mobile: +49 (0) 171 - 3123924 Twitter: @c_heindel Blog: http://blog.christian-heindel.de Blog: http://www.communardo.de/techblog/