Bonnes pratiques de performance pour Webapp HTML5. En attendant que HTML5 devienne une référence incontournable en entreprise (sa standardisation n’est malheureusement pas près d’arriver), nous pouvons toujours nous former aux Web Workers, aux Web Sockets ou bien encore au Web Storage.
Pour l’instant cela reste de l’auto formation qui consiste à intégrer les bonnes pratiques d’utilisation et à identifier les difficultés qui seront souvent rencontrées dans des projets réels à grande envergure (nombre de connexions, utilisateurs simultanés ou requêtes par seconde). Bien souvent, ces besoins de performances nous en font voir des vertes et des pas mûres ! C’est ainsi que l’on expérimente les limites d’un framework, d’une architecture ou même d’un langage. Si vous ne connaissez pas encore HTML5Rocks, le portail de Google dédié aux développeurs HTML5, il est grand temps d’aller y faire un tour !
Les tutoriaux sont nombreux et je voulais partager avec vous celui-ci : Best Practices for a Faster Web App with HTML5. Conclusion. HTML5 JavaScript APIs. Introducing Web Sockets. By Bruce Lawson, Mike Taylor Introduction Opera 11 and above support Web Sockets, a feature once part of the HTML5 spec known as TCPConnection.
Web Sockets today, however, are specified in two places: the Web Sockets API is maintained by HTML5 editor Ian Hickson, while the Web Socket protocol is edited by Ian Fette. Web Sockets allow an application to push information back and forth between server and browser, rather than having to poll the server at set intervals or use <iframe> tricks — this allows web developers to cut down on unnecessary HTTP traffic, hacks and complexity.
In this article we will explain the background to Web Sockets, show why it is a cool feature, and give you some simple usage examples to get you up to speed. Web Sockets history Urban legend has it that Web Sockets were invented by Ian Hickson as a way to control his model train set from a browser. Why Web Sockets are cool full-duplex , that is, it allows communication in both directions simultaneously. Start Using HTML5 WebSockets Today. One of the coolest new features of HTML5 is WebSockets, which let us talk to the server without using AJAX requests.
In this tutorial, we'll review the process of running a WebSocket server in PHP, and then building a client to send and receive messages to it over the WebSocket protocol. What are WebSockets? WebSockets is a technique for two-way communication over one (TCP) socket, a type of PUSH technology. At the moment, it's still being standardized by the W3C; however, the latest versions of Chrome and Safari have support for WebSockets. What do WebSockets Replace? Websockets can replace long-polling. Many Ajax applications makes use of the above – this can often be attributed to poor resource utilization. Wouldn't it be great if the server could wake up one morning and send its data to clients who are willing to listen without some sort of pre established connection?
Step 1: Get the WebSocket Server This tutorial will focus more on the client building rather than server implementation.