background preloader

HTML

Facebook Twitter

Websockets using Ruby Eventmachine. HTML5 is loaded with a lot of features that will make the lives of developers much easier and the experience for end users more pleasant as well.

Websockets using Ruby Eventmachine

Lets take a look one of the new features: WebSockets. We'll make the magic happen with Ruby's EventMachine gem. Mash Some Keys! If you're in a browser that supports WebSockets (Chrome, Safari, Firefox trunk), go ahead and type a bit. Your keystrokes will be captured, and broadcasted to any other users on the page. Setting Up EventMachine Using EventMachine for WebSockets is simple with the em-websockets gem. Require 'eventmachine'require 'em-websocket' @sockets = []EventMachine.run do EventMachine::WebSocket.start(:host => '0.0.0.0', :port => 8080) do |socket| socket.onopen do @sockets << socket end socket.onmessage do |mess| @sockets.each {|s| s.send mess} end socket.onclose do @sockets.delete socket end endend In the example, connected sockets are added to an array and broadcasted to when onmessage is triggered.

Client Side. HTML5 Boilerplate - A rock-solid default template for HTML5 awesome. HTML5. This specification defines the 5th major version, second minor revision of the core language of the World Wide Web: the Hypertext Markup Language (HTML).

HTML5

In this version, new features continue to be introduced to help Web application authors, new elements continue to be introduced based on research into prevailing authoring practices, and special attention continues to be given to defining clear conformance criteria for user agents in an effort to improve interoperability. This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at This document was published by the Web Platform Working Group as a W3C Recommendation for HTML 5.2 that would obsolete the HTML 5.1 Recommendation. This document was produced by a group operating under the W3C Patent Policy.

The W3C Markup Validation Service. HTML5. A vocabulary and associated APIs for HTML and XHTML Editor's Draft 28 September 2012 Latest Published Version: Latest Editor's Draft: Previous Versions: Editors: Robin Berjon , W3C Travis Leithead , Microsoft Silvia Pfeiffer Erika Doyle Navara , Microsoft Edward O'Connor , Apple Inc.

HTML5

Previous Editor: Ian Hickson , Google, Inc. This specification is available in the following formats: single page HTML , multipage HTML , web developer edition . Copyright © 2012 W3C ® ( MIT , ERCIM , Keio ), All Rights Reserved. The bulk of the text of this specification is also available in the WHATWG Web Applications 1.0 specification, under a license that permits reuse of the specification text. Abstract This specification defines the 5th major revision of the core language of the World Wide Web: the Hypertext Markup Language (HTML). Status of This document If you wish to make comments regarding this document in a manner that is tracked by the W3C, please submit them via using our public bug database . HTML5: Edition for Web Authors. This document is a strict subset of the full HTML5 specification that omits user-agent (UA) implementation details.

HTML5: Edition for Web Authors

It is targeted toward Web authors and others who are not UA implementors and who want a view of the HTML specification that focuses more precisely on details relevant to using the HTML language to create Web documents and Web applications. Because this document does not provide implementation conformance criteria, UA implementors should not rely on it, but should instead refer to the full HTML5 specification. This document is an automated redaction of the full HTML5 specification. As such, the two documents are supposed to agree on normative matters concerning Web authors. However, if the documents disagree, this is a bug in the redaction process and the unredacted full HTML specification takes precedence. This section describes the status of this document at the time of its publication. Implementors should be aware that this specification is not stable.

HTML Standard. Web Hypertext Application Technology Working Group. HTML5 — Edition for Web Developers.

DOM