<?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>Matt Prokes &#187; Javascript</title>
	<atom:link href="http://mattprokes.com/category/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://mattprokes.com</link>
	<description>&#38; Me·an·der·ings of a software engineer.</description>
	<lastBuildDate>Tue, 13 Jul 2010 07:11:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Linked Lists In Closures</title>
		<link>http://mattprokes.com/2009/11/10/linked-lists-in-closures/</link>
		<comments>http://mattprokes.com/2009/11/10/linked-lists-in-closures/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 11:09:53 +0000</pubDate>
		<dc:creator>mprokes</dc:creator>
				<category><![CDATA[Design Pattern]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://mattprokes.com/?p=1128</guid>
		<description><![CDATA[So you have been asked to create some sort of callback history, or maybe trace how you have got to a certain point and be able to &#8220;roll back&#8221; previous states of your application. I have recently discovered a very interesting use for closure callbacks that enables just the thing. Most people would freak out, [...]]]></description>
			<content:encoded><![CDATA[<!-- Generated by Digg Digg plugin, 
    Author : Yong Mook Kim
    Website : http://www.mkyong.com/blog/digg-digg-wordpress-plugin/
	--><div style='float:right'><table > <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http%3A%2F%2Fmattprokes.com%2F2009%2F11%2F10%2Flinked-lists-in-closures%2F&amp;t=Linked+Lists+In+Closures&amp;s=normal' height='80' width='52' frameborder='0' scrolling='no'></iframe></td></table></div><p>So you have been asked to create some sort of callback history, or maybe trace how you have got to a certain point and be able to &#8220;roll back&#8221; previous states of your application. I have recently discovered a very interesting use for closure callbacks that enables just the thing. Most people would freak out, but really this is just a design pattern based on linked objects in traditional languages (only more easy!).</p>
<p>So lets get on with the example.</p>
<p>var PresidentTracer = new (function(){<br />
var presidenttracer = this;<br />
var presidentCurrent;<br />
var presidentCallback;<br />
var presidentCallforward;<br />
presidenttracer.addPresident = function(presidentName){<br />
var current = presidentCurrent;<br />
var callback = presidentCallback;<br />
presidentCurrent = presidentName;</p>
<p>//callback history<br />
presidentCallback = function(){<br />
presidentCurrent = current;<br />
presidentCallback = callback;<br />
};<br />
};<br />
presidenttracer.nextPresident = function(){<br />
var current = presidentCurrent;<br />
var callback = presidentCallback;<br />
var callforward = presidentCallforward;<br />
if(presidentCallforward!=null){<br />
presidentCallforward();<br />
presidentCallback = function(){<br />
presidentCurrent = current;<br />
presidentCallback = callback;<br />
presidentCallforward = callforward;<br />
}<br />
}<br />
};<br />
presidenttracer.previousPresident = function(){<br />
var current = presidentCurrent;<br />
var callback = presidentCallback;<br />
var callforward = presidentCallforward;<br />
if(presidentCallback!=null){<br />
presidentCallback();<br />
presidentCallforward = function(){<br />
presidentCurrent = current;<br />
presidentCallback = callback;<br />
presidentCallforward = callforward;<br />
}<br />
}<br />
};<br />
presidenttracer.currentPresident = function(){<br />
return presidentCurrent;<br />
};<br />
})();</p>
<p>This is basically linked lists through closures&#8230; It can get even more interesting then this though, we could if we wanted to pass in a closure to get executed on each president switch as follows.</p>
<p>var PresidentTracer = new (function(){<br />
var presidenttracer = this;<br />
var presidentCurrent;<br />
var presidentCallback;<br />
var presidentCallforward;<br />
var switchCall;<br />
presidenttracer.addPresident = function(presidentName, callOnSwitch){<br />
var current = presidentCurrent;<br />
var callback = presidentCallback;<br />
var switcher = switchCall;<br />
presidentCurrent = presidentName;<br />
switchCall = callOnSwitch;<br />
callOnSwitch();<br />
//callback history<br />
presidentCallback = function(){<br />
switchCall = switcher;<br />
presidentCurrent = current;<br />
presidentCallback = callback;<br />
};<br />
};<br />
presidenttracer.nextPresident = function(){<br />
var current = presidentCurrent;<br />
var callback = presidentCallback;<br />
var callforward = presidentCallforward;<br />
var switcher = switchCall;<br />
if(presidentCallforward!=null){<br />
presidentCallforward();<br />
switchCall();<br />
presidentCallback = function(){<br />
presidentCurrent = current;<br />
presidentCallback = callback;<br />
presidentCallforward = callforward;<br />
switchCall = switcher;<br />
};<br />
}<br />
};<br />
presidenttracer.previousPresident = function(){<br />
var current = presidentCurrent;<br />
var callback = presidentCallback;<br />
var callforward = presidentCallforward;<br />
var switcher = switchCall;<br />
if(presidentCallback!=null){<br />
presidentCallback();<br />
switchCall();<br />
presidentCallforward = function(){<br />
presidentCurrent = current;<br />
presidentCallback = callback;<br />
presidentCallforward = callforward;<br />
switchCall = switcher;<br />
};<br />
}<br />
};<br />
presidenttracer.currentPresident = function(){<br />
return presidentCurrent;<br />
};<br />
})();</p>
<p>so lets test it out!!!</p>
<div>
<div>PresidentTracer.addPresident(&#8216;fruit&#8217;,function(){alert(&#8216;zoop&#8217;);})</div>
<div>PresidentTracer.addPresident(&#8216;whoAmI&#8217;,function(){alert(PresidentTracer.currentPresident());})</div>
<div>PresidentTracer.addPresident(&#8216;neto&#8217;,function(){alert(&#8216;dynamic callbacks&#8217;);})</div>
<div>PresidentTracer.currentPresident();</div>
<p>PresidentTracer.previousPresident()</p></div>
<div>PresidentTracer.nextPresident()</div>
<div>PresidentTracer.nextPresident()</div>
<div>PresidentTracer.previousPresident()</div>
<div>PresidentTracer.previousPresident()</p>
<p>It works! Long story short, this example shows off the dynamic nature of javascript as well as closures and callbacks. Many people have yet to understand the power of such language features, but if used correctly they can simplify programming, and give you syntactical expressiveness.</p></div>
<div></div>
<div>The author,</div>
<div>Matt Prokes</div>
<a href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F11%2F10%2Flinked-lists-in-closures%2F&amp;linkname=Linked%20Lists%20In%20Closures" title="Reddit" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a> <a href="http://www.addtoany.com/add_to/stumbleupon?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F11%2F10%2Flinked-lists-in-closures%2F&amp;linkname=Linked%20Lists%20In%20Closures" title="StumbleUpon" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/stumbleupon.png" width="16" height="16" alt="StumbleUpon"/></a> <a href="http://www.addtoany.com/add_to/bebo?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F11%2F10%2Flinked-lists-in-closures%2F&amp;linkname=Linked%20Lists%20In%20Closures" title="Bebo" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/bebo.png" width="16" height="16" alt="Bebo"/></a> <a href="http://www.addtoany.com/add_to/yahoo_buzz?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F11%2F10%2Flinked-lists-in-closures%2F&amp;linkname=Linked%20Lists%20In%20Closures" title="Yahoo Buzz" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/buzz.png" width="16" height="16" alt="Yahoo Buzz"/></a> <a href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F11%2F10%2Flinked-lists-in-closures%2F&amp;linkname=Linked%20Lists%20In%20Closures" title="Delicious" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F11%2F10%2Flinked-lists-in-closures%2F&amp;linkname=Linked%20Lists%20In%20Closures" title="Twitter" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/livejournal?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F11%2F10%2Flinked-lists-in-closures%2F&amp;linkname=Linked%20Lists%20In%20Closures" title="LiveJournal" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/livejournal.png" width="16" height="16" alt="LiveJournal"/></a> <a href="http://www.addtoany.com/add_to/netlog?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F11%2F10%2Flinked-lists-in-closures%2F&amp;linkname=Linked%20Lists%20In%20Closures" title="Netlog" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/netlog.png" width="16" height="16" alt="Netlog"/></a> <a href="http://www.addtoany.com/add_to/hellotxt?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F11%2F10%2Flinked-lists-in-closures%2F&amp;linkname=Linked%20Lists%20In%20Closures" title="HelloTxt" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/hellotxt.png" width="16" height="16" alt="HelloTxt"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F11%2F10%2Flinked-lists-in-closures%2F&amp;linkname=Linked%20Lists%20In%20Closures"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://mattprokes.com/2009/11/10/linked-lists-in-closures/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Class Based Javascript Programming</title>
		<link>http://mattprokes.com/2009/10/30/object-first-javascript-programming/</link>
		<comments>http://mattprokes.com/2009/10/30/object-first-javascript-programming/#comments</comments>
		<pubDate>Sat, 31 Oct 2009 03:09:42 +0000</pubDate>
		<dc:creator>mprokes</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[New Ideas]]></category>

		<guid isPermaLink="false">http://mattprokes.com/?p=1093</guid>
		<description><![CDATA[Over the past few years I have worked on several javascript projects, many of which use and require a class paradigm of some sort (Open API&#8217;s). So to say the least, this is an experience which is irritating for new people and is still irritating for experienced programmers. The complexity of the problem is due [...]]]></description>
			<content:encoded><![CDATA[<!-- Generated by Digg Digg plugin, 
    Author : Yong Mook Kim
    Website : http://www.mkyong.com/blog/digg-digg-wordpress-plugin/
	--><div style='float:right'><table > <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http%3A%2F%2Fmattprokes.com%2F2009%2F10%2F30%2Fobject-first-javascript-programming%2F&amp;t=Class+Based+Javascript+Programming&amp;s=normal' height='80' width='52' frameborder='0' scrolling='no'></iframe></td></table></div><p>Over the past few years I have worked on several javascript projects, many of which use and require a class paradigm of some sort (Open API&#8217;s). So to say the least, this is an experience which is irritating for new people and is still irritating for experienced programmers. The complexity of the problem is due mostly to the fact that there are 3-4 ways to do some things in the language (this is one of them), and none of the ways to do it really is right in any traditional sense of the word.</p>
<p>So for the JOY of throwing another wrench in the basket, I bring you yet ANOTHER way of doing namespaces in javascript programming, but don&#8217;t worry this should be a very pleasant experience.</p>
<p><strong>First let me start off with how the problem began,</strong></p>
<ul>
<li>One day matt was asked to program yet another open API, and on this day matt was sad.</li>
</ul>
<ul>
<li>The reason was because on a previous project matt had tried an object literal style of programming (the x = {}; style), of which he found private fields were not to be found, and the requirements of an object literal (for class programming) to be very limiting  with no constructor of any sort.</li>
<li>He also remembered the wonders of an even earlier project, which used traditional javascript OOP programming (new operator). This style offered solutions to many of problems related to defining classes using object literals, but yet had its own set of problems. One of particular irritation was a property of javascript which makes it very difficult to build namespaced objects (which is why I think we do namespaces in JSON objects these days).</li>
<li>Read about the two methods here: <a href="http://www.javascriptkit.com/javatutors/oopjs.shtml" target="_blank">http://www.javascriptkit.com/javatutors/oopjs.shtml</a></li>
</ul>
<p>Now being a programmer who is mandated to use jquery, he was a fish out of water. Since jquery is not a library that lends its self well to a multi-level namespace matt was forced to come up with a new method for programming namespaced API&#8217;s, regardless.. Should matt really have to rely on a library to define a namespace in javascript?? NO.</p>
<p><strong>Thus I introduce to you, classical javascript OOP with namespaces. Which I would affectionately like to call &#8220;Javascript with Classes&#8221;.</strong></p>
<p>Properties of javascript class programming.</p>
<ul>
<li>All namespace objects are anonymous instantiated singletons. Thus carry all the properties of a typical object. This levels the playing field, there are no &#8220;special&#8221; object literals.</li>
<li>I have been using it for several months, it works on all browsers.</li>
<li>Since everything is instantiated first, objects in the namespace may easily share references, via <strong>this</strong>.</li>
<li>Namespace objects may not be instantiated, objects within the namespace may be instantiated, this method unifies classical javascript OOP and namespaces. You are able to control what objects may be instantiated with this method.</li>
<li>Namespace objects have all the standard things any other function has, including privates, this, prototype, etc.</li>
</ul>
<p>Finally, this method of javascript programming isn&#8217;t really all that special. To be honest it was looking me right in the face for the longest time, but it wasn&#8217;t until now that I get why it is important. I would say that probably the nicest thing about this method is that it unifies namespaces and classical javascript OOP, I can throw out structuring classes in object literals all together, there are also several other advantages including much cleaner code.</p>
<p><strong>So enough talk, lets cut to the chase: </strong></p>
<p><strong><span style="color: #ff0000;">(The red highlighted code is the winner, when looking at simplicity)</span><br />
</strong></p>
<ul>
<li><strong>Lets create a namespace object called HelloWorld</strong></li>
</ul>
<p><span style="color: #ff0000;"><em><span style="color: #000000;"><strong>Object Literal Way:</strong></span><br />
</em><em>HelloWorld = {};</em></span></p>
<p><em><strong>Classes Way:</strong><br />
HelloWorld = new (function(){<br />
})();</em></p>
<p><em><strong>Classical Way:</strong><br />
function HelloWorld(){<br />
}</em></p>
<ul>
<li><em> </em><strong>Simple enough, lets now add another level to our namespace<em>, say some animals.</em></strong></li>
</ul>
<p><em><strong>Object Literal Way: </strong><strong><br />
</strong>Notice: Whoa, where did function come from? Melding of 2 different concepts here. No concept of closures, you will see later how this can get extremely complicated, and even unsafe.</em></p>
<p><span style="color: #ff0000;"><em>HelloWorld = {<br />
&#8220;Animals&#8221;:{</em><em><br />
&#8220;Bunnie&#8221;:function(){},</em><em><br />
&#8220;Fish&#8221;:function(){},<br />
&#8220;Bear&#8221;:function(){}<br />
}<br />
}</em></span></p>
<p><em><strong>Javascript Class Way: </strong><strong><br />
</strong>Notice: things stay consistent. The anonymous singletons are the namespaces, functions are the objects. Think about how closures come into play with this method.<br />
</em></p>
<p><em>HelloWorld = new (function(){<br />
</em><em> var hw = this;<br />
hw.Animals = new (function(){<br />
var animal = this;<br />
animal.Bunnie = function(){};</em><em><br />
animal.Fish = function(){};<br />
animal.Bear = function(){};<br />
})();<br />
})();</em></p>
<p><strong><em>Classical Way: </em></strong><em><strong><br />
</strong>Notice:You can see where classical starts to break down with namespaces, you need to declare every level of the object. Highly irritating, if you have several levels. Everything is declared out of scope, so you will see later how closures factor into things. Also, unless you want your user to be able to instantiate HelloWorld on the fly, this is not a standard namespace.</em> This is not really even correct in many ways..<br />
<em> </em></p>
<p><em>HelloWorld = function(){}<br />
HelloWorld.Animals = function(){};<br />
HelloWorld.Animals.Bunnie = function(){};<br />
HelloWorld.Animals.Fish = function(){};<br />
HelloWorld.Animals.Bear = function(){};</em></p>
<ul>
<li><strong><em>Excellent, now lets say that we wanted one function in the object domain to access another.</em></strong></li>
</ul>
<p><em><strong>Object Literal Way: </strong><strong><br />
</strong>Notice: Humm, notice how we had to type in the full object path here, this is one of the downfalls of object literals, in the fact that scope is not retained in the literal. This becomes highly irritating if  you at all try to create any sort of complexed javascript object model.<br />
</em></p>
<p><em>HelloWorld = {<br />
Animals:{</em><em><br />
Bunnie:function(){alert(&#8216;Bunny&#8217;);},</em><em><br />
Fish:function(){alert(&#8216;Fish&#8217;);},<br />
Bear:function(){<br />
alert(&#8216;A Bear Has A&#8217;);<br />
<strong>HelloWorld.Animals.Fish();</strong><br />
}<br />
}<br />
}</em></p>
<p><em><strong>Javascript Class Way: </strong><strong><br />
</strong>Notice: Humm, this is nice, notice the fact that since everything is in a closure, we are able to retain scope. We don&#8217;t have to work down the heirarchy, just use the closes parent object to reference sub-objects. If you do lots of api calls which is what about 30% of code is, this can greatly enhance how clean code is.<br />
</em></p>
<p><span style="color: #ff0000;"><em>HelloWorld = new (function(){<br />
</em><em> var hw = this;<br />
hw.Animals = new (function(){<br />
var animal = this;<br />
animal.Bunnie = function(){alert(&#8216;Bunny&#8217;);};</em><em><br />
animal.Fish = function(){alert(&#8216;Fish&#8217;);};</em><em><br />
animal.Bear = function(){<br />
alert(&#8216;A Bear Has A&#8217;);<br />
<strong>animal.Fish();</strong><br />
};<br />
})();<br />
})();</em></span></p>
<p><strong><em>Classical Way: </em></strong><em><strong><br />
</strong>Notice:Really, classical is getting worse here, and we have the same problem that the object literal has, as the fact that there is no retention of scope.<br />
</em></p>
<p><em>HelloWorld = function(){}<br />
HelloWorld.Animals = function(){};<br />
HelloWorld.Animals.Bunnie = function(){alert(&#8216;Bunnie&#8217;);};<br />
HelloWorld.Animals.Fish = function(){alert(&#8216;Fish&#8217;);};<br />
HelloWorld.Animals.Bear = function(){alert(&#8216;A Bear Has A&#8217;);<br />
<strong>HelloWorld.Animals.Fish();</strong></em><em><br />
};</em></p>
<ul>
<li><strong>Lets say that we wanted to create a private field in a domain object.</strong></li>
</ul>
<p><strong>Object Literal Way:<br />
</strong>Its not possible to do it.</p>
<p><strong>Javascript Class Way:</strong><br />
Due to the fact that sub classes are defined in the parent class scope is inherent, and privates become easy to achieve. Privates only exist in the confines of a { and }, so a parent object could never access a child private.<span style="color: #ff0000;"><span style="color: #000000;"> </span></span></p>
<p><span style="color: #ff0000;"><em>HelloWorld = new (function(){<br />
</em><em> var hw = this;<br />
<strong>var privateHello = &#8216;Hello World&#8217;;</strong><br />
hw.Animals = new (function(){<br />
var animal = this;<br />
animal.Bunnie = function(){alert(&#8216;Bunny&#8217;);};</em><em><br />
animal.Fish = function(){alert(&#8216;Fish&#8217;);};</em><em><br />
animal.Bear = function(){<br />
alert(&#8216;A Bear Has A&#8217;);</em><em> animal.Fish();<strong>alert(privateHello);};</strong><br />
})();<br />
})();</em></span></p>
<p><span style="color: #ff0000;"><strong><span style="color: #000000;">Classical Way:</span></strong></span><em><br />
You can define a private variable in the HelloWorld Object, but due to scope issues you can&#8217;t share it with any other object.. *sigh*.</em></p>
<p><em><strong>HelloWorld = function(){var privateHello = &#8216;Hello World&#8217;;}</strong><br />
HelloWorld.Animals = function(){};<br />
HelloWorld.Animals.Bunnie = function(){alert(&#8216;Bunnie&#8217;);};<br />
HelloWorld.Animals.Fish = function(){alert(&#8216;Fish&#8217;);};<br />
HelloWorld.Animals.Bear = function(){alert(&#8216;A Bear Has A&#8217;);HelloWorld.Animals.Fish();</em><em><br />
};</em></p>
<p><strong>Hummm whenever we start to do anything complexed, a clear winner is beginning to emerge here<em>. </em>Lets continue, and try some other common programming practices. How about we try out constructors. &#8230; More on this a bit later.. getting late&#8230;<br />
</strong></p>
<p><em><br />
</em></p>
<a href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F10%2F30%2Fobject-first-javascript-programming%2F&amp;linkname=Class%20Based%20Javascript%20Programming" title="Reddit" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a> <a href="http://www.addtoany.com/add_to/stumbleupon?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F10%2F30%2Fobject-first-javascript-programming%2F&amp;linkname=Class%20Based%20Javascript%20Programming" title="StumbleUpon" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/stumbleupon.png" width="16" height="16" alt="StumbleUpon"/></a> <a href="http://www.addtoany.com/add_to/bebo?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F10%2F30%2Fobject-first-javascript-programming%2F&amp;linkname=Class%20Based%20Javascript%20Programming" title="Bebo" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/bebo.png" width="16" height="16" alt="Bebo"/></a> <a href="http://www.addtoany.com/add_to/yahoo_buzz?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F10%2F30%2Fobject-first-javascript-programming%2F&amp;linkname=Class%20Based%20Javascript%20Programming" title="Yahoo Buzz" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/buzz.png" width="16" height="16" alt="Yahoo Buzz"/></a> <a href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F10%2F30%2Fobject-first-javascript-programming%2F&amp;linkname=Class%20Based%20Javascript%20Programming" title="Delicious" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F10%2F30%2Fobject-first-javascript-programming%2F&amp;linkname=Class%20Based%20Javascript%20Programming" title="Twitter" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/livejournal?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F10%2F30%2Fobject-first-javascript-programming%2F&amp;linkname=Class%20Based%20Javascript%20Programming" title="LiveJournal" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/livejournal.png" width="16" height="16" alt="LiveJournal"/></a> <a href="http://www.addtoany.com/add_to/netlog?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F10%2F30%2Fobject-first-javascript-programming%2F&amp;linkname=Class%20Based%20Javascript%20Programming" title="Netlog" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/netlog.png" width="16" height="16" alt="Netlog"/></a> <a href="http://www.addtoany.com/add_to/hellotxt?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F10%2F30%2Fobject-first-javascript-programming%2F&amp;linkname=Class%20Based%20Javascript%20Programming" title="HelloTxt" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/hellotxt.png" width="16" height="16" alt="HelloTxt"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F10%2F30%2Fobject-first-javascript-programming%2F&amp;linkname=Class%20Based%20Javascript%20Programming"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://mattprokes.com/2009/10/30/object-first-javascript-programming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript Development Trends</title>
		<link>http://mattprokes.com/2009/04/26/javascript-development-trends/</link>
		<comments>http://mattprokes.com/2009/04/26/javascript-development-trends/#comments</comments>
		<pubDate>Sun, 26 Apr 2009 07:26:47 +0000</pubDate>
		<dc:creator>mprokes</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[web developer 1.4]]></category>

		<guid isPermaLink="false">http://mattprokes.com/?p=824</guid>
		<description><![CDATA[Alpha Edition!, e-mail spelling/grammer/topic suggestions to mattprokes@gmail.com The Professional Developer Series Volume 2, Web Development Chapter 1.4 Web Development Trends Page: #22 Javascript, now more then ever is becoming of increasing importance. For those companies that want to deliver rich platform agnostic applications out to their users, javascript is the only way to get it [...]]]></description>
			<content:encoded><![CDATA[<!-- Generated by Digg Digg plugin, 
    Author : Yong Mook Kim
    Website : http://www.mkyong.com/blog/digg-digg-wordpress-plugin/
	--><div style='float:right'><table > <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http%3A%2F%2Fmattprokes.com%2F2009%2F04%2F26%2Fjavascript-development-trends%2F&amp;t=Javascript+Development+Trends&amp;s=normal' height='80' width='52' frameborder='0' scrolling='no'></iframe></td></table></div><p style="text-align:left;"><strong>Alpha Edition!</strong>, e-mail <span style="text-decoration: underline;">spelling/grammer/topic suggestions</span> to <a href="mailto:mattprokes@gmail.com">mattprokes@gmail.com<br />
</a></p>
<p style="text-align:center;"><a href="http://mattprokes.com/2009/04/26/delivering-client-heavy-applications/"><img class="alignleft size-full wp-image-519" title="previous1" src="http://webactivex.files.wordpress.com/2009/04/previous1.png" alt="previous1" /></a><a href="http://mattprokes.com/2009/04/26/the-model-view-controller-design-pattern/"><img class="alignright size-full wp-image-518" title="next1" src="http://webactivex.files.wordpress.com/2009/04/next1.png" alt="next1" /></a><strong><a href="http://mattprokes.com/2009/04/05/the-professional-developer-series/">The Professional Developer Series</a><br />
<a href="http://mattprokes.com/2009/04/07/the-professional-developer-series-volume-2-web-development/">Volume 2, Web Development</a></strong><strong><a href="http://mattprokes.com/2009/04/26/delivering-client-heavy-applications/"><br />
Chapter 1.4 Web Development Trends</a></strong><br />
<strong>Page: #22</strong></p>
<p style="text-align:center;"><strong><br />
</strong></p>
<p>Javascript, now more then ever is becoming of increasing importance. For those companies that want to deliver rich platform agnostic applications out to their users, javascript is the only way to get it done. The best part is, possibilities that javascript opens up are endless and its this authors belief that we will be talking about the langauge for years and years to come. So what are some of the javascript based trends that we are seeing today, and will be seeing in the future.</p>
<p><strong>Trend 1:  Stop delivering dynamic server generated web content.</strong> As webapplications progress more and more companies are finding out that really all they need a server to deliver these days is web application code, and data. Javascript is slowly trending toward being server technology agnostic, especially with the advent of json it no longer matters where the data is coming from as long as there is data, thats all that matters (data driven applications). Pretty much all web applications these days can be delivered as flat .html files.</p>
<p><strong>Trend 2:  Rich Browser Applications. </strong>As web applications evolve we are finding that in many cases you can save the webapplication to the desktop and use it regardless of wheither it is online or offline! Basically allowing a person to use a browser based application as a replacement for a regular desktop application, all that is required is a javascript based browser. Technologies such as Google Gears, Dojo, and a few new ones presented in this book allow such applications to exist. We will be building a few rich browser applications throughout this book.</p>
<p><strong>Trend 3:  Data Mashed Web Applications.</strong> Need to get data from many locations to build and analyse useful information? This is what data mashing, and data mining is all about. You can use javascript these days to build dynamic map content, and create collaborative information sets for your users. Information services such as <a href="http://pipes.yahoo.com/pipes/" target="_blank">Yahoo Pipes</a>, <a href="http://www.popfly.com/" target="_blank">Popfly</a>, and <a href="http://sourceforge.net/projects/semanticwebpipe/" target="_blank">Semantic Web Pipes</a> .</p>
<p><strong>Trend 4: Intelligent Web Applications</strong>. When people think artificial intilligence, often I see thoughts conjured of a computer that knows all, sees all, and can communicate fluently with humans, solving all the worlds problems. In reality AI won&#8217;t probably be something that arises from the ashes of a genius programmer that created the next HAL system. No, what is most likely to happen is the development of a system which is asked questions, and is able to dynamically analyse correct sets of existing data and come up with a solution. Computers&#8217; intelligence based on the current state of technology is completely dependent on what we contribute to them. We often call this <a href="http://www.pnl.gov/computing/technologies/computational_analytics.stm" target="_blank">computational analytics</a>, today javascript is often used to drive the next generation of intelligent web based applications.</p>
<p><strong>Trend 5: Collaborative Media Applications/Groupware.</strong> This set of javascript applications is specifically targeted at collaborative media, and and communication. Applications such as google docs, facebook, myspace, youtube, and more. All of these media companies provide javascript based collaboration. Probably the most striking would be google docs collaboration tools that allow you to write a document in a tool similar to word, but it also allows several people to write a single document all at one time! Another example is chatting on facebook, you can communicate with your friends right from the website using a javascript based chat application. I expect in the future to only see more and more of these applications as their popularity increases.</p>
<p><strong>Trend 6: Javascript Frameworks.</strong> Javascript as a language and native api is actually very small compared to other langauges out there. While very small, the functionality the langauge provided was very powerful. So what people started doing is building up API&#8217;s around the langauge which they could leverage to make their job of programming more easy. Frameworks were a great innovation for the language, and it is very likely that people wouldn&#8217;t think to build the collaborative applications they do today with javascript if great frameworks for the language didn&#8217;t exist. A good list of frameworks are JQuery, Dojo, YUI, MooTools, and many others. Often libraries attempt to make up for javascripts cross platform compatibility issues, and also try to make the language more easy to code.</p>
<p><strong>Trend 7: Taking javascript beyond the web.</strong> I don&#8217;t know how many people know this but firefox is actually coded in javascript. Now you may sit back and wonder how can that be? The number of non-web-browser technologies based on javascript  is actually increasing, and since it is the most popular programming language in the world many organizations are beginning to offer javascript apis for their products. See, just like xml, there are many technologies out there that understand the javascript language. Projects such as firefox, linux gnome, jaxer, and many others are beginning to implement these &#8220;javascript interpreters&#8221; and thus are able to extend their applications using the javascript langauge.</p>
<p><strong>Trend 8: Javascript is becoming the new duct-tape of the web.</strong> Like Perl was a few years ago for getting things done, javascript is beginning to increasingly replace that role, expect that trend to continue as we me toward a more and more online world.</p>
<a href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F04%2F26%2Fjavascript-development-trends%2F&amp;linkname=Javascript%20Development%20Trends" title="Reddit" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a> <a href="http://www.addtoany.com/add_to/stumbleupon?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F04%2F26%2Fjavascript-development-trends%2F&amp;linkname=Javascript%20Development%20Trends" title="StumbleUpon" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/stumbleupon.png" width="16" height="16" alt="StumbleUpon"/></a> <a href="http://www.addtoany.com/add_to/bebo?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F04%2F26%2Fjavascript-development-trends%2F&amp;linkname=Javascript%20Development%20Trends" title="Bebo" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/bebo.png" width="16" height="16" alt="Bebo"/></a> <a href="http://www.addtoany.com/add_to/yahoo_buzz?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F04%2F26%2Fjavascript-development-trends%2F&amp;linkname=Javascript%20Development%20Trends" title="Yahoo Buzz" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/buzz.png" width="16" height="16" alt="Yahoo Buzz"/></a> <a href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F04%2F26%2Fjavascript-development-trends%2F&amp;linkname=Javascript%20Development%20Trends" title="Delicious" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F04%2F26%2Fjavascript-development-trends%2F&amp;linkname=Javascript%20Development%20Trends" title="Twitter" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/livejournal?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F04%2F26%2Fjavascript-development-trends%2F&amp;linkname=Javascript%20Development%20Trends" title="LiveJournal" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/livejournal.png" width="16" height="16" alt="LiveJournal"/></a> <a href="http://www.addtoany.com/add_to/netlog?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F04%2F26%2Fjavascript-development-trends%2F&amp;linkname=Javascript%20Development%20Trends" title="Netlog" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/netlog.png" width="16" height="16" alt="Netlog"/></a> <a href="http://www.addtoany.com/add_to/hellotxt?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F04%2F26%2Fjavascript-development-trends%2F&amp;linkname=Javascript%20Development%20Trends" title="HelloTxt" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/hellotxt.png" width="16" height="16" alt="HelloTxt"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F04%2F26%2Fjavascript-development-trends%2F&amp;linkname=Javascript%20Development%20Trends"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://mattprokes.com/2009/04/26/javascript-development-trends/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Webapplication Templates</title>
		<link>http://mattprokes.com/2009/03/04/webapplication-templates/</link>
		<comments>http://mattprokes.com/2009/03/04/webapplication-templates/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 19:19:17 +0000</pubDate>
		<dc:creator>mprokes</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://webactivex.wordpress.com/2009/03/04/webapplication-templates/</guid>
		<description><![CDATA[[digg=http://digg.com/programming/Create_Webapplication_Templates_From_Scratch]I am actually a very strong believer in template technologies, and the objective of this document will be to layout a plan of how you can implement webapplication templates using jquery. Step 1) Create The Template I am just going to start off with something simple such as: &#60;div id=&#8221;Blah-Application&#8221;&#62; &#60;div id=&#8221;Blah-Application-Header&#8221;&#62; &#60;div class=&#8221;header&#8221;&#62;Head&#60;/div&#62; &#60;/div&#62; [...]]]></description>
			<content:encoded><![CDATA[<!-- Generated by Digg Digg plugin, 
    Author : Yong Mook Kim
    Website : http://www.mkyong.com/blog/digg-digg-wordpress-plugin/
	--><div style='float:right'><table > <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http%3A%2F%2Fmattprokes.com%2F2009%2F03%2F04%2Fwebapplication-templates%2F&amp;t=Webapplication+Templates&amp;s=normal' height='80' width='52' frameborder='0' scrolling='no'></iframe></td></table></div><p>[digg=http://digg.com/programming/Create_Webapplication_Templates_From_Scratch]I am actually a very strong believer in template technologies, and the objective of this document will be to layout a plan of how you can implement webapplication templates using jquery.</p>
<p><strong>Step 1) Create The Template</strong><br />
I am just going to start off with something simple such as:</p>
<p>&lt;div id=&#8221;Blah-Application&#8221;&gt;<br />
&lt;div id=&#8221;Blah-Application-Header&#8221;&gt;<br />
&lt;div class=&#8221;header&#8221;&gt;Head&lt;/div&gt;<br />
&lt;/div&gt;<br />
&lt;div id=&#8221;Blah-Application-Record&#8221;&gt;<br />
&lt;div class=&#8221;record-clone&#8221;&gt;<br />
&lt;div class=&#8221;id&#8221;&gt;&lt;/div&gt;<br />
&lt;div class=&#8221;user&#8221;&gt;&lt;/div&gt;<br />
&lt;div class=&#8221;date&#8221;&gt;&lt;/div&gt;<br />
&lt;/div&gt;<br />
&lt;/div&gt;<br />
&lt;/div&gt;</p>
<p><strong>Step 2) Bind The Data</strong><br />
var data = [{id:21341,user:'mprokes',date:'12/13/08'},{id:2134234,user:'pants',date:'10/12/08'}]</p>
<p><strong>Populating the records.</strong><br />
var clone = $(&#8216;.record-clone&#8217;)<br />
function populate(){<br />
$(data).each(function(){<br />
var cloned = clone.clone();<br />
cloned.addClass(&#8216;record&#8217;);<br />
cloned.find(&#8216;.id&#8217;).val(this.id);<br />
cloned.find(&#8216;.user&#8217;).val(this.user);<br />
cloned.find(&#8216;.date&#8217;).val(this.date);<br />
$(&#8216;#Blah-Application-Record&#8217;).append(cloned);<br />
});<br />
}<br />
<strong><br />
Getting the records.</strong><br />
function getRecords(){<br />
var records = [];<br />
$(&#8216;#Blah-Application-Record .record&#8217;).each(function(){<br />
records.push({id:this.find(&#8216;.id&#8217;).val(),user:this.find(&#8216;.user&#8217;).val(),date:this.find(&#8216;.date&#8217;).val()})<br />
});<br />
return records;<br />
}</p>
<p><strong>Step 3) Tagging and sorting the records.</strong><br />
function tagDefaults(){</p>
<p>$(&#8216;#Blah-Application-Record .record&#8217;).each(function(){</p>
<p>if(this.find(&#8216;.user&#8217;)==&#8217;mprokes&#8217; || this.find(&#8216;.user&#8217;)==&#8217;roger&#8217;){<br />
this.addClass(&#8216;default&#8217;);<br />
//or you could also change/set attributes, etc. As well as sorting.<br />
//since you get back a list of nodes, you can push, pop,slice, etc those<br />
//nodes from the list, and then re-append the list of nodes again to #Blah-Application-Record<br />
}</p>
<p>});</p>
<p>}</p>
<p>function getDefaults(){<br />
return $(&#8216;#Blah-Application-Record .default&#8217;);<br />
}</p>
<p><strong>Conclusion</strong>, Creating a view; for a model view controller (MVC) does not need to be hard, it can actually be very easy and straight forward. To simplify your webdevelopment sometimes it is the only way to go. Next time your sit down and write a webapplication try it out, you may be surprised how nicely it works.</p>
<p>~Your Friendly Webdeveloper<br />
Matt Prokes</p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=931a03f3-e2f3-4252-a506-f6610bfbbe77" alt="" /></div>
<a href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F03%2F04%2Fwebapplication-templates%2F&amp;linkname=Webapplication%20Templates" title="Reddit" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a> <a href="http://www.addtoany.com/add_to/stumbleupon?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F03%2F04%2Fwebapplication-templates%2F&amp;linkname=Webapplication%20Templates" title="StumbleUpon" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/stumbleupon.png" width="16" height="16" alt="StumbleUpon"/></a> <a href="http://www.addtoany.com/add_to/bebo?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F03%2F04%2Fwebapplication-templates%2F&amp;linkname=Webapplication%20Templates" title="Bebo" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/bebo.png" width="16" height="16" alt="Bebo"/></a> <a href="http://www.addtoany.com/add_to/yahoo_buzz?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F03%2F04%2Fwebapplication-templates%2F&amp;linkname=Webapplication%20Templates" title="Yahoo Buzz" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/buzz.png" width="16" height="16" alt="Yahoo Buzz"/></a> <a href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F03%2F04%2Fwebapplication-templates%2F&amp;linkname=Webapplication%20Templates" title="Delicious" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F03%2F04%2Fwebapplication-templates%2F&amp;linkname=Webapplication%20Templates" title="Twitter" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/livejournal?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F03%2F04%2Fwebapplication-templates%2F&amp;linkname=Webapplication%20Templates" title="LiveJournal" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/livejournal.png" width="16" height="16" alt="LiveJournal"/></a> <a href="http://www.addtoany.com/add_to/netlog?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F03%2F04%2Fwebapplication-templates%2F&amp;linkname=Webapplication%20Templates" title="Netlog" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/netlog.png" width="16" height="16" alt="Netlog"/></a> <a href="http://www.addtoany.com/add_to/hellotxt?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F03%2F04%2Fwebapplication-templates%2F&amp;linkname=Webapplication%20Templates" title="HelloTxt" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/hellotxt.png" width="16" height="16" alt="HelloTxt"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F03%2F04%2Fwebapplication-templates%2F&amp;linkname=Webapplication%20Templates"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://mattprokes.com/2009/03/04/webapplication-templates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why I am on the fence about jbind</title>
		<link>http://mattprokes.com/2009/02/25/why-i-am-on-the-fence-about-jbind/</link>
		<comments>http://mattprokes.com/2009/02/25/why-i-am-on-the-fence-about-jbind/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 18:37:15 +0000</pubDate>
		<dc:creator>mprokes</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://webactivex.wordpress.com/2009/02/25/why-i-am-on-the-fence-about-jbind/</guid>
		<description><![CDATA[[digg=http://digg.com/programming/Why_I_am_on_the_fence_about_jbind_for_jquery] DEJA VU?!?! doesn&#8217;t the dom already do this?So then why are we doing this modeling in jbind? The history, I was recently introduced to a tool for binding data to a markup template called jbind. While in theory its not a bad idea I get this weird feeling we shouldn&#8217;t be using it, ESPECIALLY [...]]]></description>
			<content:encoded><![CDATA[<!-- Generated by Digg Digg plugin, 
    Author : Yong Mook Kim
    Website : http://www.mkyong.com/blog/digg-digg-wordpress-plugin/
	--><div style='float:right'><table > <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http%3A%2F%2Fmattprokes.com%2F2009%2F02%2F25%2Fwhy-i-am-on-the-fence-about-jbind%2F&amp;t=Why+I+am+on+the+fence+about+jbind&amp;s=normal' height='80' width='52' frameborder='0' scrolling='no'></iframe></td></table></div><p>[digg=http://digg.com/programming/Why_I_am_on_the_fence_about_jbind_for_jquery] <strong>DEJA VU?!?! doesn&#8217;t the dom already do this?<br /></strong><br />So then why are we doing this modeling in jbind?</p>
<p>The history, I was recently introduced to a tool for binding data to a markup template called jbind. While in theory its not a bad idea I get this weird feeling we shouldn&#8217;t be using it, ESPECIALLY if you are using jQuery and even more funny its a jQuery plugin <img src='http://mattprokes.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</p>
<p>So let me explain the reasoning for this feeling, in html we have these neat things called classes. Classes allow you to effectivly &#8220;tag&#8221; markup as being a &#8220;grouping&#8221; of data. From there you simply just execute a property selector query and wala you got your data. Its very nice from a WYSIWYG perspective. Now jbind is mainly for automatic binding of data to a templated record set, and then the syntactical niceness is created around each record upon population.</p>
<p>That is great and all, except there is a requirement to generate a type of in-script model-view combo. jBind functionality can be effectivly implemented without the requirement of the library if perhaps a bit better judgement is used during the creation of the webapplicaton.</p>
<p>So to prove my point, lets give an example of what jbind would be best applied. A tableset of data.</p>
<p><span style="font-family:monospace;">
<div>&lt;div&gt;
<div>&lt;div&gt;{blah}&lt;/div&gt;</div>
<div>&lt;div&gt;{cool}&lt;/div&gt;<br />&lt;/div&gt;</div>
<p></div>
<p></span></p>
<p>This effectively says create a parent div, create 2 children, and inject the value of blah and cool into those children. What happens is jbind will runs through all nodes, and identify where to put data. While this is great if you are doing nothing with the data and the nodes that you are binding, it sucks for all other cases.</p>
<p>This is because you need to create a sort of &#8220;event callback&#8221; if you need to do more to the node upon the data injection, and then do even more work just to pull the data back out again, modify it. We are not even talking about adding events to the dynamically created nodes, which also will require more work.</p>
<p>What if we did this:</p>
<p><span style="font-family:monospace;">
<div class="parent">
<div class="blah"></div>
<p>&lt;div class=&#8221;parent&#8221;&gt;<br />&lt;div class=&#8221;blah&#8221;&gt;&lt;/div&gt;<br />&lt;div class=&#8221;cool&#8221;&gt;&lt;/div&gt;<br />&lt;/div&gt;
<div class="cool"></div>
<p></div>
<p></span><br />What happens here is you var x = $(&#8216;.parent:first&#8217;).clone(), and inject the data into the template like this, x.children(&#8216;.blah&#8217;).text(value); and x.children(&#8216;.cool&#8217;).text(value);</p>
<p>Finally appending it to $(&#8216;.parent:first&#8217;).parent.append(x);</p>
<p>This is nice because you do not need event callbacks on node creation; the data manipulation, as well as binding of events to the created nodes can happen on the clone as always. You also have html that has classes on it, and can later be queried for further manipulation, or just seeing what data is within that scope. The idea from what I percieve as far as jbind goes is to remove the need for classes, why, I don&#8217;t know classes are great.</p>
<p><strong>So to conclude</strong>, I am not saying jBind is bad really, it is more efficient if you want to spit some json data out in the wild without doing anything extra. Prototyping for instance may be served well with this solution. Though I would argue that if you are not doing anything other then that, then maybe you shouldn&#8217;t be doing your stuff in js in the first place and maybe just do it through the back end. On the other hand, if you are going to need to modify the data, add events to dynamically created nodes, etc..</p>
<p>Then it is likely jbind will not be for you, and will just end up being more work then it is worth, since dom has a solution to this that is already pretty good, and much lighter and flexible then anything jbind is offering at the moment in many respects.</p>
<p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=3a316de8-f793-4c77-8a54-e3e23eb3a72e" /></div>
<a href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F02%2F25%2Fwhy-i-am-on-the-fence-about-jbind%2F&amp;linkname=Why%20I%20am%20on%20the%20fence%20about%20jbind" title="Reddit" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a> <a href="http://www.addtoany.com/add_to/stumbleupon?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F02%2F25%2Fwhy-i-am-on-the-fence-about-jbind%2F&amp;linkname=Why%20I%20am%20on%20the%20fence%20about%20jbind" title="StumbleUpon" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/stumbleupon.png" width="16" height="16" alt="StumbleUpon"/></a> <a href="http://www.addtoany.com/add_to/bebo?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F02%2F25%2Fwhy-i-am-on-the-fence-about-jbind%2F&amp;linkname=Why%20I%20am%20on%20the%20fence%20about%20jbind" title="Bebo" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/bebo.png" width="16" height="16" alt="Bebo"/></a> <a href="http://www.addtoany.com/add_to/yahoo_buzz?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F02%2F25%2Fwhy-i-am-on-the-fence-about-jbind%2F&amp;linkname=Why%20I%20am%20on%20the%20fence%20about%20jbind" title="Yahoo Buzz" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/buzz.png" width="16" height="16" alt="Yahoo Buzz"/></a> <a href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F02%2F25%2Fwhy-i-am-on-the-fence-about-jbind%2F&amp;linkname=Why%20I%20am%20on%20the%20fence%20about%20jbind" title="Delicious" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F02%2F25%2Fwhy-i-am-on-the-fence-about-jbind%2F&amp;linkname=Why%20I%20am%20on%20the%20fence%20about%20jbind" title="Twitter" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/livejournal?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F02%2F25%2Fwhy-i-am-on-the-fence-about-jbind%2F&amp;linkname=Why%20I%20am%20on%20the%20fence%20about%20jbind" title="LiveJournal" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/livejournal.png" width="16" height="16" alt="LiveJournal"/></a> <a href="http://www.addtoany.com/add_to/netlog?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F02%2F25%2Fwhy-i-am-on-the-fence-about-jbind%2F&amp;linkname=Why%20I%20am%20on%20the%20fence%20about%20jbind" title="Netlog" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/netlog.png" width="16" height="16" alt="Netlog"/></a> <a href="http://www.addtoany.com/add_to/hellotxt?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F02%2F25%2Fwhy-i-am-on-the-fence-about-jbind%2F&amp;linkname=Why%20I%20am%20on%20the%20fence%20about%20jbind" title="HelloTxt" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/hellotxt.png" width="16" height="16" alt="HelloTxt"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F02%2F25%2Fwhy-i-am-on-the-fence-about-jbind%2F&amp;linkname=Why%20I%20am%20on%20the%20fence%20about%20jbind"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://mattprokes.com/2009/02/25/why-i-am-on-the-fence-about-jbind/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Extend CSS &amp; Add Custom CSS Configuration To Your Webapp, CSSPlusPlus.js</title>
		<link>http://mattprokes.com/2009/02/08/how-to-extend-css-add-custom-css-configuration-to-your-webapp-cssplusplusjs/</link>
		<comments>http://mattprokes.com/2009/02/08/how-to-extend-css-add-custom-css-configuration-to-your-webapp-cssplusplusjs/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 07:14:26 +0000</pubDate>
		<dc:creator>mprokes</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://webactivex.wordpress.com/2009/02/08/how-to-add-custom-css-configuration-to-your-webapp-cssplusplusjs/</guid>
		<description><![CDATA[For those that do not yet know, I work for internet broadcasting. An awesome company out in st. paul, minnesota. While working on some very large scale webapps, an annoyance came to light. Namely coding in styling directly to your webapplication. Why is this a big no-no? Well when css came out the big great [...]]]></description>
			<content:encoded><![CDATA[<!-- Generated by Digg Digg plugin, 
    Author : Yong Mook Kim
    Website : http://www.mkyong.com/blog/digg-digg-wordpress-plugin/
	--><div style='float:right'><table > <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http%3A%2F%2Fmattprokes.com%2F2009%2F02%2F08%2Fhow-to-extend-css-add-custom-css-configuration-to-your-webapp-cssplusplusjs%2F&amp;t=How+To+Extend+CSS+%26+Add+Custom+CSS+Configuration+To+Your+Webapp%2C+CSSPlusPlus.js&amp;s=normal' height='80' width='52' frameborder='0' scrolling='no'></iframe></td></table></div><p>For those that do not yet know, I work for internet broadcasting. An awesome company out in st. paul, minnesota. While working on some very large scale webapps, an annoyance came to light. Namely coding in styling directly to your webapplication.</p>
<p><span style="text-decoration: underline;">Why is this a big no-no? </span></p>
<p>Well when css came out the big great thing about it is that people had their own language to specify, and seperate look and feel configurations, as well as the ability to take action on specific events like hover. This was a great idea simply because all this data was configuration and NOT code. Also it allowed people like designers to have a single point to go to if they wanted to make a red box green.</p>
<p><strong>CSS was and still is great. So what happened?</strong></p>
<p>DHTML happened. While a great idea dhtml put styling back into code (namely javascript), and css never adapted for this change. Stuff like webanimations started happening and there was no way to put that into css because css isn&#8217;t extensible in that way. So what did we as developers do? Well the only thing we could, we tried to put as much in css, and all the dynamic stuff got crammed into code!</p>
<p>But I have a solution for those of you that work on large scale webapps.</p>
<p><a href="http://www.webactivelabs.com/js/CSSPlusPlus.js"><span style="text-decoration: underline;">Introducing CSSPlusPlus.js!</span></a></p>
<p><strong>What is it?:</strong> <a href="http://www.webactivelabs.com/js/CSSPlusPlus.js">CSSPlusPlus.js</a> allows you to in-a-way extend CSS through custom pseudo classes and property&#8217;s!<br />
- Allowing for you to cram all sorts of configuration information, animation info and styling into one easy to use location. Think spring (sorta) for webapplications.</p>
<p><strong>Ok Enough Talk Lets Roll To A Useful Example.</strong></p>
<p>First you need to go out and get CSSPlusPlus.js, its under the MIT license so no worries.<br />
You can find it here: http://www.webactivelabs.com/js/CSSPlusPlus.js</p>
<p>I know the namespace is pretty generic, feel free to rename it if you need to. Anyway Lets start off by creating a simple webapplication for creating boxes. I will also be using jquery for this example to show a practical use, in animation.</p>
<p>What it would look like:<br />
<a href="http://www.webactivelabs.com/js/cssplusplus/BoxCreator0.html">BoxCreator.html</a><br />
<a href="http://www.webactivelabs.com/js/cssplusplus/BoxCreator0.js">BoxCreator.js</a></p>
<p>Excellent, humm, if we investigate the box creator you will notice that I have coded in an animation height and width to expand out to, as well as some coloring information, and even a error message.</p>
<p>Humm thats alot of domain specific data coded directly in, what if this was a large scale application, how would we find this in the future? Surfing the code? Find? There must be a better way. Well lets start off by taking out all width and height information. For boxes.</p>
<p>What it would look like:<br />
<a href="http://www.webactivelabs.com/js/cssplusplus/BoxCreator1.html">BoxCreator.html</a><br />
<a href="http://www.webactivelabs.com/js/cssplusplus/BoxCreator1.js">BoxCreator.js</a><br />
<em><br />
//Add a pseudo class to listen for!<br />
CSS.addPseudoClassListener(&#8216;boxcreator&#8217;,createBoxStyle);</em></p>
<p><a href="http://www.webactivelabs.com/js/cssplusplus/BoxCreatorConfig0.css.js">BoxCreatorConfig.css.js</a></p>
<p><em>//The CSS parser at work for a custom pseudo-class :boxcreator<br />
CSS.parse(&#8216;.box:boxcreator {height:30px; width:400px; color:purple;}&#8217;);</em></p>
<p>Mmmmm, thats much better, humm.. but we still have some error messages. Lets say that we have a large amount of error messages that we want to keep track of, or we just other configuration data. Humm what if the designers do not like the wording of the messages? Well lets pull those out to, and send the designers the file and go have some coffee.</p>
<p>What it would look like:<br />
<a href="http://www.webactivelabs.com/js/cssplusplus/BoxCreator2.js">BoxCreator.js</a></p>
<p><a href="http://www.webactivelabs.com/js/cssplusplus/BoxCreatorConfig1.css.js">BoxCreatorConfig.css.js</a></p>
<p><em>//Any number of rules can be defined in a single parse.<br />
CSS.parse(<br />
&#8216;.box:boxcreator {height:30px; width:400px; color:purple;amount:5;}&#8217;,<br />
&#8216;*:error{error123:crazy beefy cow!;}&#8217;<br />
);</em></p>
<p>Alright, time to show the company the wonderful box creator that we made, <span style="text-decoration: underline;">lets go out and take a look at it.<br />
</span><br />
<a href="http://www.webactivelabs.com/js/cssplusplus/BoxCreator2.html">BoxCreator.html</a></p>
<p>Thats all there is to it!<br />
<strong><br />
Whats actually happening here?</strong> I am not advocating that you dump all of your css into this tool, though styles that you do not listen for actually flow through the system and get spit out as an inline style tag. The custom css that you are defining is NOT actually real css, its just recognized by a simple glorified css parser that looks for property&#8217;s and pseudo classes. In a way it is similar to a sax parser, only for css instead. There is no magic, more like cloak and dagger.</p>
<p><strong>If its a pseudo class listener:</strong><br />
The entire property&#8217;s list gets turned into json object and sent to the callback, as well as the selector that was defined for that pseudo class.<br />
<strong><br />
If its a property listener:</strong><br />
Just that property gets sent to the callback along with the selector, the rest of the property&#8217;s not being listened on get sent to a inline style tag, as standard css.</p>
<p><strong>The Good:</strong><br />
Its just a glorified parser, but the designers won&#8217;t know the difference, and its efficient (I am all for tricking designers). Infact if you define custom css and do not listen for it, then it will flow through the system and get spit out in the style tags and the browser simply won&#8217;t do anything with that css. Many of you will say whats the point of this, I can create property files right now as a json object.</p>
<p>Yet that will require designers to learn a new language, as well as possibly breaking your app by coding native js. Also the syntax and the readability of this method is superior to that of a json property file in the context of applying a custom css action. Lastly, the pseudo class can be used on any selector, its not a one shot deal.</p>
<p>Example:<br />
#button1:fadeButton {fade-to:green;}<br />
#button2:fadeButton {fade-to:red;}</p>
<p>This method could also be used to fix things like hover, without hacking like crazy. Its in javascript.. but if you are designing a webapp, then that webapp is in javascript anyway. Plus you can be sure you won&#8217;t need to find the next greatest css hack when vendors decided to release the next greatest and latest. I advocate coding as much as you feel certain will be supported now, and in the future in css. Then maybe keeping your life simple, and using the parser for the rest <img src='http://mattprokes.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</p>
<p><strong>The Bad:</strong><br />
There is a very small amount of parsing happening, I emphasize small. If you compare the amount of processing used for this method of specifying property&#8217;s; I would compare it to 1/1000th of the processing required to cause a animation to happen in the browser, and it only happens once. For those of you that are speed demons, and have to squeeze every last bit of performance out of your code then this might not be the solution for you. But in my case its a perfect fit. Secondly,</p>
<p>I wouldn&#8217;t on a regular basis define standard css through this interface unless you know what you are doing, or the definitions are placed in the document head. The reasoning is that your styling won&#8217;t be placed in the document until the script loads keep in mind. So IF you place your script tag AFTER your html structure, you will see the action of the standard css being applied to that structure once the js is loaded, which again is AFTER the html structure is displayed.</p>
<p>Anyway, use it at your own discretion, and have fun.</p>
<p>Your Friendly Developer,<br />
~Matt Prokes</p>
<a href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F02%2F08%2Fhow-to-extend-css-add-custom-css-configuration-to-your-webapp-cssplusplusjs%2F&amp;linkname=How%20To%20Extend%20CSS%20%26%23038%3B%20Add%20Custom%20CSS%20Configuration%20To%20Your%20Webapp%2C%20CSSPlusPlus.js" title="Reddit" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a> <a href="http://www.addtoany.com/add_to/stumbleupon?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F02%2F08%2Fhow-to-extend-css-add-custom-css-configuration-to-your-webapp-cssplusplusjs%2F&amp;linkname=How%20To%20Extend%20CSS%20%26%23038%3B%20Add%20Custom%20CSS%20Configuration%20To%20Your%20Webapp%2C%20CSSPlusPlus.js" title="StumbleUpon" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/stumbleupon.png" width="16" height="16" alt="StumbleUpon"/></a> <a href="http://www.addtoany.com/add_to/bebo?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F02%2F08%2Fhow-to-extend-css-add-custom-css-configuration-to-your-webapp-cssplusplusjs%2F&amp;linkname=How%20To%20Extend%20CSS%20%26%23038%3B%20Add%20Custom%20CSS%20Configuration%20To%20Your%20Webapp%2C%20CSSPlusPlus.js" title="Bebo" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/bebo.png" width="16" height="16" alt="Bebo"/></a> <a href="http://www.addtoany.com/add_to/yahoo_buzz?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F02%2F08%2Fhow-to-extend-css-add-custom-css-configuration-to-your-webapp-cssplusplusjs%2F&amp;linkname=How%20To%20Extend%20CSS%20%26%23038%3B%20Add%20Custom%20CSS%20Configuration%20To%20Your%20Webapp%2C%20CSSPlusPlus.js" title="Yahoo Buzz" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/buzz.png" width="16" height="16" alt="Yahoo Buzz"/></a> <a href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F02%2F08%2Fhow-to-extend-css-add-custom-css-configuration-to-your-webapp-cssplusplusjs%2F&amp;linkname=How%20To%20Extend%20CSS%20%26%23038%3B%20Add%20Custom%20CSS%20Configuration%20To%20Your%20Webapp%2C%20CSSPlusPlus.js" title="Delicious" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F02%2F08%2Fhow-to-extend-css-add-custom-css-configuration-to-your-webapp-cssplusplusjs%2F&amp;linkname=How%20To%20Extend%20CSS%20%26%23038%3B%20Add%20Custom%20CSS%20Configuration%20To%20Your%20Webapp%2C%20CSSPlusPlus.js" title="Twitter" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/livejournal?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F02%2F08%2Fhow-to-extend-css-add-custom-css-configuration-to-your-webapp-cssplusplusjs%2F&amp;linkname=How%20To%20Extend%20CSS%20%26%23038%3B%20Add%20Custom%20CSS%20Configuration%20To%20Your%20Webapp%2C%20CSSPlusPlus.js" title="LiveJournal" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/livejournal.png" width="16" height="16" alt="LiveJournal"/></a> <a href="http://www.addtoany.com/add_to/netlog?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F02%2F08%2Fhow-to-extend-css-add-custom-css-configuration-to-your-webapp-cssplusplusjs%2F&amp;linkname=How%20To%20Extend%20CSS%20%26%23038%3B%20Add%20Custom%20CSS%20Configuration%20To%20Your%20Webapp%2C%20CSSPlusPlus.js" title="Netlog" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/netlog.png" width="16" height="16" alt="Netlog"/></a> <a href="http://www.addtoany.com/add_to/hellotxt?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F02%2F08%2Fhow-to-extend-css-add-custom-css-configuration-to-your-webapp-cssplusplusjs%2F&amp;linkname=How%20To%20Extend%20CSS%20%26%23038%3B%20Add%20Custom%20CSS%20Configuration%20To%20Your%20Webapp%2C%20CSSPlusPlus.js" title="HelloTxt" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/hellotxt.png" width="16" height="16" alt="HelloTxt"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fmattprokes.com%2F2009%2F02%2F08%2Fhow-to-extend-css-add-custom-css-configuration-to-your-webapp-cssplusplusjs%2F&amp;linkname=How%20To%20Extend%20CSS%20%26%23038%3B%20Add%20Custom%20CSS%20Configuration%20To%20Your%20Webapp%2C%20CSSPlusPlus.js"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://mattprokes.com/2009/02/08/how-to-extend-css-add-custom-css-configuration-to-your-webapp-cssplusplusjs/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Fully Working Javascript First Class Interfaces Are Possible!</title>
		<link>http://mattprokes.com/2008/11/17/fully-working-javascript-first-class-interfaces-are-possible/</link>
		<comments>http://mattprokes.com/2008/11/17/fully-working-javascript-first-class-interfaces-are-possible/#comments</comments>
		<pubDate>Mon, 17 Nov 2008 09:19:06 +0000</pubDate>
		<dc:creator>mprokes</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://webactivex.wordpress.com/2008/11/17/fully-working-javascript-first-class-interfaces-are-possible/</guid>
		<description><![CDATA[So today I am reading through this book pro-javascript design patterns, excellent book by the way! I had come upon chapter 2, which was an excellent explanation of interfaces. One thing that concerned myself is that the book states that it is impossible to create enforceable interfaces in javascript. I pondered that for a bit, [...]]]></description>
			<content:encoded><![CDATA[<!-- Generated by Digg Digg plugin, 
    Author : Yong Mook Kim
    Website : http://www.mkyong.com/blog/digg-digg-wordpress-plugin/
	--><div style='float:right'><table > <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http%3A%2F%2Fmattprokes.com%2F2008%2F11%2F17%2Ffully-working-javascript-first-class-interfaces-are-possible%2F&amp;t=Fully+Working+Javascript+First+Class+Interfaces+Are+Possible%21&amp;s=normal' height='80' width='52' frameborder='0' scrolling='no'></iframe></td></table></div><p>So today I am reading through this book pro-javascript design patterns, excellent book by the way! I had come upon chapter 2, which was an excellent explanation of interfaces. One thing that concerned myself is that the book states that it is impossible to create enforceable interfaces in javascript. I pondered that for a bit, as far as what interfaces really are. If you look at interfaces from the perspective of java, then for the most part they are types, with a specified subset of methods for a class instance.</p>
<p>Thinking in those terms, I sat back and pondered the problem again, sooo all I need to do really to create interfaces that are enforceable in javascript would be to separate the concept of an interface from a class all together and make it a class its self! WALA! True first class interfaces in javascript!</p>
<p><a href="http://www.webactivelabs.com/js/JS-Interface/interfaceexample.jpeg" target="_blank">UML Diagram</a></p>
<p>So lets see what this new found idea looks like! Here is my interface class that makes it all work.</p>
<p><a href="http://www.webactivelabs.com/js/JS-Interface/Interface.js" target="_blank">Interface.js</a></p>
<p>You can think of interface as linking everything together, but what would a TestInterface look like?</p>
<p><a href="http://www.webactivelabs.com/js/JS-Interface/TestInterface.js" target="_blank">TestInterface.js</a></p>
<p>Take note, that the interface its self is already implementing Interface.js in a sort-of way! There are two required methods getInterfaceName() and setUpInterface() that need to be implemented otherwise Interface.js will complain loudly!</p>
<p>The basic idea here is that setUpInterface recieves a closure, that is able to access the implementing object, all the TestInterface needs to do is call that method with the same attributes it recieves. It does this by passing in the name of the method into the closure, and then executing the returned function with the same attributes recieved by the method; and return it, SIMPLE!</p>
<p>You can see this happening here:</p>
<p><em>return inspector(&#8216;testMethod&#8217;)(x,y,z);</em></p>
<p>So now that we have an interface for our class, what does a javascript class have to do to implement this interface?</p>
<p><a href="http://www.webactivelabs.com/js/JS-Interface/TestObject.js" target="_blank">TestObject.js</a></p>
<p>The actual implementation of the interface happens here: new Interface(this, new TestInterface());<br />
Wow! thats easy! But what happens when the class doesn&#8217;t implement all the methods as this one does?</p>
<p>Well lets find out, if you could place all these scripts in a javascript shell, lets test out a few things.</p>
<p><em>//Create a new TestObject();<br />
TestThis = new TestObject();<br />
</em></p>
<p><em>//Lets cast our object to a type of &#8216;TestInterface&#8217;<br />
CastedTestInterface = TestThis.cast(&#8216;TestInterface&#8217;);</em></p>
<p>Don&#8217;t take my word for it, here is a <a href="http://www.webactivelabs.com/js/JS-Interface/index.html" target="_blank">FULL WORKING EXAMPLE!</a></p>
<p>Now if you inspect CastedTestInterface you may notice that it is just an instance of the interface you created! Keep in mind though that it also holds a closure to the object it was casted from.</p>
<p>Lets try executing a method:</p>
<p><em>CastedTestInterface.testMethod(1,2,3);</em></p>
<p>Whoa! it worked!<br />
Lets try executing another method specified by the interface:</p>
<p><em>CastedTestInterface.testMethod2(1,2,3);</em></p>
<p>Opps, we get an error because this method does not exist! We better fix that, humm but this means that the interface is working!</p>
<p>Long story short, if a method you call from a cast is missing from the object; you will be alerted when you call the method, an error will be thrown, and you scolded for doing such a horrible thing! To be honest, this method is 1/2 of an abstracted class and 1/2 of an interface, an {interstraction}?!?!</p>
<p>This is because most interfaces specify that they can not have implementation details in them, but ours do. On the other hand this is not a abstracted class! Because abstracted classes are extensions of the original, when clearly this type of OOP not an extension, but a subset. Hope you enjoyed the tutorial on how to create interfaces <img src='http://mattprokes.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</p>
<a href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fmattprokes.com%2F2008%2F11%2F17%2Ffully-working-javascript-first-class-interfaces-are-possible%2F&amp;linkname=Fully%20Working%20Javascript%20First%20Class%20Interfaces%20Are%20Possible%21" title="Reddit" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a> <a href="http://www.addtoany.com/add_to/stumbleupon?linkurl=http%3A%2F%2Fmattprokes.com%2F2008%2F11%2F17%2Ffully-working-javascript-first-class-interfaces-are-possible%2F&amp;linkname=Fully%20Working%20Javascript%20First%20Class%20Interfaces%20Are%20Possible%21" title="StumbleUpon" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/stumbleupon.png" width="16" height="16" alt="StumbleUpon"/></a> <a href="http://www.addtoany.com/add_to/bebo?linkurl=http%3A%2F%2Fmattprokes.com%2F2008%2F11%2F17%2Ffully-working-javascript-first-class-interfaces-are-possible%2F&amp;linkname=Fully%20Working%20Javascript%20First%20Class%20Interfaces%20Are%20Possible%21" title="Bebo" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/bebo.png" width="16" height="16" alt="Bebo"/></a> <a href="http://www.addtoany.com/add_to/yahoo_buzz?linkurl=http%3A%2F%2Fmattprokes.com%2F2008%2F11%2F17%2Ffully-working-javascript-first-class-interfaces-are-possible%2F&amp;linkname=Fully%20Working%20Javascript%20First%20Class%20Interfaces%20Are%20Possible%21" title="Yahoo Buzz" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/buzz.png" width="16" height="16" alt="Yahoo Buzz"/></a> <a href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fmattprokes.com%2F2008%2F11%2F17%2Ffully-working-javascript-first-class-interfaces-are-possible%2F&amp;linkname=Fully%20Working%20Javascript%20First%20Class%20Interfaces%20Are%20Possible%21" title="Delicious" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fmattprokes.com%2F2008%2F11%2F17%2Ffully-working-javascript-first-class-interfaces-are-possible%2F&amp;linkname=Fully%20Working%20Javascript%20First%20Class%20Interfaces%20Are%20Possible%21" title="Twitter" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/livejournal?linkurl=http%3A%2F%2Fmattprokes.com%2F2008%2F11%2F17%2Ffully-working-javascript-first-class-interfaces-are-possible%2F&amp;linkname=Fully%20Working%20Javascript%20First%20Class%20Interfaces%20Are%20Possible%21" title="LiveJournal" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/livejournal.png" width="16" height="16" alt="LiveJournal"/></a> <a href="http://www.addtoany.com/add_to/netlog?linkurl=http%3A%2F%2Fmattprokes.com%2F2008%2F11%2F17%2Ffully-working-javascript-first-class-interfaces-are-possible%2F&amp;linkname=Fully%20Working%20Javascript%20First%20Class%20Interfaces%20Are%20Possible%21" title="Netlog" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/netlog.png" width="16" height="16" alt="Netlog"/></a> <a href="http://www.addtoany.com/add_to/hellotxt?linkurl=http%3A%2F%2Fmattprokes.com%2F2008%2F11%2F17%2Ffully-working-javascript-first-class-interfaces-are-possible%2F&amp;linkname=Fully%20Working%20Javascript%20First%20Class%20Interfaces%20Are%20Possible%21" title="HelloTxt" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/hellotxt.png" width="16" height="16" alt="HelloTxt"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fmattprokes.com%2F2008%2F11%2F17%2Ffully-working-javascript-first-class-interfaces-are-possible%2F&amp;linkname=Fully%20Working%20Javascript%20First%20Class%20Interfaces%20Are%20Possible%21"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://mattprokes.com/2008/11/17/fully-working-javascript-first-class-interfaces-are-possible/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Javascript, Rules For The Road Ahead</title>
		<link>http://mattprokes.com/2008/11/12/javascript-rules-for-the-road-ahead/</link>
		<comments>http://mattprokes.com/2008/11/12/javascript-rules-for-the-road-ahead/#comments</comments>
		<pubDate>Wed, 12 Nov 2008 13:00:07 +0000</pubDate>
		<dc:creator>mprokes</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://webactivex.wordpress.com/2008/11/12/comments-reserved-words-numbers-and-strings/</guid>
		<description><![CDATA[Commenting Your CodeComments will always be an important part of programming; they are often used to describe whats going on in your code, and even for automatically generating documentation. There are two styles of comments: //Single Line /*MultiLine*/ Some issues with multi-line comments: Since multi-line comments end with */ this means that you may never [...]]]></description>
			<content:encoded><![CDATA[<!-- Generated by Digg Digg plugin, 
    Author : Yong Mook Kim
    Website : http://www.mkyong.com/blog/digg-digg-wordpress-plugin/
	--><div style='float:right'><table > <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http%3A%2F%2Fmattprokes.com%2F2008%2F11%2F12%2Fjavascript-rules-for-the-road-ahead%2F&amp;t=Javascript%2C+Rules+For+The+Road+Ahead&amp;s=normal' height='80' width='52' frameborder='0' scrolling='no'></iframe></td></table></div><p><b><big>Commenting Your Code<br /></big></b>Comments will always be an important part of programming; they are often used to describe whats going on in your code, and even for automatically generating documentation.</p>
<p><u>There are two styles of comments:</u>
<ul>
<li>//Single Line</p>
</li>
<li>/*<br />Multi<br />Line<br />*/</li>
</ul>
<p><u>Some issues with multi-line comments:</u></p>
<p>Since multi-line comments end with */ this means that you may never include a */ within the body of the comment.</p>
<p><a target="_blank" href="http://www.webactivelabs.com/js/MultiLine_Comment_Error.html">example:</a>
<pre>/*An error is caused when I use a */ as you can see.*/</pre>
<p><b><big><big>Reserved Words<br /></big></big></b>Reserved Words are used by the javascript programming language to identify programming structures, and execute instructions based on those structures.<b><big><big><br /><u><br /></u></big></big></b><u>There are 59 reserved words identified by the language as follows:</p>
<p></u>abstract, boolean, break, byte, case, catch, char, class, const, continue, debugger, default, delete, do, double, else, enum, export, extends, false, final, finally, float, for, function, goto, if, implements, import, in, instanceof, int, interface, long, native, new, null, package, private, protected, public, return, short, static, super, switch, synchronized, this, throw, throws, transient, true, try, typeof, var, volatile, void, while, with</p>
<p>I am also including (undefined, NaN, and Infinity) as being reserved, though they serve a different purpose of describing data rather than structure.<br /><u><br />Some Notes On Reserved Words:<br /></u>
<ul>
<li>Not all reserved words are used by the langauge, so you will only need to memorize the functionality of a small subset.</li>
<li>Do not use reserved words to name object literals, properties, variables, parameters, or any other programming structure for that matter.</li>
</ul>
<p><big><big><b>Numbers</b></big></big><br />Numerical values are and will continue to be used throughout your development career. Thus I suggest that you become familiar with the properties of javascript numerical values.</p>
<p><u>Numbers Are:</u>
<ul>
<li>Wrapped up as objects when inspection is required, but are treated as primitives!</li>
<li>64bit</li>
<li>Represented by a single object type (meaning an integer value of 1 is also 1.0 and a boolean value of true).</li>
<li>Covers classic number types such as int, float, boolean, double, and long</li>
</ul>
<p><u>Integers</u> are represented by a numerical value, but are not followed by a decimal place.
<ul>
<li>123</li>
</ul>
<p><u>Decimals</u> are represented by numerical values containing a decimal place.
<ul>
<li>123.456</li>
</ul>
<p><u>Exponents</u> are represented by a numerical value followed by an e and a positive or negative decimal placing.
<ul>
<li>123e-3 (represents .123)</li>
</ul>
<p><u>Negative</u> numbers are represented with a &#8211; followed by a numerical value.
<ul>
<li>-123</li>
</ul>
<p><u>Infinity</u> is represented by numbers greater than 1.79769313486231570e+308</p>
<p><b><big><big><big>Strings</big></big></big></b><br />Strings represent data specifying a set of characters. Strings are also the most commonly used data for most languages. Javascript is no exception, whether creating javascript object literals or validating form data you will find that strings pose an important role in your programming career. Strings are objects and contain important functions for manipulation and objects details.</p>
<p>Strings can be specified through two methods:
<ul>
<li>&#8220;This is a string!&#8221;</li>
<li>&#8216;This is a string!&#8217;</li>
</ul>
<p><u>Why two ways of writing strings?</u><br />This is because at the time javascript was created, it was not an uncommon perception that it may be integrated tightly with html. So if you have a tag that uses an onclick=&#8221;alert(&#8220;oops&#8221;)&#8221; this would escape the parameter before needed. This may be rectified&nbsp; by escaping the quotes using \&#8221; but it is often more easy to just use a single &#8216; as seen here onclick=&#8221;alert(&#8216;yeey&#8217;)&#8221;. The duality of quoting often cancles its self out very nicely, so as to not impede programming.</p>
<p>Some other notes about strings:
<ul>
<li>Strings are immutable</li>
<li>Concatination is done with a + operator (ex: &#8220;hello &#8220;+&#8221;my &#8220;+&#8221;name &#8220;+&#8221;is &#8220;+&#8221;matt &#8220;)</li>
<li>Strings are objects</li>
<li>You may escape something within a string using a \ (ex &#8220;I want to see a \\ or a \&#8221; &#8220;)</li>
</ul>
<a href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fmattprokes.com%2F2008%2F11%2F12%2Fjavascript-rules-for-the-road-ahead%2F&amp;linkname=Javascript%2C%20Rules%20For%20The%20Road%20Ahead" title="Reddit" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a> <a href="http://www.addtoany.com/add_to/stumbleupon?linkurl=http%3A%2F%2Fmattprokes.com%2F2008%2F11%2F12%2Fjavascript-rules-for-the-road-ahead%2F&amp;linkname=Javascript%2C%20Rules%20For%20The%20Road%20Ahead" title="StumbleUpon" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/stumbleupon.png" width="16" height="16" alt="StumbleUpon"/></a> <a href="http://www.addtoany.com/add_to/bebo?linkurl=http%3A%2F%2Fmattprokes.com%2F2008%2F11%2F12%2Fjavascript-rules-for-the-road-ahead%2F&amp;linkname=Javascript%2C%20Rules%20For%20The%20Road%20Ahead" title="Bebo" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/bebo.png" width="16" height="16" alt="Bebo"/></a> <a href="http://www.addtoany.com/add_to/yahoo_buzz?linkurl=http%3A%2F%2Fmattprokes.com%2F2008%2F11%2F12%2Fjavascript-rules-for-the-road-ahead%2F&amp;linkname=Javascript%2C%20Rules%20For%20The%20Road%20Ahead" title="Yahoo Buzz" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/buzz.png" width="16" height="16" alt="Yahoo Buzz"/></a> <a href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fmattprokes.com%2F2008%2F11%2F12%2Fjavascript-rules-for-the-road-ahead%2F&amp;linkname=Javascript%2C%20Rules%20For%20The%20Road%20Ahead" title="Delicious" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fmattprokes.com%2F2008%2F11%2F12%2Fjavascript-rules-for-the-road-ahead%2F&amp;linkname=Javascript%2C%20Rules%20For%20The%20Road%20Ahead" title="Twitter" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/livejournal?linkurl=http%3A%2F%2Fmattprokes.com%2F2008%2F11%2F12%2Fjavascript-rules-for-the-road-ahead%2F&amp;linkname=Javascript%2C%20Rules%20For%20The%20Road%20Ahead" title="LiveJournal" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/livejournal.png" width="16" height="16" alt="LiveJournal"/></a> <a href="http://www.addtoany.com/add_to/netlog?linkurl=http%3A%2F%2Fmattprokes.com%2F2008%2F11%2F12%2Fjavascript-rules-for-the-road-ahead%2F&amp;linkname=Javascript%2C%20Rules%20For%20The%20Road%20Ahead" title="Netlog" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/netlog.png" width="16" height="16" alt="Netlog"/></a> <a href="http://www.addtoany.com/add_to/hellotxt?linkurl=http%3A%2F%2Fmattprokes.com%2F2008%2F11%2F12%2Fjavascript-rules-for-the-road-ahead%2F&amp;linkname=Javascript%2C%20Rules%20For%20The%20Road%20Ahead" title="HelloTxt" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/hellotxt.png" width="16" height="16" alt="HelloTxt"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fmattprokes.com%2F2008%2F11%2F12%2Fjavascript-rules-for-the-road-ahead%2F&amp;linkname=Javascript%2C%20Rules%20For%20The%20Road%20Ahead"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://mattprokes.com/2008/11/12/javascript-rules-for-the-road-ahead/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript</title>
		<link>http://mattprokes.com/2008/11/12/javascript/</link>
		<comments>http://mattprokes.com/2008/11/12/javascript/#comments</comments>
		<pubDate>Wed, 12 Nov 2008 12:15:09 +0000</pubDate>
		<dc:creator>mprokes</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://webactivex.wordpress.com/2008/11/12/javascript/</guid>
		<description><![CDATA[Javascript, the worlds most popular programming language is also the worlds most mis-understood language. The purpose behind these posts is to clear up somewhat the facilities of javascript, and make clear what this powerful language has to offer. I plan on providing clear examples, with no fluff. Enjoy.]]></description>
			<content:encoded><![CDATA[<!-- Generated by Digg Digg plugin, 
    Author : Yong Mook Kim
    Website : http://www.mkyong.com/blog/digg-digg-wordpress-plugin/
	--><div style='float:right'><table > <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http%3A%2F%2Fmattprokes.com%2F2008%2F11%2F12%2Fjavascript%2F&amp;t=Javascript&amp;s=normal' height='80' width='52' frameborder='0' scrolling='no'></iframe></td></table></div><p>Javascript, the worlds most popular programming language is also the worlds most mis-understood language. The purpose behind these posts is to clear up somewhat the facilities of javascript, and make clear what this powerful language has to offer. I plan on providing clear examples, with no fluff. Enjoy.</p>
<a href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fmattprokes.com%2F2008%2F11%2F12%2Fjavascript%2F&amp;linkname=Javascript" title="Reddit" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a> <a href="http://www.addtoany.com/add_to/stumbleupon?linkurl=http%3A%2F%2Fmattprokes.com%2F2008%2F11%2F12%2Fjavascript%2F&amp;linkname=Javascript" title="StumbleUpon" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/stumbleupon.png" width="16" height="16" alt="StumbleUpon"/></a> <a href="http://www.addtoany.com/add_to/bebo?linkurl=http%3A%2F%2Fmattprokes.com%2F2008%2F11%2F12%2Fjavascript%2F&amp;linkname=Javascript" title="Bebo" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/bebo.png" width="16" height="16" alt="Bebo"/></a> <a href="http://www.addtoany.com/add_to/yahoo_buzz?linkurl=http%3A%2F%2Fmattprokes.com%2F2008%2F11%2F12%2Fjavascript%2F&amp;linkname=Javascript" title="Yahoo Buzz" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/buzz.png" width="16" height="16" alt="Yahoo Buzz"/></a> <a href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fmattprokes.com%2F2008%2F11%2F12%2Fjavascript%2F&amp;linkname=Javascript" title="Delicious" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fmattprokes.com%2F2008%2F11%2F12%2Fjavascript%2F&amp;linkname=Javascript" title="Twitter" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/livejournal?linkurl=http%3A%2F%2Fmattprokes.com%2F2008%2F11%2F12%2Fjavascript%2F&amp;linkname=Javascript" title="LiveJournal" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/livejournal.png" width="16" height="16" alt="LiveJournal"/></a> <a href="http://www.addtoany.com/add_to/netlog?linkurl=http%3A%2F%2Fmattprokes.com%2F2008%2F11%2F12%2Fjavascript%2F&amp;linkname=Javascript" title="Netlog" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/netlog.png" width="16" height="16" alt="Netlog"/></a> <a href="http://www.addtoany.com/add_to/hellotxt?linkurl=http%3A%2F%2Fmattprokes.com%2F2008%2F11%2F12%2Fjavascript%2F&amp;linkname=Javascript" title="HelloTxt" rel="nofollow" target="_blank"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/icons/hellotxt.png" width="16" height="16" alt="HelloTxt"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fmattprokes.com%2F2008%2F11%2F12%2Fjavascript%2F&amp;linkname=Javascript"><img src="http://mattprokes.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://mattprokes.com/2008/11/12/javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.476 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-09-08 16:27:48 -->
