<?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>Ladysign Dev Blog &#187; ogg theora</title>
	<atom:link href="http://www.ladysign-apps.com/blog/tag/ogg-theora/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ladysign-apps.com/blog</link>
	<description>Girls can code.</description>
	<lastBuildDate>Mon, 12 Dec 2011 16:58:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Introduction to HTML5</title>
		<link>http://www.ladysign-apps.com/blog/code/html/introduction-to-html5/</link>
		<comments>http://www.ladysign-apps.com/blog/code/html/introduction-to-html5/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 16:51:24 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[html]]></category>
		<category><![CDATA[canvas]]></category>
		<category><![CDATA[html 5.0]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[ogg theora]]></category>
		<category><![CDATA[ogg vorbis]]></category>
		<category><![CDATA[tags]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[webforms 2.0]]></category>

		<guid isPermaLink="false">http://ladysign-apps.com/blog/archives/359</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 2 out of 5 stars<br />
For the Accenture newsletter I wrote an article about HTML 5. You (as not Accenture employee?) can read it on my blog:</p>
<p>HT[......]</p><p class='read-more'><a href='http://www.ladysign-apps.com/blog/code/html/introduction-to-html5/'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 2 out of 5 stars<br />
For the Accenture newsletter I wrote an article about HTML 5. You (as not Accenture employee?) can read it on my blog:</p>
<p>HTML 5 is coming. You as Java developer might think: &#8220;Yeah so what, I&#8217;m not a webdesigner.&#8221;; but since todays applications are webapps you do have to deal with HTML.The version 5 will not only contain a lot of new tags, HTML 5 will go further into the concept: &#8220;Semantic Web&#8221;, this means; to separate your scripts and styles from the HTML and use descriptive markup so your code is accessible for all users and machines. In this article I will explain you some of the new HTML 5 features (and okay, I will leave out the design related details).</p>
<p>HTML has almost reached his age of 20 years, founded by Tim Berners Lee. HTML stands for HyperText Markup Language, (the way to describe the structure of a text-based document).<br />
The current version we are working with is HTML 4.01 and all the versions are in maintenance by the W3C (World Wide Web Consortium). HTML 4.01 is available since 1999, so we are definitely ready for a newer version, especially while the world is thinking in terms of &#8220;Web 2.0&#8243;. </p>
<p>Now before you open your favorite editor and think: &#8220;Let&#8217;s work from now on with HTML 5&#8243;, it&#8217;s not official yet and it probably won&#8217;t be before 2010 or even 2012. That means not all browsers can work with all the new tags and nothing is more annoying then (base) specifications that can change (JavaFX anyone?). But I think it&#8217;s worth for giving it already a try and use it for some experiments. Currently the newest Opera browser gives you the best results for working with HTML 5, this because Opera has the Presto engine. (Mozilla Firefox uses Gecko, MS Internet Explorer uses Trident, Google Chrome and Safari &#8211; WebKit and Konqueror uses KHTML.)</p>
<p>The HTML 5 specification will not be considered finished before there are at least two complete implementations of the specification. This is a different approach than previous versions of HTML had. The goal is to ensure that the specification is implementable and usable by designers and developers once it is finished. </p>
<p><center><br />
<img src="http://www.ladysign-apps.com/java-newsletter/200901/html5.gif" hspace="3" vspace="3" /><br/><br />
</center></p>
<p>One of the goals of HTML 5 is &#8220;user-friendly&#8221;, but there also should be tools available for better working offline and user input.<br />
Let&#8217;s list some of the new features:</p>
<p><b>Semantic Web</b><br />
<i>&lt;header></i>, <i>&lt;article></i>, <i>&lt;section></i>, <i>&lt;aside></i>, <i>&lt;nav></i>, <i>&lt;footer></i><br/><br />
These tags are there for describing content. I read in a magazine that these tags are there for making the life of a developer easier with building and reading of page sources.<br />
Personally I think these tags are there for more commercial reasons. Search engines can index pages easier (Imagine how often you visited a site which did not contain the content you searched for.) and advertisement companies such as Google can better analyze the content of a webpage. (For example Adsense banners who match with the original page content.) </p>
<p>When you mix these tags with the older HTML 4.01 tags, you&#8217;ll notice that the Document Object Model will handle different with &lt;h1>&lt;h2>&#8230;, text headings in for example a &lt;section> or &lt;article>.</p>
<p>There are also tags like: <i>&lt;figure></i> for tagging an image with a text note, or <i>&lt;dialog></i> for a conversation between people, with the old tags &lt;dt>(participant)&lt;/dt> and &lt;dd>(the text quote)&lt;/dd>.</p>
<p><b>Multimedia</b><br />
You can use the &lt;embed> tags for including video, audio or Flash / Silverlight but HTML 5 now also supports his own video and audio tags:<br />
<i>&lt;audio></i>,<i>&lt;video></i> &#8211; These tags can be used same like the &lt;img> tag, only these tags needs to be closed.</p>
<p>For example you can easily control a video:<br />
HTML:</p>
<pre class="brush: xml; title: ;">
&lt;source src=&quot;foo.ogg&quot; type=&quot;video/ogg&quot;&gt;
    &lt;source src=&quot;foo.mov&quot;&gt;
    Your browser does not support the &lt;code&gt;video&lt;/code&gt; element.
&lt;/video&gt;
</pre>
<pre class="brush: jscript; title: ;">
Javascript:
var myVideo = document.getElementsByTagName(&quot;video&quot;)[0];
myVideo.play();
</pre>
<p>A cool thing to mention: HTML 5 will support 2 free opensource codecs: <b>Ogg Theora</b> (for video) and <b>Ogg Vorbis</b> (for audio),<br />
which is easy to implement and therefor will be supported by all modern browsers.</p>
<p>Another nice tag within HTML 5 is the <i>&lt;progressbar></i> tag, with some little more Javascript you can animate the progress of loading.</p>
<p>&lt;progress>&lt;span>0&lt;/span>%&lt;/progress<br />
where the &lt;span> tag can be animated.</p>
<p><b>WebForms 2.0</b><br />
Several new values are introduced for the type attribute of the input tag. As with the older types, UAs are recommended to show specialized widgets for these types, instead of requiring that the user enter the data into a text field:<br />
&#8220;email&#8221;, &#8220;url&#8221;, &#8220;number&#8221;, &#8220;range&#8221;, &#8220;date&#8221;, &#8220;time&#8221;, &#8220;datetime&#8221;, &#8220;week&#8221;, &#8220;month&#8221;.</p>
<p>There are also new attributes for declaring ranges: &#8220;min&#8221; and &#8220;max&#8221;.<br />
You can use this for data, time or numeric fields, but also for upload controls. (incase of an upload control, it declares the min and max number of files to upload.<br />
There will be also a step attribute for the precision allowed for the date-related, time-related, and numeric types. </p>
<p>For example:</p>
<pre class="brush: xml; title: ;">
  &lt;label for=&quot;time1&quot;&gt; Preferred delivery time: &amp;lt;/label&gt;
  &lt;input id=&quot;time1&quot; name=&quot;time1&quot; type=&quot;time&quot; min=&quot;08:00&quot; max=&quot;17:00&quot; value=&quot;08:00&quot; /&gt; —
  &lt;input id=&quot;time2&quot; name=&quot;time2&quot; type=&quot;time&quot; min=&quot;08:00&quot; max=&quot;17:00&quot; value=&quot;17:00&quot; /&gt;
  &lt;input type=&quot;datetime&quot; step=&quot;120&quot; name=&quot;start&quot;&gt;
</pre>
<p>And finally there&#8217;s a way how you can use regex on a field to make sure that the values are according specification:<br />
The &#8220;pattern&#8221;  attribute contains a regular expression that the control&#8217;s value must match before the form may be submitted<br />
When the value doesn&#8217;t match the control&#8217;s type or the pattern, the &#8220;typeMismatch&#8221; flag must be set.<br />
When the pattern is not a valid regular expression, it is ignored for the purposes of validation, as if it wasn&#8217;t specified:</p>
<pre class="brush: xml; title: ;">
&lt;label&gt; Credit Card Number:
&lt;input type=&quot;text&quot; pattern=&quot;[0-9]{13,16}&quot; name=&quot;cc&quot; /&gt;
&lt;/label&gt;
</pre>
<p><b>Offline data storage</b><br />
Think (Google) Gears, this contains a database engine based on SQLite for storing data offline.<br />
HTML 5 will contain a client-side database storage API, which allows web applications to store structured data locally using a medium many web developers are already familiair with: SQL.<br />
The API is asynchronous and uses callback functions to track the results of a database query.<br />
Compact usage defining a callback function on the fly might look something like this:</p>
<p>Javascript:</p>
<pre class="brush: jscript; title: ;">
var database = openDatabase(&quot;dB Name&quot;, &quot;dB version&quot;);
database.executeSql(&quot;SELECT * FROM test&quot;, function(result1) {
   // do something with the results
   database.executeSql(&quot;DROP TABLE test&quot;, function(result2) {
   // do some more stuff
   alert(&quot;query finished executing&quot;);
   });
});
</pre>
<p><strong>Canvas</strong><br />
<em>&lt;canvas></em><br />
Personally I don&#8217;t know if I&#8217;m gonna use this tag often, but with the canvas tag, it&#8217;s possible to draw shapes and images and animate them.<br />
I can imagine that this is cool for creating and animating circle graphs and charts, on the otherhand why wouldn&#8217;t you use Adobe Flex, Flash or JavaFX for this? A cool example of the use of the canvas tag can be found here:<br />
<a href="https://developer.mozilla.org/En/A_Basic_RayCaster" target="_blank">3D example</a> and <a href="http://www.rgraph.org" target="_blank">Graph example</a></p>
<pre class="brush: jscript; title: ;">
&lt;script type=&quot;text/javascript&quot;&gt;
function drawCanvas(){
    var canvas=document.getElementById('myCanvas');
    var ctx = canvas.getContext('2d');
    ctx.fillStyle='#FF0000';
 }
&lt;/script&gt;
&lt;canvas id=&quot;myCanvas&quot;&gt;your browser does not support the canvas tag &lt;/canvas&gt;
</pre>
<p><strong>Bye bye frames</strong><br />
And I won&#8217;t miss them. HTML 5 does not support framesets anymore. And that is a good thing cause frames are affecting accessibility and usability<br />
very badly. Oh yeah and they are so 90&#8217;s.</p>
<p><center><br />
<img src="http://www.ladysign-apps.com/java-newsletter/200901/html5_2.jpg"  hspace="3" vspace="3" /><br />
</center></p>
<p><b>Handy Links</b><br />
Well there&#8217;s so much more to tell about HTML 5, this quick overview covers only the half. There for I wrote some handy links down:</p>
<ul>
<li><a href="http://www.w3.org/TR/2008/WD-html5-diff-20080122/">HTML 5 differences from HTML 4 W3C</a></li>
<li><a href="http://en.wikipedia.org/wiki/Comparison_of_layout_engines_(HTML5)">Browser Comparison</a></li>
<li><a href="https://developer.mozilla.org/En/Using_audio_and_video_in_Firefox">Firefox handles &lt;video> implementation </a></li>
<li><a href="http://theora.org/">Ogg Theora (opensource video codec)</a></li>
<li><a href="http://www.vorbis.com/">Ogg Vorbis (opensource audio codec)</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/html/introduction-to-html5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

