<?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>MIH SWAT &#187; javascript</title>
	<atom:link href="http://www.mihswat.com/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mihswat.com</link>
	<description>Headquarters of the Strategic Worldwide Applications and Technologies Team</description>
	<lastBuildDate>Tue, 31 Jan 2012 09:59:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Book Review: Javascript: The Good Parts by Douglas Crockford</title>
		<link>http://www.mihswat.com/2011/01/10/book-review-javascript-the-good-parts-by-douglas-crockford/</link>
		<comments>http://www.mihswat.com/2011/01/10/book-review-javascript-the-good-parts-by-douglas-crockford/#comments</comments>
		<pubDate>Mon, 10 Jan 2011 11:29:05 +0000</pubDate>
		<dc:creator>Dani Valentin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[crockford]]></category>
		<category><![CDATA[douglas crockford]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.mihswat.com/?p=1992</guid>
		<description><![CDATA[This book, released in 2008, is a must read for all that take web development seriously. It is a small book, 176 pages counting the appendices, but as Crockford warns in the preface, it is dense in its content. The &#8230; <a href="http://www.mihswat.com/2011/01/10/book-review-javascript-the-good-parts-by-douglas-crockford/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.mihswat.com/wp-content/uploads/2011/01/goodparts.gif"><img class="alignleft size-full wp-image-1998" title="goodparts" src="http://www.mihswat.com/wp-content/uploads/2011/01/goodparts.gif" alt="" width="182" height="240" /></a>This book, released in 2008, is a must read for all that take web development seriously. It is a small book, 176 pages counting the appendices, but as <a href="http://crockford.com/">Crockford</a> warns in the preface, it is dense in its content. The author&#8217;s goal with this is to show that it is possible to write beautiful code with this <a href="http://javascript.crockford.com/javascript.html">misunderstood programming language</a> and when you finish reading it, that is all you want to do.<span id="more-1992"></span></p>
<p>Crockford has a simple premise: every programming language has its good and bad parts. What we have to keep in mind is that we don&#8217;t have to use everything a language offers. Javascript has a fair amount of bad parts. It was developed in a rush and became the language of the web in such a short period that it has never had the time to be polished and refined. Despite all that, it has some really amazing features. And it is on these that we should focus.</p>
<p>The book is composed of 10 chapters and 5 appendices. In the chapters, the author covers the good parts of javacript, going through objects, arrays and inheritance.</p>
<p>The chapter about Functions (chapter 4) is one of the best in the publication. According to Crockford this is the best thing about javascript. The chapter presents important topics as different patterns of invocation, how to augment types, scope and closure. The chapter about Regular Expressions (chapter 7) is also a highlight in the book. Regexps are usually not a simple subject to write about and it is really easy to confuse the reader even more. In this book it goes directly to the point in a really simple way.</p>
<p>The first 2 appendices are, in my opinion, the most precious for experienced users: Awful Parts (Appendix A) and Bad Parts (Appendix B) lists several features that are more trouble than useful and should be avoided. It is highly informative and shows curiosities like:</p>
<pre class="brush: jscript; title: ;">typeof NaN === 'number'      //true </pre>
<p>and</p>
<pre class="brush: jscript; title: ;"> 0.1 + 0.2 === 0.3      //false  </pre>
<p>The last 3 appendices focus on <a href="http://jslint.com/">JSLint</a>, syntax diagrams and <a href="http://json.org/">JSON</a>.</p>
<p>When we talk about Javascript, Douglas Crockford is God. The Yahoo! Architect even has a <a href="http://crockfordfacts.com/">Crockford&#8217;s Facts website</a> with lines like &#8216;Douglas Crockford does no eval&#8217; and &#8216;Everytime you create a global variable, Douglas Crockford roadhouse kicks an intern&#8217;. His manner of writing is also brilliant, extremely concise and informative.</p>
<p>This was one of the technical books that I enjoyed reading the most, because it is so clear, simple and written in such a relaxed way. And it covers javascript in a totally different way from other books, it does not try to change the way you develop with it as it is more similar to most popular C-based languages. Instead it shows you how it should be used because of those differences. And it teaches you to appreciate it so much more while doing it.</p>
<p><strong>Javascript: The Good Parts</strong><br />
<em>Author:</em> Douglas Crockford<br />
<em>Pages:</em> 176<br />
<em>Year:</em> 2008<br />
<em>Publisher:</em> O&#8217;Reilly/Yahoo Press<br />
on <a href="http://oreilly.com/catalog/9780596517748/">O&#8217;Reilly</a> | on <a href="http://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742/ref=sr_1_1?ie=UTF8&amp;qid=1294079616&amp;sr=8-1">Amazon</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mihswat.com/2011/01/10/book-review-javascript-the-good-parts-by-douglas-crockford/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing NodeJS</title>
		<link>http://www.mihswat.com/2010/11/25/introducing-nodejs-2/</link>
		<comments>http://www.mihswat.com/2010/11/25/introducing-nodejs-2/#comments</comments>
		<pubDate>Thu, 25 Nov 2010 07:57:31 +0000</pubDate>
		<dc:creator>Dani Valentin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[nodejs]]></category>
		<category><![CDATA[oscon]]></category>

		<guid isPermaLink="false">http://www.mihswat.com/?p=1771</guid>
		<description><![CDATA[While I was at Oscon this year, just about every session that I attended, someone mentioned NodeJS. So when I found out there was a talk about it on the last day, I went along to discover what the buzz &#8230; <a href="http://www.mihswat.com/2010/11/25/introducing-nodejs-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>While I was at Oscon this year, just about every session that I  attended, someone mentioned NodeJS. So when I found out there was a talk  about it on the last day, I went along to discover what the buzz was  all about.<span id="more-1771"></span></p>
<p>Someone described NodeJS as the &#8220;first server-side JavaScript  implementation you’d actually like to use&#8221;. According to its creator, <a href="http://twitter.com/ryah">Ryan Dahl</a>, NodeJS is a set of bindings for the <a href="http://code.google.com/p/v8/">V8</a> (open source Javascript engine used in Google Chrome). It is focused on  performance providing an evented and non-blocking environment. It is  event-loop based and its goal is to allow writing high-performance web  servers easily.</p>
<p><strong>But how does NodeJS work?</strong></p>
<p>NodeJS starts from the premise that we are not doing I/O correctly.  Today, when we do a database query, the software just waits for a  response and doesn&#8217;t do anything in the meantime. It implies that you  block the entire process or you need a threading system that involves  extra time, high use of memory or extra machinery. There is a big  difference in the time used to access cache/RAM and the time used to  access the disk or the network. We should not be treating these 2 groups  the same way.</p>
<p>Ryan Dahl proposes a new way of doing I/O: supplying a callback to  every call to the disk, network or another process. With this, your  program can do other stuff (while querying the database, for example),  and return to the event loop as soon as the query is over without extra  expenses. So we can say that with NodeJS everything runs in parallel,  except your code.</p>
<p><strong>And why are we using javascript in the back-end?</strong></p>
<p>Although most of javascript programmers never heard about event loop  in their lives, the language has all the requirements to provide an  event loop platform:</p>
<p>- closures and anonymous functions are available for making callbacks<br />
- only one callback fires at a time<br />
- I/O through DOM event callbacks &#8211; if someone clicks a button, you have a &#8220;click&#8221; callback.</p>
<p>Besides those reasons, since the release of V8, every browser vendor  is pushing the speed of their engines in a velocity that no other  programming language saw before. And, in the end, every web developer  had one time in their life programmed with javascript (that inforces the  easily part of the goal).</p>
<p><strong>So, how do I use NodeJS?</strong></p>
<p>First, you need to download it from the <a href="http://nodejs.org/#download">project page</a> and install in your computer. The V8 engine is included in the pack and  the only dependency you have is Python 2.4. It is a command-line tool,  so you run your programs by typing in the terminal: node  yourapplication.js. The &#8220;Hello World&#8221; of NodeJS looks like this:</p>
<pre class="brush: jscript; title: ;">
var http = require('http');
http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Hello World\n');
}).listen(8124, &quot;127.0.0.1&quot;);
console.log('Server running at http://127.0.0.1:8124/');
</pre>
<p>This program creates an HTTP Server and prints &#8220;Hello World&#8221; when a  request is done. By the way, one of the design goals of the project was  to have support for all the important protocols: DNS, HTTP and TLS.</p>
<p><strong>Where should I use NodeJS?</strong></p>
<p>It should be used when high concurrency is really important. It is  suitable for real-time, crawlers, process monitoring, file uploading and  streaming applications, just to name a few. It is still not recommended  to use it for entire websites &#8211; it is too buggy and low level for that  in the moment.</p>
<p>More information can be found here:</p>
<p>Project page: <a href="http://nodejs.org/">http://nodejs.org/</a><br />
Github: <a href="http://wiki.github.com/ry/node/">http://wiki.github.com/ry/node/</a><br />
How to Node: <a href="http://howtonode.org/">http://howtonode.org/</a><br />
Ryan&#8217;s Techtalk at Google: <a href="http://www.youtube.com/watch?v=F6k8lTrAE2g">http://www.youtube.com/watch?v=F6k8lTrAE2g</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mihswat.com/2010/11/25/introducing-nodejs-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Developing Apps for Mobile</title>
		<link>http://www.mihswat.com/2010/08/10/developing-apps-for-mobile/</link>
		<comments>http://www.mihswat.com/2010/08/10/developing-apps-for-mobile/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 11:08:58 +0000</pubDate>
		<dc:creator>Dani Valentin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.mihswat.com/?p=1561</guid>
		<description><![CDATA[One of the most fascinating presentations I attended last OSCON (you can read my review here) was entitled Building Mobile Apps with HTML, CSS and Javascript by Jonathan Stark. Jonathan is a consultant for mobile applications, a frequent conference speaker &#8230; <a href="http://www.mihswat.com/2010/08/10/developing-apps-for-mobile/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>One of the most fascinating presentations I attended last OSCON (you can read my review <a href="http://www.mihswat.com/2010/07/26/oreilly-oscon/">here</a>) was entitled  Building Mobile Apps with HTML, CSS and Javascript by <a href="www.jonathanstark.com">Jonathan Stark</a>. Jonathan is a consultant for mobile applications, a frequent conference speaker and often quoted when media speaks of trends for internet and mobile.<span id="more-1561"></span></p>
<p>As outlined in his talk, the very first question when developing for mobile is: what type of application do I want my product to have? Currently, there are three different types: Native, Web and SMS. Choosing one is based on the purpose of your project as well as the target audience.</p>
<ul>
<li><strong>Native:</strong> used when the aesthetics of the app is very important. Native is recommended when you want to access a core feature of the device, like a camera or GPS. And, because of their app stores, Native apps have the added advantages discoverability and visibility.  The disadvantage with this type of application is fragmentation, i.e. you must write a different application for each device.</li>
<li><strong>Web:</strong> used when the focus is on distribution. Web apps are available on any device enabled with Internet access and there is no need to download. Considering testing and supporting, web applications have an advantage since they do not need to go through all the bureaucracy of the app store. Updates are also up and running instantly. The main disadvantage of web apps is sand-boxing.</li>
<li><strong>SMS:</strong> rare and only used in markets where internet access on the phone is not available or prohibitively expensive. SMS apps don&#8217;t offer discoverability.</li>
</ul>
<p>Considering the above, Web applications are usually the best choice. They are cheaper to produce, more standardized and easier to distribute. According to Stark himself, &#8220;If you CAN build your app with HTML, CSS and JavaScript, then you probably should.&#8221;</p>
<p>In the second part of the talk, two interesting tools were demonstrated:</p>
<h1>jQTouch</h1>
<p><a href="http://jqtouch.com">jQTouch</a> is a jQuery plugin for mobile webkit browsers developed by David Kaneda. It Allows native animations, navigation and automatic customization of theme. Even if you will not actually using it in your application, it is a great tool for prototyping it.</p>
<p>To set jQTouch, you have to add in your page:</p>
<p><a href="http://www.mihswat.com/wp-content/uploads/2010/07/Screenshot-test.html-gedit.png"><img class="size-full wp-image-1567 alignnone" title="jQTouch" src="http://www.mihswat.com/wp-content/uploads/2010/07/Screenshot-test.html-gedit.png" alt="jQTouch" width="424" height="119" /></a></p>
<p>That means:</p>
<p>(1) adding hardcore structural design rules. This is required and you shouldn&#8217;t edit it<br />
(2) add your theme style file. There are some options in jQTouch website or you can write your own<br />
(3) initialize jQTouch after javascripts files are added. You can pass an object as a parameter with some values as icon and preloadImages</p>
<p>You can learn more from  the <a href="http://jqtouch.com">jQTouch website</a> or its <a href="http://code.google.com/p/jqtouch/">documentation</a>.</p>
<p>You can also see a quick overview in the video bellow:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/6X4K2MQsSeI&amp;hl=en_US&amp;fs=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="480" height="385" src="http://www.youtube.com/v/6X4K2MQsSeI&amp;hl=en_US&amp;fs=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<h1>PhoneGap</h1>
<p><a href="http://phonegap.com">PhoneGap</a> is a framework for building cross-platform mobile apps. Using it, you can still take advantage of core features in iPhone, Android, Palm Symbian and Blackberry. It&#8217;s been recognized as a game-changer and its source code has been downloaded more than 200,000 times! Web applications can now compete with native applications when functionality is the main requirement.</p>
<p>For more information, you can visit the <a href="http://phonegap.com">PhoneGap</a> website.</p>
<p>To learn how to install it, check the video bellow:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/yuTqQyzyVvU&amp;hl=en_US&amp;fs=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="480" height="385" src="http://www.youtube.com/v/yuTqQyzyVvU&amp;hl=en_US&amp;fs=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<h3>Get the Best Apps Now!</h3>
<p>We look at mobile apps from different app stores and find out the best ones for you! This is your place to find out the most useful apps for your various devices. Visit <a href="http://apps.mihswat.com">apps.mihswat.com</a> for the best Android, iOS, Chrome, Firefox, PC, Mac , Amazong and Windows Phone apps.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mihswat.com/2010/08/10/developing-apps-for-mobile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vacancies at SWAT</title>
		<link>http://www.mihswat.com/2009/11/03/vacancies-at-swat/</link>
		<comments>http://www.mihswat.com/2009/11/03/vacancies-at-swat/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 11:27:04 +0000</pubDate>
		<dc:creator>Jacques van Niekerk</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Graphic Design / UX]]></category>
		<category><![CDATA[Semantic Web]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[architects]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[developers]]></category>
		<category><![CDATA[digital TV]]></category>
		<category><![CDATA[geeks]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[iptv]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[microsoft .net]]></category>
		<category><![CDATA[oo]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[sao paulo]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[social graph]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[uml]]></category>
		<category><![CDATA[vod]]></category>
		<category><![CDATA[web 2.0]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://www.mihswat.com/?p=977</guid>
		<description><![CDATA[Would you like to work at SWAT ? We have a few positions vacant at the moment &#8211; have a look: In Sao Paulo, Brazil &#8211; we need a junior front-end developer. You are highly skilled in front-end development, with &#8230; <a href="http://www.mihswat.com/2009/11/03/vacancies-at-swat/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Would you like to work at SWAT ?<span id="more-977"></span></p>
<p>We have a few positions vacant at the moment &#8211; have a look:</p>
<p>In Sao Paulo, Brazil &#8211; we need a<strong> junior front-end developer</strong>. You are highly skilled in front-end development, with specific skills in CSS, HTML and Javascript. You are a competent programmer, but you prefer to work on the front-end. You will be working under the guidance of an experienced and expert engineer.  You like working with bright and clever people, and you are passionate about the web. The successful candidate will speak English, and will be a paulistano, or be willing to relocate to Sao Paulo.</p>
<p>In Johannesburg &#8211; we are looking for a <strong>senior technical architect</strong>. You will have the opportunity to establish the blueprint and create the framework for truly cutting edge media delivery platforms that will change the face of media in South Africa. And that is no exaggeration. You should have outstanding technical skills, including the ability to code as and when required. You must be able to interact with a team of highly skilled professionals. You will ideally have experience of VOD, digital TV, IP-TV and related technologies. A background as a developer is essential &#8211; you will have in-depth knowledge of the Microsoft .Net platform, but also wider knowledge of open source platforms and languages. You are comfortable dealing with executives and senior managers. You&#8217;re not only an ubergeek, but also an inspirational tech leader. This is a challenging position &#8211; but it represents a massive opportunity to the right person. Detailed requirements <a href="http://www.mihswat.com/wp-content/uploads/2009/11/Lead-Architect1.pdf">here.</a></p>
<p>In Cape Town &#8211; we are looking for a <strong>junior tester</strong>, who will devote a great deal of time to ensuring that a large corporate social network meets the right quality standards. You will be part of the SWAT core team &#8211; you must be prepared to work with some of the best developers, architects, geeks and web-heads you are ever likely to meet. Can you execute tasks on your own initiative, prepare and execute test plans ? More details on the position can be found <a href="http://www.mihswat.com/wp-content/uploads/2009/11/Junior-Tester.pdf">here. </a></p>
<p>Cape Town &#8211; we are looking for someone to play the role of <strong>Internet Evangelist</strong>. This role is available to anyone who is absolutely passionate about the web, who is capable of conveying this passion to diverse audiences, who learns quickly &#8230; and who can teach others. Your role will be to evangelise the use of Web technologies (and other Internet related technologies) into the larger group &#8211; the challenge is to make people from all non-internet businesses see the Internet as an opportunity not a threat. In addition you will perform tasks as assistant community manager for the corporate social network, and you will assist the Analyst in the team with research tasks. You must be willing to travel in South Africa and abroad, as required. To apply for this job, you will have to demonstrate passion, interest and knowledge of the Web and related technologies. You are a well-spoken, confident geek, web-head and proud to be a Web addict. </p>
<p>Finally, and also in Cape Town &#8211; we want to recruit a <strong>PHP developer</strong>. You will be have outstanding technical skills, wide experience in web based development, and you will be able to hold your own amongst an elite group of developers and architects. Javascript, Zend Framework, AJAX, OO, Web 2.0, REST, SOAP and UML will be old news to you. You are passionate about the web. If you think Twitter is silly, you don&#8217;t need to apply. More information <a href="http://www.mihswat.com/wp-content/uploads/2009/11/PHP-Developer1.pdf">here.</a></p>
<p>If you are interested in any of these positions, please send your CV to <a href="mailto:mkoch@mihinternet.com">Melanie Koch</a>. We look forward to hearing from you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mihswat.com/2009/11/03/vacancies-at-swat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The State of Javascript</title>
		<link>http://www.mihswat.com/2009/11/02/the-state-of-javascript/</link>
		<comments>http://www.mihswat.com/2009/11/02/the-state-of-javascript/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 18:16:41 +0000</pubDate>
		<dc:creator>Dani Valentin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.mihswat.com/?p=980</guid>
		<description><![CDATA[Douglas Crockford wrote in a 2001 article that javascript was the world&#8217;s most misunderstood programming language. In another article, from 2008, he explains why: &#8220;Its obvious defects, its unfashionable programming model, intentional mispositioning at its introduction, and its ridiculous name &#8230; <a href="http://www.mihswat.com/2009/11/02/the-state-of-javascript/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.crockford.com">Douglas Crockford</a> wrote in a 2001 <a href="http://www.crockford.com/javascript/javascript.html">article</a> that javascript was the world&#8217;s most misunderstood programming language. In another <a href="http://javascript.crockford.com/popular.html">article</a>, from 2008, he explains why: &#8220;Its obvious    defects, its unfashionable programming model, intentional mispositioning    at its introduction, and its ridiculous name caused it to be rejected    as unworthy by most knowledgeable programmers&#8221;. And then, he recognizes: there was AJAX. And AJAX gave javascript a second chance.<span id="more-980"></span></p>
<p>In another <a href="http://ejohn.org/blog/javascript-as-a-language/">place</a>, I read about the phases javascript&#8217;s been through since its creation:</p>
<ul>
<li>The &#8220;We need scripting for web pages&#8221; phase. (Netscape)</li>
<li>The &#8220;We should standardize this&#8221; phase. (ECMAScript)</li>
<li>The &#8220;Javascript is not a toy&#8221; phase. (Ajax)</li>
</ul>
<p>And now we are in a new phase: <strong>Javascript is a programming language phase</strong>. And, even though it is currently the world&#8217;s most popular programming language, there are still a lot of confusion about its current state, lack of knowledge of its power and outdated information about it. This article tries to throw some light at it.</p>
<h3>First, <strong>a little bit of history</strong></h3>
<p>Javascript was introduced in December 1995 by Netscape. It was developed by <a href="http://weblogs.mozillazine.org/roadmap/">Brendan Eich</a> and was called Mocha and LiveScript before. According to Brendan himself, the confusing name was given when Netscape and Sun did a license agreement and wanted to make javascript complementary scripting language to go with Java. Others believe that the name was given so it could  ride along in Java marketing, since this was the hot programming language of that time.</p>
<p>In the beginning, the language targeted non-tech people, specially designers and amateurs and the main idea was to add some interation to web pages. That is why the language is so flexible: it was supposed to make programming easy for beginners.</p>
<h3>ECMA and standardization</h3>
<p>After it was launched, Microsoft, interested in getting some of Netscape&#8217;s users for itself , developed a compactible dialect to the language. It was called JScript, as Javascript is a trademark of Sun Microsystems, and was included in Internet Explorer 3. Because of the emerging different implementations, people realized the importance to standardize it.</p>
<p>This job was given to <a href="http://www.ecma-international.org/">ECMA</a> that wrote a document decribing how the language should work. The language described in this document, the ECMA-262 specification, is called ECMAScript. Other programming languages are based in ECMAScript, like ActionScript.</p>
<p>We are currently in edition 3 (Javascript 1.5 &#8211; published in 1999). The forth edition of ECMA-262 (Javascript 2.0) was supposed to be finished in October 2008. Along with the critics it received, the most important were:</p>
<ul>
<li>The language didn&#8217;t need that much change</li>
<li>Javascript didn&#8217;t need to look like Java or any other language</li>
<li>Javascript already does well what it proposes to do</li>
<li>Javascript did not need a better extension mechanism</li>
</ul>
<p>Because of differences between gigantics &#8211; in one side: Google, Mozilla and Adobe (that supported version 4); on the other: Microsoft (that was working in a softer version, 3.1), this edition was suspended and a new mid-term edition was created: ECMAScript Harmony. (more <a href="https://mail.mozilla.org/pipermail/es-discuss/2008-August/003400.html">here</a> and <a href="http://en.wikipedia.org/wiki/ECMAScript#ECMAScript_Harmony">here</a>).</p>
<h3>Javascript versions and browsers</h3>
<p>Javascript is currently in version 1.8.1. That doesn&#8217;t mean all browsers run the latest version or even the same one. The table bellow shows each browser and its respective javascript version.</p>
<table class="wikitable" style="font-size: smaller; text-align: center; border: 1px solid #000">
<tbody>
<tr>
<th style="border: 1px solid #000">Version</th>
<th style="border: 1px solid #000">Release date</th>
<th style="border: 1px solid #000">Equivalent to</th>
<th style="border: 1px solid #000">Netscape<br />
Navigator</th>
<th style="border: 1px solid #000">Mozilla<br />
Firefox</th>
<th style="border: 1px solid #000">Internet<br />
Explorer</th>
<th style="border: 1px solid #000">Opera</th>
<th style="border: 1px solid #000">Safari</th>
<th style="border: 1px solid #000">Google<br />
Chrome</th>
</tr>
<tr>
<td style="border: 1px solid #000">1.0</td>
<td style="border: 1px solid #000">March 1996</td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000">2.0</td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000">3.0</td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000"></td>
</tr>
<tr>
<td style="border: 1px solid #000">1.1</td>
<td style="border: 1px solid #000">August 1996</td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000">3.0</td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000"></td>
</tr>
<tr>
<td style="border: 1px solid #000">1.2</td>
<td style="border: 1px solid #000">June 1997</td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000">4.0-4.05</td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000"></td>
</tr>
<tr>
<td style="border: 1px solid #000">1.3</td>
<td style="border: 1px solid #000">October 1998</td>
<td style="border: 1px solid #000">ECMA-262 1<sup>st</sup> edition / ECMA-262 2<sup>nd</sup> edition</td>
<td style="border: 1px solid #000">4.06-4.7x</td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000">4.0</td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000"></td>
</tr>
<tr>
<td style="border: 1px solid #000">1.4</td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000">Netscape<br />
Server</td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000"></td>
</tr>
<tr>
<td style="border: 1px solid #000">1.5</td>
<td style="border: 1px solid #000">November 2000</td>
<td style="border: 1px solid #000">ECMA-262 3<sup>rd</sup> edition</td>
<td style="border: 1px solid #000">6.0</td>
<td style="border: 1px solid #000">1.0</td>
<td style="border: 1px solid #000">5.5 (JScript 5.5),<br />
6 (JScript 5.6),<br />
7 (JScript 5.7),<br />
8 (JScript 6)</td>
<td style="border: 1px solid #000">6.0,<br />
7.0,<br />
8.0,<br />
9.0</td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000"></td>
</tr>
<tr>
<td style="border: 1px solid #000">1.6</td>
<td style="border: 1px solid #000">November 2005</td>
<td style="border: 1px solid #000">1.5 + Array extras + Array and String generics + E4X</td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000">1.5</td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000">3.0, 3.1</td>
<td style="border: 1px solid #000"></td>
</tr>
<tr>
<td style="border: 1px solid #000">1.7</td>
<td style="border: 1px solid #000">October 2006</td>
<td style="border: 1px solid #000">1.6 + Pythonic generators + Iterators + let</td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000">2.0</td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000">3.2, 4.0</td>
<td style="border: 1px solid #000">1.0</td>
</tr>
<tr>
<td style="border: 1px solid #000">1.8</td>
<td style="border: 1px solid #000">June 2008</td>
<td style="border: 1px solid #000">1.7 + Generator expressions + Expression closures</td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000">3.0</td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000"></td>
</tr>
<tr>
<td style="border: 1px solid #000">1.8.1</td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000">1.8 + Minor Updates</td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000">3.5</td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000"></td>
</tr>
<tr>
<td style="border: 1px solid #000">1.9</td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000">1.8.1 + <a title="ECMAScript" href="http://en.wikipedia.org/wiki/ECMAScript">ECMAScript</a> 5 Compliance</td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000">4</td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000"></td>
<td style="border: 1px solid #000"></td>
</tr>
</tbody>
</table>
<h3>Javascript Engines</h3>
<p>Since last year, browsers have been fighting on which one has the best Javascript performance in the so-called Second Browser War. It all began with Google Chrome and its engine, <a href="http://code.google.com/p/v8/">V8</a>. Then, Safari launched its SquirrelFish that evolved 3 months later to <a href="http://webkit.org/blog/214/introducing-squirrelfish-extreme/">SquirrelFish Extreme</a>. In june 2009, Mozilla released its Firefox 3.5 with an optimized <a href="http://www.mozilla.org/js/spidermonkey/">SpiderMonkey</a> engine, called now TraceMonkey, that boosted its speed to 40 times in some cases.</p>
<p><a href="http://lifehacker.com">Lifehacker</a> did some speed tests last june with the final versions of Safari (4.0), Chrome (2.0) and Internet Explorer (8) and almost-there betas of Firefox (3.5b99) and Opera (10b1). The results can be seen <a href="http://lifehacker.com/5286869/lifehacker-speed-tests-safari-4-chrome-2-and-more">here</a>.</p>
<h3>Other Javascript uses and projects</h3>
<p>It is worth remembering other uses of javascript, besides in a webpage. First of all, we can use it for:</p>
<ul>
<li><a href="http://www.adobe.com/products/air/develop/ajax/">build an Adobe Air application</a></li>
<li><a href="http://developer.apple.com/macosx/dashboard.html">develop Apple&#8217;s Dashboard Widgets</a></li>
<li><a href="https://developer.mozilla.org/en/Building_an_Extension">create an extension for Firefox</a></li>
</ul>
<p>We can also mention other interesting projects:</p>
<ul>
<li><a href="http://www.mozilla.org/rhino/">Rhino</a> is an implementation of Javascript 1.7 written in Java by Mozilla. Running on it, you have a lot of <a href="http://en.wikipedia.org/wiki/Server-side_JavaScript">Javascript server-side projects</a></li>
<li><a href="http://www.iunknown.com/2007/06/steve-yegge-por.html">Javascript on Rails</a>: this is a 2007 project, developed by <a href="http://steve-yegge.blogspot.com/">Steve Yegge</a>, that ports Ruby on Rails to Javascript. Steve did this because he wanted something like RoR to work on projects in Google but this was not an allowed programming language in the enterprise. It also runs on top of Rhino.</li>
<li><a href="https://wiki.mozilla.org/Tamarin:ScreamingMonkey">ScreamingMonkey</a>: another Mozilla project, its goal is to allow <a href="http://www.mozilla.org/projects/tamarin/">Tamarin</a> to run within non-Mozilla browsers, starting with Internet Explorer, allowing them to understand Javascript 2 even though not implemented</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.mihswat.com/2009/11/02/the-state-of-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

