<?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>spiros.blog() &#187; Javascript</title>
	<atom:link href="http://www.tzavellas.com/techblog/category/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tzavellas.com/techblog</link>
	<description>Spiros Tzavellas’s blog, mostly on software development and Java.</description>
	<lastBuildDate>Fri, 24 Sep 2010 07:42:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Implementing threads in Javascript 1.7</title>
		<link>http://www.tzavellas.com/techblog/2007/02/14/implementing-threads-in-javascript-17/</link>
		<comments>http://www.tzavellas.com/techblog/2007/02/14/implementing-threads-in-javascript-17/#comments</comments>
		<pubDate>Wed, 14 Feb 2007 22:32:37 +0000</pubDate>
		<dc:creator>spiros</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.tzavellas.com/techblog/?p=73</guid>
		<description><![CDATA[Neil Mix has implemented support for threads in Javascript 1.7. To do this he used Python style generators, that were introduced in Javascript 1.7, and the trampolining technique. If you are interested check out his post, the example and the implementation. The code only runs on Firefox 2 since it is the only browser that [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.neilmix.com/">Neil Mix</a> has <a href="http://www.neilmix.com/2007/02/07/threading-in-javascript-17/">implemented</a> support for threads  in <a href="http://developer.mozilla.org/en/docs/New_in_JavaScript_1.7">Javascript 1.7</a>. To do this he used <a href="http://www.python.org">Python</a> style <a href="http://en.wikipedia.org/wiki/Generator_%28computer_science%29">generators</a>, that were introduced in <a href="http://developer.mozilla.org/en/docs/New_in_JavaScript_1.7#Generators_and_iterators">Javascript 1.7</a>, and the <a href="http://en.wikipedia.org/wiki/Trampoline_%28computers%29">trampolining</a> technique.</p>
<p>If you are interested check out his <a href="http://www.neilmix.com/2007/02/07/threading-in-javascript-17/">post</a>, the <a href="http://www.neilmix.com/demos/js17threading/">example</a> and the <a href="http://www.neilmix.com/demos/js17threading/Thread.js">implementation.</a> The code only runs on <a href="http://www.mozilla.com/en-US/firefox/">Firefox 2</a> since it is the only browser that supports <a href="http://developer.mozilla.org/en/docs/New_in_JavaScript_1.7">Javascript 1.7</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tzavellas.com/techblog/2007/02/14/implementing-threads-in-javascript-17/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Prototype based object models</title>
		<link>http://www.tzavellas.com/techblog/2005/12/06/prototype-based-object-models/</link>
		<comments>http://www.tzavellas.com/techblog/2005/12/06/prototype-based-object-models/#comments</comments>
		<pubDate>Tue, 06 Dec 2005 13:38:55 +0000</pubDate>
		<dc:creator>spiros</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[oop]]></category>

		<guid isPermaLink="false">http://www.tzavellas.com/techblog/?p=38</guid>
		<description><![CDATA[The Mozilla Developer Center has a great guide for Javascript. This guide provides one of the best explanations I&#8217;ve read on the Javascript object model and on prototype based object models in general. Although I have only programed with languages that provide class based object models I believe that that prototype based object models are [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://developer.mozilla.org/">Mozilla Developer Center</a> has a great <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Guide">guide</a> for <a href="http://developer.mozilla.org/en/docs/JavaScript">Javascript</a>. This guide provides one of the best explanations I&#8217;ve read on the <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Guide:Details_of_the_Object_Model">Javascript object model</a> and on prototype based object models in general.</p>
<p>Although I have only programed with languages that provide class based object models I believe that that prototype based object models are very easy to understand if you know the primitives of object oriented programming.</p>
<p>Prototype based object models are an interesting idea that suits very well with dynamic languages like <a href="http://developer.mozilla.org/en/docs/JavaScript">Javascript</a>. The only thing that I don&#8217;t really like is the syntax. For example creating a new “class” that inherits from an Employee “class” looks like this in <a href="http://developer.mozilla.org/en/docs/JavaScript">Javascript</a>:</p>
<pre>
function Manager () {
  this.reports = [];
}
Manager.prototype = new Employee;
</pre>
<p>And in <a href="http://java.sun.com">Java</a>:</p>
<pre>
public class Manager extends Employee {
  public Employee[] reports;
  public Manager () {
    this.reports = new Employee[0];
  }
}
</pre>
<p>I prefer the <a href="http://java.sun.com">Java</a> version because the whole definition is included in one syntactic unit (a class definition), instead two in <a href="http://developer.mozilla.org/en/docs/JavaScript">Javascript</a> (a function definition and an assignment).</p>
<p>If I am correct, <a href="http://www.ruby-lang.org/">Ruby</a> (BTW I don&#8217;t know <a href="http://www.ruby-lang.org/">Ruby</a> and <a href="http://developer.mozilla.org/en/docs/JavaScript">Javascript</a>) has a class based object model but also has most of the features of languages that are prototype based. For example in <a href="http://www.ruby-lang.org/">Ruby</a>, you can add or modify, at runtime, methods of classes and instances.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tzavellas.com/techblog/2005/12/06/prototype-based-object-models/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sarissa to the Rescue</title>
		<link>http://www.tzavellas.com/techblog/2005/03/02/sarissa-to-the-rescue/</link>
		<comments>http://www.tzavellas.com/techblog/2005/03/02/sarissa-to-the-rescue/#comments</comments>
		<pubDate>Wed, 02 Mar 2005 15:41:13 +0000</pubDate>
		<dc:creator>spiros</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[ajax]]></category>

		<guid isPermaLink="false">http://www.tzavellas.com/techblog/?p=4</guid>
		<description><![CDATA[Manos Batsis, one of my colleagues, has written an article at xml.com. The article&#8217;s title is Sarissa to the Rescue and it&#8217;s about Sarissa an OSS Javascript library, developed by Manos. Sarissa is a cross-browser library that wraps XMLHTTP (XMLHttpRequest on Mozilla) and various other XML APIs. Now that Javascript and asynchronous web user interfaces [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.xml.com/pub/au/258">Manos Batsis</a>, one of my colleagues, has written an article at <a href="http://www.xml.com">xml.com</a>. The article&#8217;s title is <a href="http://www.xml.com/pub/a/2005/02/23/sarissa.html"><em>Sarissa to the Rescue</em></a> and it&#8217;s about <a href="http://sarissa.sf.net/">Sarissa</a> an OSS <a href="http://www.w3schools.com/js/default.asp">Javascript</a> library, developed by Manos. Sarissa is a cross-browser library that wraps <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/html/xmmscXML.asp">XMLHTTP</a> (<a href="http://www.mozilla.org/xmlextras/">XMLHttpRequest</a> on <a href="http://www.mozilla.org">Mozilla</a>) and various other XML APIs.</p>
<p>Now that Javascript and asynchronous web user interfaces are beginning to be more and more important in web application development I think that Sarissa might be a good solution for more portable Javascript code.</p>
<p>BTW did you know that Javascript has a unit testing framework (<a href="http://kupu.oscom.org/download/ecmaunit-0.2.html">ECMAUnit</a>) and a lint program (<a href="http://www.crockford.com/javascript/lint.html">jslint</a>).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tzavellas.com/techblog/2005/03/02/sarissa-to-the-rescue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

