Friday 11 January 2013

Ratchet: Websockets To Create Live & Responsive Web Apps With PHP

If you are a PHP programmer, you are probably used to the static method of connection between the client and the server. Once you run a script, a connection is opened from the client, the result is rendered as HTML, and then the connection immediately closes. While this has been the language of most PHP-powered websites, a new web sockets library called Ratchet takes the PHP game a step up. With Ratchet, the connection remains open until either the client or the server closes the connection. This makes it possible to create live, responsive web apps using PHP.

A good demo of Ratchet is available with this simple chat app. In this chat application, you will notice how quickly text appears once you type it in, like a native desktop app. Other action like creating chatrooms are buttery smooth and seamless, and the response to actions is instantaneous.

While modern browsers have bi-directional connections built-in, the server-side technology is yet to catch up with browser development. Ratchet hopes to bridge the gap and bring the future of the web faster. This tool is useful for PHP developers who want to explore creating live web apps.


  • Component library for PHP to create real-time web apps.
  • Documentation and API Docs available.
  • Makes event driven programming possible.
  • Makes writing live responsive apps easy.

Check out Ratchet @

No comments:

Post a Comment