<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Undisciplined Bytes &#187; HTML 5</title>
	<atom:link href="http://www.undisciplinedbytes.com/category/html-5/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.undisciplinedbytes.com</link>
	<description>Web Application Development Tips, Tricks and Techniques</description>
	<lastBuildDate>Tue, 31 Jan 2012 09:07:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>HTML 5 C# Web Sockets server and ASP.NET client implementation</title>
		<link>http://www.undisciplinedbytes.com/2010/06/html-5-c-web-sockets-server-and-asp-net-client-implementation/</link>
		<comments>http://www.undisciplinedbytes.com/2010/06/html-5-c-web-sockets-server-and-asp-net-client-implementation/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 15:02:14 +0000</pubDate>
		<dc:creator>Oliver Mezquita</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[backend]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.undisciplinedbytes.com/?p=396</guid>
		<description><![CDATA[In the previous post we saw that Web Sockets are the best invention since sliced bread: they bring to the web the bidirectional full-duplex communication traditional desktop applications have been enjoying for quite some time now. It solves many current problems, and enables much more powerful applications than current standards.
I’ve developed a very basic Web [...]]]></description>
			<content:encoded><![CDATA[<p>In the <a title="HTML 5 Web Sockets" href="http://www.undisciplinedbytes.com/2010/05/html-5-web-sockets/" target="_blank">previous post</a> we saw that Web Sockets are the best invention since sliced bread: they bring to the web the bidirectional full-duplex communication traditional desktop applications have been enjoying for quite some time now. It solves many current problems, and enables much more powerful applications than current standards.</p>
<p>I’ve developed a very basic Web Socket server implementation in C# just as a proof of concept. It handles the most basic operations you would expect from a server: start a new connection, disconnect, and send and receive data. Besides, I’ve developed the client part as well using regular ASP.NET. Actually it’s just plain HTML and JavaScript being served from an ASP.NET server – this example doesn’t use any fancy <em>runat=server </em>controls or anything of the like. The functionality is achieved with very simple and easy to understand JavaScript.</p>
<p><span id="more-396"></span></p>
<p>So what does this example do? It provides two projects: a Web Socket server and a Web Socket client. The server is a windows console application that once executed just sits there waiting for a connection request. When a client connects, the server sends its date and time to the client every 10 seconds. The client is a web page with some controls to connect/disconnect and to send data to the server, as well as a log window to see what’s going on. Take a look at the example at the bottom of the page.</p>
<p>Here’s a description of the public members of the Web Socket Server:</p>
<pre class="brush:c#">// Possible status of the server
enum ServerStatusLevel { Off, WaitingConnection, ConnectionEstablished };
// Constructor of the server with default values
WebSocketServer();
// Constructor of the server with the specified values
WebSocketServer (int serverPort, string serverLocation, string connectionOrigin);
// Close the server and release all resources
void Dispose();
// Start the server and make it listen for connection requests
void StartServer();
// Send data to the connected client
void Send (string message);
// Whether events should be logged or not
bool LogEvents;
// Origin of the connection
string ConnectionOrigin;
// Location of the server
string ServerLocation;
// Port of the server
int ServerPort;
// Current status of the server
ServerStatusLevel Status;
// Fired when data is received from the client
event DataReceivedEventHandler DataReceived;
// Fired when client is disconnected
event DisconnectedEventHandler Disconnected;
// Fired when a new connection is established
event NewConnectionEventHandler NewConnection;</pre>
<p>Note how I provide two constructors for the Web Socket Server class: one with default parameters (if you want to keep it as simple as possible), and another one to specify the values you want. Anyways, you can still change them after creating the new instance, as the properties are public. You can also specify whether you want the server to log out the events to the console with the <code>LogEvents</code> property.</p>
<p>In order to get the data being sent from the client, you must attach your own function to the <code>DataReceived</code> event, which will then receive the message as a parameter.</p>
<p>So here’s how you would use this Web Socket Server:</p>
<pre class="brush:c#">public void Test()
{
    WebSocketServer WSServer = new WebSocketServer();  // Default values
    WSServer.NewConnection += new NewConnectionEventHandler(WSServer_NewConnection);
    WSServer.Disconnected += new DisconnectedEventHandler(WSServer_Disconnected);
    WSServer.DataReceived += new DataReceivedEventHandler(WSServer_DataReceived);
    WSServer.StartServer();
}

void WSServer_DataReceived(string message, EventArgs e)
{
    Console.WriteLine("Data received from the client: " + message);
}

void WSServer_Disconnected(EventArgs e)
{
    Console.WriteLine("Server disconnected");
}

void WSServer_NewConnection(EventArgs e)
{
    Console.WriteLine("New connection established");
    WSServer.Send("Hello new client! I hope you enjoy your visit!");
}</pre>
<p>It’s a very simple Web Socket server, so it’s very easy to use. You shouldn’t have much problem understanding it.</p>
<p>Go ahead and download the Visual Studio solution and give it a try!</p>
<p><strong>UPDATE </strong><strong>(October 12th, 2010):</strong></p>
<p><strong>The Web Socket protocol is not closed yet, so it is being constantly updated. This means that previous Web Socket server implementations might stop working after an update has been made to the API. The original version of the code I released here complied with version 75 of the Web Socket draft. The current version is 76, so I updated my code and released a second project.</strong></p>
<p>No idea of what I&#8217;m talking about? I&#8217;ll make it easy for you&#8230; download the v76 implementation first, and if it doesn&#8217;t work then check out the v75 implementation. If you&#8217;re using one of the latest browsers, you should have no trouble.</p>
<p><del><a href="http://www.undisciplinedbytes.com/wp-content/uploads/2010/06/WebSocketsTest.zip" target="_self">WebSocketsTest (draft 75).zip</a></del> (Older browsers)</p>
<p><a title="Web Sockets Test" href="http://www.undisciplinedbytes.com/wp-content/uploads/2010/10/WebSocketsTestdraft76.zip" target="_self"><strong>WebSocketsTest (draft 76).zip</strong></a><strong> (Latest browsers)</strong></p>


<h4>Related posts:</h4><p><ol><li><a href='http://www.undisciplinedbytes.com/2010/05/html-5-web-sockets/' rel='bookmark' title='Permanent Link: HTML 5 Web Sockets'>HTML 5 Web Sockets</a></li>
<li><a href='http://www.undisciplinedbytes.com/2010/03/ajax-call-using-an-asp-net-web-page/' rel='bookmark' title='Permanent Link: AJAX call using an ASP.NET web page'>AJAX call using an ASP.NET web page</a></li>
<li><a href='http://www.undisciplinedbytes.com/2010/03/ajax-call-using-an-asp-net-http-handler/' rel='bookmark' title='Permanent Link: AJAX call using an ASP.NET HTTP Handler'>AJAX call using an ASP.NET HTTP Handler</a></li>
<li><a href='http://www.undisciplinedbytes.com/2010/04/ajax-call-using-an-asp-net-page-method/' rel='bookmark' title='Permanent Link: AJAX call using an ASP.NET Page Method'>AJAX call using an ASP.NET Page Method</a></li>
<li><a href='http://www.undisciplinedbytes.com/2010/04/ajax-call-using-asp-net-web-services/' rel='bookmark' title='Permanent Link: AJAX call using ASP.NET Web Services'>AJAX call using ASP.NET Web Services</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.undisciplinedbytes.com/2010/06/html-5-c-web-sockets-server-and-asp-net-client-implementation/feed/</wfw:commentRss>
		<slash:comments>35</slash:comments>
		</item>
		<item>
		<title>HTML 5 Web Sockets</title>
		<link>http://www.undisciplinedbytes.com/2010/05/html-5-web-sockets/</link>
		<comments>http://www.undisciplinedbytes.com/2010/05/html-5-web-sockets/#comments</comments>
		<pubDate>Sun, 30 May 2010 18:07:48 +0000</pubDate>
		<dc:creator>Oliver Mezquita</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[backend]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.undisciplinedbytes.com/?p=386</guid>
		<description><![CDATA[Following the series of posts discussing AJAX calls, today we’ll see what is going to be its evolution: Web Sockets. It’s still a very new technology, and support is starting to be implemented in most major browsers and web servers. But don’t count on using it yet, since most of the clients of your web [...]]]></description>
			<content:encoded><![CDATA[<p>Following the <a title="ajax calls" href="http://www.undisciplinedbytes.com/2010/02/how-to-make-an-ajax-call-using-jquery-and-asp-net-i/" target="_blank">series of posts discussing AJAX calls</a>, today we’ll see what is going to be its <strong>evolution</strong>: Web Sockets. It’s still a very new technology, and support is starting to be implemented in most major browsers and web servers. But don’t count on using it yet, since most of the clients of your web app will not be able to use them. I’ll discuss web sockets here just so you know what the future is going to bring to the web apps world.</p>
<h4>The history: the beginning of AJAX</h4>
<p>The world wide web and the Internet started as a stateless content delivery mechanism, taking a step backwards compared to traditional desktop applications. Early Internet applications needed to explicitly request every piece of information, and the server sent only the requested data.</p>
<p>Then came what we now call “Web 2.0 application development”: Dynamic HTML, heavy usage of JavaScript, AJAX, and various plugins (Adobe Flash and Microsoft Silverlight). These applications were dynamic and responsive, and they brought much of that rich interactive experience users enjoyed in desktop client/server applications to the Internet. However, due to the request and response architecture that these applications are based on, the latest Rich Internet Applications still cannot match the connectivity and the capability to get real-time data that client/server applications had more than a decade ago.</p>
<p><span id="more-386"></span></p>
<p>The reason is that these applications still need to initiate the communication from the web browser to get some data from the server: that is, the client part of the application running in the web browser has no way to know whether the server has some data for it.</p>
<h4>The next logical step: polling and Comet programming techniques</h4>
<p>Thus, software engineers started working in solving this problem. The client needed to be conscious of any request the server might have for it. But how to achieve this? Well, if communication can only be started by the client, then let’s just make it that way. We’ll make the client constantly ask the server whether there’s some data ready for it. This is what is called <strong>polling</strong>.</p>
<p>By using this technique, the web application essentially polls the server on a regular basis, based on a timer, using a simple HTTP request each time the timer expires. However, the cost of polling frequently is very high – both in terms of network bandwidth as well as server infrastructure needed to support a huge number of polling requests. The server must have the capability to buffer the data that it needs to send to the client until the next request comes from the client.</p>
<p>After a short while, this technique was seen totally unusable due to its great resource requirements. Then came the <strong>Comet programming techniques –</strong> long polling and streaming:</p>
<p>In <strong>long polling</strong>, also known as asynchronous polling, the browser sends a request to the server and the server keeps the request open for a set period. If a notification is received within that period, a response containing the message is sent to the client. If a notification is not received within the set time period, the server sends a response to terminate the open request and the browser resends the request to the server.</p>
<p>When <strong>streaming</strong> is used, the browser sends a complete request, but the server sends and maintains an open response that is continuously updated. A request is sent and kept open indefinitely (or for a set period of time) and the response is updated whenever a message is ready to be sent, but the server never signals to complete the response, thus keeping the connection open to deliver future messages.</p>
<p>But if you think about it, these techniques are just <strong>hacks</strong>, <strong>tricks</strong> used to <em><strong>simulate</strong></em> a technology that doesn’t exist: server-sent events. If the server could actually start the communication, none of these ugly tricks would be needed.</p>
<h4>The evolution: server-sent events &amp; Web Sockets</h4>
<p>We had to wait until HTML 5 came to solve this problem. The Communication section in the HTML 5 specification section introduces server-sent events and Web Sockets. These new features enable a new paradigm of web application programming that will revolutionize the way to develop and deploy web applications.</p>
<p>Server-sent events are not quite the solution, but a formalization of Comet programming techniques. The server-sent event HTML 5 specification introduces a new DOM element called <em>eventsource</em>.</p>
<p>But the guy we must pay all our attention to is the HTML 5 Web Socket specification: the Web Socket interface defines a<strong> full duplex communications channel</strong> that is exposed via a JavaScript interface in HTML 5 compliant browsers.</p>
<p>When a new Web Socket connection is established, the browser opens an HTTP connection to the server first and then negotiates with the server to upgrade the connection to a dedicated and persistent Web Socket connection. This process automatically sets up a tunnel through to the server, solving numerous issues that the various Comet programming techniques encountered. Once established the Web Socket is a full duplex channel between the client and the server.</p>
<p>I&#8217;ve developed a Web Socket server and client implementation. <a href="http://www.undisciplinedbytes.com/2010/06/html-5-c-web-sockets-server-and-asp-net-client-implementation/">Check it out</a> for yourself and see what I&#8217;m talking about!</p>


<h4>Related posts:</h4><p><ol><li><a href='http://www.undisciplinedbytes.com/2010/06/html-5-c-web-sockets-server-and-asp-net-client-implementation/' rel='bookmark' title='Permanent Link: HTML 5 C# Web Sockets server and ASP.NET client implementation'>HTML 5 C# Web Sockets server and ASP.NET client implementation</a></li>
<li><a href='http://www.undisciplinedbytes.com/2010/02/how-to-make-an-ajax-call-using-jquery-and-asp-net-i/' rel='bookmark' title='Permanent Link: Different ways to use AJAX in ASP.NET'>Different ways to use AJAX in ASP.NET</a></li>
<li><a href='http://www.undisciplinedbytes.com/2010/03/ajax-call-using-an-asp-net-web-page/' rel='bookmark' title='Permanent Link: AJAX call using an ASP.NET web page'>AJAX call using an ASP.NET web page</a></li>
<li><a href='http://www.undisciplinedbytes.com/2010/04/ajax-call-using-asp-net-web-services/' rel='bookmark' title='Permanent Link: AJAX call using ASP.NET Web Services'>AJAX call using ASP.NET Web Services</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.undisciplinedbytes.com/2010/05/html-5-web-sockets/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>CSS 3: one more step in the evolution of the web</title>
		<link>http://www.undisciplinedbytes.com/2009/12/css-3-one-more-step-in-the-evolution-of-the-web/</link>
		<comments>http://www.undisciplinedbytes.com/2009/12/css-3-one-more-step-in-the-evolution-of-the-web/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 15:01:41 +0000</pubDate>
		<dc:creator>Oliver Mezquita</dc:creator>
				<category><![CDATA[Documentation]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[Semantic web]]></category>

		<guid isPermaLink="false">http://www.undisciplinedbytes.com/2009/12/css-3-one-more-step-in-the-evolution-of-the-web/</guid>
		<description><![CDATA[CSS 2 was released in 1997, and after more than 10 years it needs to be updated to reflect the new uses and trends we’ve been seeing in the web. This new version of Cascading Style Sheets brings new features long awaited that will make web development easier. Alongside with HTML 5, this new version [...]]]></description>
			<content:encoded><![CDATA[<p>CSS 2 was released in 1997, and after more than 10 years it needs to be updated to reflect the new uses and trends we’ve been seeing in the web. This new version of <a href="http://en.wikipedia.org/wiki/Cascading_Style_Sheets" target="_blank">Cascading Style Sheets</a> brings new features long awaited that will make web development easier. Alongside with <a href="http://www.undisciplinedbytes.com/2009/11/html-5-dramatic-improvements-in-the-web-language/" target="_blank">HTML 5</a>, this new version represents the evolution of the web, and aims to take the concept of <a href="http://www.undisciplinedbytes.com/2009/11/the-semantic-web/" target="_blank">semantics</a> into the core of the web.</p>
<p>CSS 3 has quite a few new concepts. Let’s take a look:</p>
<p><span id="more-239"></span></p>
<h4>New properties</h4>
<ul>
<li><strong>Borders</strong>: border-color, border-image, border-radius, box-shadow.</li>
<li><strong>Backgrounds</strong>: background-origin, background-clip, background-size, layering multiple background images.</li>
<li><strong>Color</strong>: HSL colors, HSLA colors, RGBA colors opacity.</li>
<li><strong>Text</strong>: text-shadow, text-overflow.</li>
<li><strong>Interface</strong>: box-sizing, resize.</li>
<li><strong>Selectors</strong>: attribute selectors.</li>
<li><strong>Formats</strong>: media queries, multiple column layout, speech.</li>
</ul>
<h4>New features</h4>
<p>Using these new properties we’ll be able to achieve things such as:</p>
<ul>
<li><strong>Borders, background</strong><br />
CSS 3 will allow images for borders, round corners and shadows. Objects can not only be positioned, but its direction can also be changed (horizontal or vertical).</li>
<li><strong>Multi-column layout</strong><br />
Designing pages with multiple columns now will be easier than ever. Until now we needed to enclose the content in two separate DIVs to simulate a two-column layout; now we’ll just use <code>column-count: 2</code>. Not all that hard, right?</li>
<li><strong>Advanced Layout</strong><br />
This new feature will allow objects to be distributed along the screen in a better an easier way, and combine them in different manners without additional tags. Besides, the page model will be included: this means that we will be able to indicate page footers, crossed references, and section headers.</li>
<li><strong>Selectors </strong><br />
There are new selectors to make it easier locating exactly the element you want:<br />
<code>E:only-of-type</code>: an element which is unique in its type.<br />
<code>E:not(s)</code>: an element which doesn’t match simple selector.<br />
<code>E ~ F</code>: an element F with an element E right before.<br />
<code>E:nth-child</code>: the n-th child element of a parent node. With this selector we’ll be able to implement things such as <strong>zebra tables.</strong><br />
<code>E:nth-last-child</code>: the last child element from a parent node.<br />
<code>E:nth-of-type</code>: the n-th element which is of a certain type.<br />
<code>E:first-of-type</code>: the first element which is of a certain type.</li>
<li><strong>Resizing </strong><br />
Up till now, if we wanted our elements to be resizable we needed to use Javascript to alter its attributes. With CSS 3 it will now be a task of the browser, just by using the <code>resize</code> property.</li>
<li><strong>And many more things …</strong></li>
</ul>
<p>Some properties of CSS 3 <a href="http://westciv.com/wiki/Experimental_CSS_compatibility_table" target="_blank">are already being implemented in most major browsers</a>. There’s not a 100% fully compliant web browser yet (specially because CSS 3 is not finished yet), but it won’t take much time to have one. This means that maybe we won’t be able to use all of these new features right now, but we can certainly start using some of them. So, what are you waiting for? The sooner the better!</p>
<h4>Further reading</h4>
<ul>
<li><a href="http://www.w3.org/TR/css3-roadmap/" target="_blank">W3C CSS3</a></li>
<li><a href="http://www.css3.info">www.css3.info</a></li>
<li><a href="http://www.webappers.com/2009/08/10/70-must-have-css3-and-html5-tutorials-and-resources/" target="_blank">70 Must-Have CSS3 and HTML5 Tutorials and Resources</a></li>
</ul>


<h4>Related posts:</h4><p><ol><li><a href='http://www.undisciplinedbytes.com/2009/11/html-5-dramatic-improvements-in-the-web-language/' rel='bookmark' title='Permanent Link: HTML 5: dramatic improvements in the web language'>HTML 5: dramatic improvements in the web language</a></li>
<li><a href='http://www.undisciplinedbytes.com/2009/11/the-semantic-web/' rel='bookmark' title='Permanent Link: The Semantic Web'>The Semantic Web</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.undisciplinedbytes.com/2009/12/css-3-one-more-step-in-the-evolution-of-the-web/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>HTML 5: dramatic improvements in the web language</title>
		<link>http://www.undisciplinedbytes.com/2009/11/html-5-dramatic-improvements-in-the-web-language/</link>
		<comments>http://www.undisciplinedbytes.com/2009/11/html-5-dramatic-improvements-in-the-web-language/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 15:00:23 +0000</pubDate>
		<dc:creator>Oliver Mezquita</dc:creator>
				<category><![CDATA[Documentation]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[Semantic web]]></category>

		<guid isPermaLink="false">http://www.undisciplinedbytes.com/?p=200</guid>
		<description><![CDATA[HTML 5 is a new revision of the standard language that moves the web. The increase in needs has brought new uses in HTML and new tags to support them, paying special attention to the semantic web. There are quite a few elements added to the new HTML standard to encapsulate different types of information:

New [...]]]></description>
			<content:encoded><![CDATA[<p>HTML 5 is a new revision of the standard language that moves the web. The increase in needs has brought new uses in HTML and new tags to support them, paying special attention to the semantic web. There are quite a few elements added to the new HTML standard to encapsulate different types of information:</p>
<p><span id="more-200"></span></p>
<h4>New tags</h4>
<ul>
<li><code>&lt;article /&gt;</code> This new element defines a portion of the content as an article. Perfect for newspapers or blogs.</li>
<li><code>&lt;aside /&gt;</code> Represents a fragment of information that slightly relates with the rest of the content.</li>
<li><code>&lt;dialog /&gt;</code> Depicts conversations.</li>
<li><code>&lt;figure /&gt;</code> Used to associate a caption with an embedded content, such as graphics or video.</li>
<li><code>&lt;footer /&gt;</code> Page section to hold author information, copyright statement, etc&#8230;</li>
<li><code>&lt;header /&gt;</code> Page section to hold some introductory information.</li>
<li><code>&lt;nav /&gt;</code> Section oriented to navigation.</li>
<li><code>&lt;section /&gt;</code> Element that defines a generic section.</li>
<li><code>&lt;audio /&gt;</code> and &lt;video /&gt; Provides multimedia content.</li>
<li><code>&lt;embed /&gt;</code> Supports plugin contents.</li>
<li><code>&lt;m /&gt;</code> Marked text.</li>
<li><code>&lt;meter /&gt;</code> Used to display measures.</li>
<li><code>&lt;time /&gt;</code> Used to display dates and/or time.</li>
<li><code>&lt;canvas /&gt;</code> Used to show real-time renderized graphics, such as games. For example, <a href="http://www.undisciplinedbytes.com/2009/10/html-5-canvas-tag-demonstration-sierra-adventure-games/" target="_blank">Sierra adventure games.</a></li>
<li><code>&lt;command /&gt;</code> Related with commands a user can invoke.</li>
<li><code>&lt;datagrid /&gt;</code> Shows additional information if it is requested by the user.</li>
<li><code>&lt;datalist /&gt;</code> Used together with the new attribute for &lt;input /&gt; can be used to create comboboxes.</li>
<li><code>&lt;output /&gt;</code> Denotes what kind of output the page produces.</li>
<li><code>&lt;progress /&gt;</code> Represents a progress bar in a time consuming task, such as donwloading a file.</li>
</ul>
<h4>New local attributes</h4>
<p>There&#8217;s a few new attributes for some of the elements that were already present in HTML4.</p>
<ul>
<li><code>media</code>: for greater consistency with the <code>link</code> element.</li>
<li><code>ping</code>: whitespace-delimited URLs list to which a ping will be produced when the link is followed. For the elements <code>&lt;area /&gt;</code> and <code>&lt;a /&gt;</code>.</li>
<li><code>target</code>: for greater consistency the <code>&lt;a /&gt;</code> element.</li>
<li><code>autofocus</code>: indicates that the <code>&lt;input /&gt;, &lt;select /&gt;, &lt;textarea /&gt;</code> or <code>&lt;button /&gt;</code> element should get the focus at page load.</li>
<li><code>form</code>: attribute for <code>&lt;input /&gt;, &lt;ouput /&gt;, &lt;select /&gt; &lt;textarea /&gt;, &lt;button /&gt;</code> and <code>&lt;fieldset /&gt;</code> which allows them to be associated to a form. This way, they can now be placed anywhere on a page, not as children of the <code>form</code> element.</li>
<li><code>replace</code>: will affect the element once changes are performed to it. For elements <code>&lt;input /&gt;, &lt;button /&gt;</code> and <code>&lt;form /&gt;</code>.</li>
<li><code>data</code>: specifies data for the elements <code>&lt;form /&gt;, &lt;select /&gt;</code> and <code>&lt;datalist /&gt;</code>.</li>
<li><code>required</code>: denotes a required element, for <code>&lt;input /&gt;</code> and <code>&lt;textarea /&gt;</code>.</li>
<li><code>disabled</code>: for the <code>&lt;fieldset /&gt;</code> element.</li>
<li><code>autocomplete, min, max, pattern, step</code>: these attributes delimitate the possibilities of the <code>&lt;input /&gt;</code> element.</li>
<li><code>list</code>: for <code>&lt;datalist /&gt;</code> and <code>&lt;select /&gt; </code> elements.</li>
<li><code>template</code>: for <code>&lt;input /&gt;</code> and <code>&lt;button /&gt;</code> elements, it will be used to repeat templates.</li>
<li><code>scoped</code>: for the <code>&lt;style /&gt;</code> element, enables the use of scoped style sheets.</li>
<li><code>async</code>: for the <code>&lt;script /&gt;</code> element. AJAX turned into an attribute.</li>
</ul>
<h4>New global attributes</h4>
<p>Some attributes that apply to the whole web page document:</p>
<ul>
<li><code>contenteditable</code>: denotes an editable area.</li>
<li><code>contextmenu</code>: contextual menu supplied by the user.</li>
<li><code>draggable</code>: &#8230; needs explanation?</li>
<li><code>tabindex</code>: a numeric value representing the order of elements we will tour around when pressing the TAB key.</li>
<li><code>irrelevant</code>: &#8230; need I say more?</li>
<li><code>repeat, repeat-start, repeat-min, repeat-max</code>: these attributes refer to iterations.</li>
</ul>
<h4>HTMLDocument extensions</h4>
<p>There are some improvements, and some other elements that finally get standarized:</p>
<ul>
<li><code>getElementsByClassName()</code>: selects elements given a class. Time responses seem to be dramatically improved by using this function.</li>
<li><code>innerHTML</code>: present in all ECMAScript implementations, it was not a standard till now.</li>
<li><code>activeElement, hasFocus()</code>: will allow us to know which is element is active and which one has the focus.</li>
<li><code>getSelection()</code>: returns an object with the current selection.</li>
<li><code>designMode, execCommand()</code>: used to edit documents.</li>
</ul>
<h4>HTMLElement extensions:</h4>
<p>The DOM element has also had some changes:</p>
<ul>
<li><code>getElementsByClassName()</code>: returns the children of an element that has a given class.</li>
<li><code>innerHTML</code>: reads/changes the content of a node.</li>
<li><code>classList</code>: a very interesting implementation that, along with <code>className</code>, lets us interact with element classes, providing methods such as <code>has(), toggle(), add()</code> and <code>remove()</code>.</li>
<li><code>relList</code>: works as <code>classList</code> on the rel attributes of the elements <code>&lt;a /&gt;, &lt;area /&gt; and &lt;link /&gt;</code>.</li>
</ul>
<p>This is just a quick overview of the most important changes that HTML will bring. But there&#8217;s many more not mentioned here. For a complete reference guide, consult the <a href="http://dev.w3.org/html5/html4-differences/Overview.html" target="_blank">W3C official draft</a>.</p>
<p>HTML 5 is still a draft. Its definition is not finished yet. But all major browsers are already starting to implement some of its features. There&#8217;s still many years to wait for HTML 5 to be as widespread as HTML 4.01 is today, but the improvements this new version bring are so impressive that may affect its adoption speed. The originally proposed name for HTML 5 was <strong>Web Applications 1.0</strong>, which provides a very good idea about the goal of this new standard.</p>
<h4>Further reading</h4>
<ul>
<li> <a href="http://www.sitepoint.com/article/html-5-snapshot-2009/" target="_blank">Yes, you can use HTML 5 today!</a></li>
<li><a href="http://www.smashingmagazine.com/2009/07/06/html-5-cheat-sheet-pdf/" target="_blank">HTML 5 cheat sheet</a></li>
<li><a href="http://www.smashingmagazine.com/2009/08/04/designing-a-html-5-layout-from-scratch/" target="_blank">Coding an HTML 5 layout from scratch</a></li>
<li><a href="http://molly.com/html5/html5-0709.html" target="_blank">A selection of supported features in HTML 5</a></li>
<li><a href="http://jontangerine.com/log/2008/03/preparing-for-html5-with-semantic-class-names" target="_blank">Preparing for HTML 5 with semantic class names</a></li>
</ul>


<h4>Related posts:</h4><p><ol><li><a href='http://www.undisciplinedbytes.com/2009/12/css-3-one-more-step-in-the-evolution-of-the-web/' rel='bookmark' title='Permanent Link: CSS 3: one more step in the evolution of the web'>CSS 3: one more step in the evolution of the web</a></li>
<li><a href='http://www.undisciplinedbytes.com/2010/05/html-5-web-sockets/' rel='bookmark' title='Permanent Link: HTML 5 Web Sockets'>HTML 5 Web Sockets</a></li>
<li><a href='http://www.undisciplinedbytes.com/2009/11/the-semantic-web/' rel='bookmark' title='Permanent Link: The Semantic Web'>The Semantic Web</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.undisciplinedbytes.com/2009/11/html-5-dramatic-improvements-in-the-web-language/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The Semantic Web</title>
		<link>http://www.undisciplinedbytes.com/2009/11/the-semantic-web/</link>
		<comments>http://www.undisciplinedbytes.com/2009/11/the-semantic-web/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 15:00:31 +0000</pubDate>
		<dc:creator>Oliver Mezquita</dc:creator>
				<category><![CDATA[Documentation]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[Semantic web]]></category>

		<guid isPermaLink="false">http://www.undisciplinedbytes.com/?p=139</guid>
		<description><![CDATA[Semantics, as defined in Wikipedia:
Semantics is the study of meaning, usually in language. The word &#8220;semantics&#8221; itself denotes a range of ideas [...]. It is often used [...] to denote a problem of understanding that comes down to word selection or connotation.
The Semantic Web is an extended web, with a greater meaning, in which users [...]]]></description>
			<content:encoded><![CDATA[<p>Semantics, as <a href="http://en.wikipedia.org/wiki/Semantics" target="_blank">defined in Wikipedia</a>:</p>
<blockquote><p>Semantics is the study of meaning, usually in language. The word &#8220;semantics&#8221; itself denotes a range of ideas [...]. It is often used [...] to denote a problem of understanding that comes down to word selection or connotation.</p></blockquote>
<p>The Semantic Web is an extended web, with a greater meaning, in which users will be able to find answers to their questions faster and easier due to a better-defined information. This meaning-based web is supported by a set of standardized  languages that solve the problems the semantic-less web has, in which access to some information is a difficult and frustrating task.</p>
<p><span id="more-139"></span></p>
<p>The web has changed the way we communicate and do our work. Worldwide low-cost instantaneous communication is possible nowadays. We have access to millions of resources, regardless of our geographic location or language. These features have made the web tremendously successful&#8230; and at the same time they have provided its <strong>biggest problems: information overload and heterogeneity of information sources.</strong></p>
<p><strong>The Semantic Web aims at solving these two great problems</strong>, allowing software to perform some of the tasks the user must take care of now. Thanks to semantics in the web, software can process its contents and make logical decisions to solve everyday problems automatically.</p>
<p>Imagine you would want to find the nearest open pharmacy. You would go to your favorite web search engine and type <strong><em>&#8220;pharmacies open right now&#8221;</em></strong>. Today&#8217;s search engines would offer different information about pharmacies, but nothing related to what the user <strong>exactly</strong> wants to know. The next step would be to go through all the options listed and manually search for the precise information. Figure 1 shows the results a user would get with a regular search engine today.</p>
<p>By building semantics into the core of the web the search results would be accurate. Software would be able to properly understand what the user is asking for. Figure 2 shows results with a semantic search engine. These results give the user the exact information he was looking for. Geographic location would be detected automatically, and words like<em> &#8220;right now&#8221; </em>acquire greater sense and get translated to today&#8217;s date. All the information would be full of meaning.</p>
<table border="0">
<tbody>
<tr>
<td style="text-align: center;" colspan="2">Searching <strong>&#8220;pharmacies open right now&#8221;<strong> </strong></strong></td>
</tr>
<tr>
<td width="50%"><a href="javascript:;">How much does it cost to open a pharmacy &#8211; How much does it cost &#8230;</a><br />
How much does it cost to open a pharmacy? Can you please guide me. A little advice would go &#8230;</p>
<p><a href="javascript:;">Pharmacy: what it is and how it works</a><br />
One such time is right now, &#8230; the nation&#8217;s 37000 chain store pharmacies had almost 6000 open pharmacist jobs&#8230;</p>
<p><a href="javascript:;">E-Learning: Chemistry Central and Fully Open Access</a><br />
It is hard to tell exactly what this will mean for Open Access chemistry research. Right now the vast majority of articles &#8230;</td>
<td><a href="javascript:;">Mike&#8217;s pharmacy: open 8am &#8211; 10pm</a><br />
The pharmacy you can trust, right in your neighborhood. We open at 8am and close at 10pm to serve all your needs.</p>
<p><a href="javascript:;">The Best Drugstore</a><br />
&#8230; open till late, you will find all the medicines you are looking for &#8230;</p>
<p><a href="javascript:;">Your neighborhood pharmacy</a><br />
Just 5 minutes away, you&#8217;ll get special deals in most of our products. Come visit us any time, we are open 24/7.</td>
</tr>
<tr>
<td style="text-align: center;"><em>Figure 1: Results from a regular search engine</em></td>
<td style="text-align: center;"><em>Figure 2: Results from a semantic search engine</em></td>
</tr>
</tbody>
</table>
<p>The way information will be processed won&#8217;t be based on input/output parameters, but on its semantics. The Semantic Web provides an infrastructure based on metadata, allowing software to reason on the web, extending its capabilities.</p>
<p>It&#8217;s not about a magical artificial intelligence that will enable machines to understand human words&#8230; it&#8217;s just the skill of a machine to solve well-defined problems through well-defined operations that will be performed on a well-defined data set.</p>
<h4>Further reading</h4>
<p>This article covered just the very basics of the Semantic Web. If you&#8217;re still interested, you can expand your knowledge at:</p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Semantic_Web" target="_blank">Semantic Web</a></li>
<li><a href="http://en.wikipedia.org/wiki/Web_Ontology_Language" target="_blank">Web Ontology Language</a></li>
<li><a href="http://semanticweb.org/wiki/Main_Page" target="_blank">semanticweb.org</a></li>
<li><a href="http://swoogle.umbc.edu/" target="_blank">Swoogle: experimental semantic search engine</a> (if you&#8217;re going to use this, you might as well be interested in the <a href="http://swoogle.umbc.edu/index.php?option=com_swoogle_manual&amp;manual=faq" target="_blank">FAQ</a>)</li>
</ul>


<h4>Related posts:</h4><p><ol><li><a href='http://www.undisciplinedbytes.com/2009/11/html-5-dramatic-improvements-in-the-web-language/' rel='bookmark' title='Permanent Link: HTML 5: dramatic improvements in the web language'>HTML 5: dramatic improvements in the web language</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.undisciplinedbytes.com/2009/11/the-semantic-web/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>HTML 5 canvas tag demonstration: Sierra adventure games</title>
		<link>http://www.undisciplinedbytes.com/2009/10/html-5-canvas-tag-demonstration-sierra-adventure-games/</link>
		<comments>http://www.undisciplinedbytes.com/2009/10/html-5-canvas-tag-demonstration-sierra-adventure-games/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 14:00:35 +0000</pubDate>
		<dc:creator>Oliver Mezquita</dc:creator>
				<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.undisciplinedbytes.com/?p=66</guid>
		<description><![CDATA[Can you imagine playing good old games you used to play when you were a kid in your browser? Yeah sure, there&#8217;s plenty of cool games developed in flash, you would say. Well, leave out flash. Leave out Java as well. Leave out any plugin that needs to be installed in your browser. What do [...]]]></description>
			<content:encoded><![CDATA[<p>Can you imagine playing good old games you used to play when you were a kid in your browser? Yeah sure, there&#8217;s plenty of cool games developed in flash, you would say. Well, leave out flash. Leave out Java as well. Leave out any plugin that needs to be installed in your browser. What do we have left? Just plain HTML and Javascript. Now, that&#8217;s something different from what we&#8217;re used to see.</p>
<p><a href="http://martinkool.com/" target="_blank">Martin Kool</a> has made this possible. He has developed an <a href="http://sarien.net/source" target="_blank">open source engine</a> to play games straight in your browser, using the <a href="http://www.w3schools.com/tags/html5_canvas.asp" target="_blank">canvas tag</a> from <strong>HTML 5</strong>. And besides, he has ported many of the old <a href="http://wiki.scummvm.org/index.php/Sierra" target="_blank">Sierra adventure games</a>, like <em>Leisure Suit Larry in the Land of the Lounge Lizards, Space Quest I: The Sarien Encounter, Gold Rush, </em>etc.</p>
<p><span id="more-66"></span></p>
<div id="attachment_68" class="wp-caption aligncenter" style="width: 391px"><a href="http://www.undisciplinedbytes.com/wp-content/uploads/2009/10/LeisureSuiteLarry.jpg"><img class="size-full wp-image-68 " title="LeisureSuiteLarry" src="http://www.undisciplinedbytes.com/wp-content/uploads/2009/10/LeisureSuiteLarry.jpg" alt="Leisure Suite Larry" width="381" height="234" /></a><p class="wp-caption-text">I would say it has kind of a retro look ...</p></div>
<p>This engine works on Firefox 2+, IE 6+, Chrome, Safari and Opera. It also seems to work on iPhone and Wii (although it may still need some tweaks). <a href="http://sarien.net/" target="_blank">You can play these games</a> with both keyboard and mouse. And if you&#8217;re tired of playing you can save your game and continue from that point the next day: an URL is generated containing your position and status.</p>
<h4>Making of</h4>
<p>Martin tells us in <a href="http://sarien.net/about" target="_blank">his pages</a> how he managed to develop the whole thing:</p>
<blockquote><p>In 2003, I created Good Old Adventures. It was a chat environment set in the Sierra worlds without actual gameplay. All images were manually crafted, copy/pasting from WinAGI Game Development Studio. A time consuming process.</p>
<p>Four years later I wrote a few conversion tools in .NET to extract Sierra&#8217;s in-game images and objects from the original games, and display them properly on the web. The &#8220;only thing&#8221; left to do then was to export and understand all in-game logics.</p>
<p>I was able to convert the logics to javascript, but there was one big problem: Sierra&#8217;s code used GOTO statements, and those could jump anywhere in the code, even inside a nested &#8220;if&#8221;-statement. It seemed unsolvable in javascript.</p>
<p>I sat down together with Sjoerd Visscher, one of my collegues at Q42, and we came up with a solution. Using a decompilation approach to get rid of nested &#8220;if&#8221;-statements and putting the whole shebang inside a huge switch/case statement, we could mimic line numbers and GOTO&#8217;s while maintaining performance.</p></blockquote>
<p>Martin&#8217;s achievement is some impressive demonstration of what can be done with the new canvas tag. HTML 5 will totally change the way we see the web.</p>


<h4>Related posts:</h4><p><ol><li><a href='http://www.undisciplinedbytes.com/2009/11/html-5-dramatic-improvements-in-the-web-language/' rel='bookmark' title='Permanent Link: HTML 5: dramatic improvements in the web language'>HTML 5: dramatic improvements in the web language</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.undisciplinedbytes.com/2009/10/html-5-canvas-tag-demonstration-sierra-adventure-games/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

