HTML and CSS Reference
In-Depth Information
The blog commenting system now works in a much more dynamic way, instantly showing the
user that their comment has been posted without refreshing the page. In addition, the way the
we've added the JavaScript based functionality to the page means that if JavaScript is
disabled or a JavaScript file fails to load that the system will fallback to the standard
functionality we first implemented.
Getting Real-Time—Finally!
As with any "from scratch" tutorial it can take a bit of time to get to the really interesting part,
but we're finally here. However, all the work we've up in has been worth it . Because we've
built our commenting system up in a progressively enhanced way, plugging Pusher into it is
going to be really easy
WHAT IS PUSHER?
At the start of the tutorial we said that we would use Pusher to add the realtime functionality to
the application. But what is Pusher?
Pusher is a hosted service for quickly and easily adding realtime features into Web and mobile
applications. It offers a RESTful API that makes it really easy to publish events from any
application that can make a HTTP request and a WebSocket API for realtime bi-directional
communication. You don't even need to use the APIs directly as there are server (PHP,
17
18
Ruby, node.js, ASP.NET, Python and more) and client (JavaScript, iOS, Android, .NET,
ActionScript, Arduino and more) libraries available in a host of technologies which means you
can add realtime functionality to an app within minutes I'm confident you'll be surprised just
how easy!
SIGN UP FOR PUSHER AND GET YOUR API CREDENTIALS
In order to add Pusher-powered real-time functionality to a Web application you first need to
sign up for a free Sandbox account . After you have signed up you'll be taken to the Pusher
19
dashboard where you'll see that a "Main" application has been created for you. You'll also see
you are in the "API Access" section for that application where you can grab your API
credentials.
 
 
Search WWH ::




Custom Search