<?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>Abakia Project</title>
	<atom:link href="http://www.abakia.de/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.abakia.de/blog</link>
	<description>Projects &#38; Geekculture</description>
	<lastBuildDate>Wed, 05 May 2010 21:31:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>HTML5 Article for Gameslabor.de</title>
		<link>http://www.abakia.de/blog/2010/05/05/html5-article-for-gameslabor-de/</link>
		<comments>http://www.abakia.de/blog/2010/05/05/html5-article-for-gameslabor-de/#comments</comments>
		<pubDate>Wed, 05 May 2010 21:31:09 +0000</pubDate>
		<dc:creator>Dennis Wilson</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Link tips]]></category>
		<category><![CDATA[Longer articles]]></category>

		<guid isPermaLink="false">http://www.abakia.de/blog/?p=413</guid>
		<description><![CDATA[Uha, I nearly forgot that. I wrote an article on HTML5 technologies in games development for the Gameslabor. This time, it is written in german language, so I&#8217;m sorry for the international audience.
Just have a look at Gameslabor: Warum HTML5 auch für Games interessant ist.
]]></description>
			<content:encoded><![CDATA[<p>Uha, I nearly forgot that. I wrote an article on HTML5 technologies in games development for the <a href="http://www.gameslabor.de/" target="_blank">Gameslabor</a>. This time, it is written in german language, so I&#8217;m sorry for the international audience.</p>
<p>Just have a look at <a href="http://gameslabor.de/machsdirselbst/1408-warum-html5-auch-fur-games-interessant-ist" target="_blank">Gameslabor: Warum HTML5 auch für Games interessant ist</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.abakia.de/blog/2010/05/05/html5-article-for-gameslabor-de/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Can i haz oldschool, plz?</title>
		<link>http://www.abakia.de/blog/2010/03/23/can-i-haz-oldschool-plz/</link>
		<comments>http://www.abakia.de/blog/2010/03/23/can-i-haz-oldschool-plz/#comments</comments>
		<pubDate>Tue, 23 Mar 2010 14:25:52 +0000</pubDate>
		<dc:creator>Dennis Wilson</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Showcase]]></category>

		<guid isPermaLink="false">http://www.abakia.de/blog/?p=402</guid>
		<description><![CDATA[Do you like oldschool effects? Well, yes I do! Therefore I had a late night coding session yesterday. I had some fun with canvas and pseudo 3d vectors. 



For those of you who&#8217;ve been grown up in the scene&#8217;s golden days the output may seem pretty default. Even for the newer graphics dev generation, this [...]]]></description>
			<content:encoded><![CDATA[<p>Do you like oldschool effects? Well, yes I do! Therefore I had a late night coding session yesterday. I had <a href="http://www.abakia.de/labs/canvas_cube.html" target="_blank">some fun with canvas and pseudo 3d vectors</a>. </p>
<p><center><br />
<a href="http://www.abakia.de/labs/canvas_cube.html" target="_blank"><img src="http://www.abakia.de/blog/wp-content/uploads/2010/03/cihop.png" alt="cihop" title="cihop" width="430" height="466" class="aligncenter size-full wp-image-403" /></a><br />
</center></p>
<p>For those of you who&#8217;ve been grown up in the scene&#8217;s golden days the output may seem pretty default. Even for the newer graphics dev generation, this might be nothing ground shaking at all. But since I&#8217;ve noticed, that there are a lot web expriments on the net, which are about to use pseudo 3d and rotations, but are unable to spinning around more than one axis at a time, this shall be my contribution to you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.abakia.de/blog/2010/03/23/can-i-haz-oldschool-plz/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Linktip Monday #3</title>
		<link>http://www.abakia.de/blog/2010/03/22/linktip-monday-3/</link>
		<comments>http://www.abakia.de/blog/2010/03/22/linktip-monday-3/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 20:46:46 +0000</pubDate>
		<dc:creator>Dennis Wilson</dc:creator>
				<category><![CDATA[Link tips]]></category>

		<guid isPermaLink="false">http://www.abakia.de/blog/?p=399</guid>
		<description><![CDATA[
Neo Axis &#8211; &#8220;NeoAxis Game Engine is an all-purpose, modern 3D graphics engine for 3D simulations, visualizations and games.&#8221; And guess what? Yet another engine candidate with multiplatform abilities and web deployment capability.
Eaze Tween &#8211; Tweening library for Action Script providing a jQuery like chained syntax scheme.
Dan Mumford &#8211; Awesome works made by Dan Mumford, [...]]]></description>
			<content:encoded><![CDATA[<ul>
<li><a href="http://www.neoaxisgroup.com/" taget="_blank">Neo Axis</a> &#8211; &#8220;NeoAxis Game Engine is an all-purpose, modern 3D graphics engine for 3D simulations, visualizations and games.&#8221; And guess what? Yet another engine candidate with multiplatform abilities and web deployment capability.</li>
<li><a href="http://code.google.com/p/eaze-tween/" target="_blank">Eaze Tween</a> &#8211; Tweening library for Action Script providing a <a href="http://jquery.com/" target="_blank">jQuery</a> like chained syntax scheme.</li>
<li><a href="http://www.dan-mumford.com/" target="_blank">Dan Mumford</a> &#8211; Awesome works made by Dan Mumford, London. This guy is responsible for a lot of illustrations for CD covers and merch of several well known hardcore &#038; metalcore bands.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.abakia.de/blog/2010/03/22/linktip-monday-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What&#8217;s different with JavaScript OOP?</title>
		<link>http://www.abakia.de/blog/2010/03/16/whats-different-with-javascript-oop/</link>
		<comments>http://www.abakia.de/blog/2010/03/16/whats-different-with-javascript-oop/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 23:06:57 +0000</pubDate>
		<dc:creator>Dennis Wilson</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Longer articles]]></category>

		<guid isPermaLink="false">http://www.abakia.de/blog/?p=384</guid>
		<description><![CDATA[Since the JavaScript fever hit me, I&#8217;m very busy at this topic. Especially I&#8217;m very busy with developing a JavaScript Canvas application. I would really love to write more about the app and give some snapshots, but because it isn&#8217;t finished yet, you&#8217;ll have to wait a bit more longer for the project to turn [...]]]></description>
			<content:encoded><![CDATA[<p>Since the JavaScript fever hit me, I&#8217;m very busy at this topic. Especially I&#8217;m very busy with developing a <a href="https://developer.mozilla.org/en/Drawing_Graphics_with_Canvas" target="_blank">JavaScript Canvas</a> application. I would really love to write more about the app and give some snapshots, but because it isn&#8217;t finished yet, you&#8217;ll have to wait a bit more longer for the project to turn public.</p>
<p>Never the less I would like to share some experiences concerning object orientation in JavaScript. Many of you may remember JavaScript as the technology which enhanced HTMLs abilities to the worst. Responsible for pop-ups, evil cookies with a touch of annoying procedural syntax. You better forget about that quickly. JavaScript has become a quite powerful language, not only when it is about client side development. And only because <strong>many developers are still excellently ignoring the languages possibilities in case of object oriented programming</strong> doesn&#8217;t mean, that there aren&#8217;t any.</p>
<p><strong>JavaScript is using so called <a target="_blank" href="http://en.wikipedia.org/wiki/Prototype_pattern">prototyping for it&#8217;s object instantiation</a></strong>. Yes, using object orientation might be several times slower than just writing procedural code. But as history has proven, there are many good reasons for object oriented code design. Have a look at the following example code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
</pre></td><td class="code"><pre class="javascript">MyProject <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
MyProject.<span style="color: #006600;">Foo</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">initialize</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">this</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
MyProject.<span style="color: #006600;">Foo</span>.<span style="color: #006600;">prototype</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #006600; font-style: italic;">// called by constructor</span>
	initialize <span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	   <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">message</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'foobar!'</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
&nbsp;
        <span style="color: #006600; font-style: italic;">// instance method</span>
	bar <span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">message</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// main</span>
<span style="color: #003366; font-weight: bold;">var</span> obj <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> MyProject.<span style="color: #006600;">Foo</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
obj.<span style="color: #006600;">bar</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>There are some other possibilities for writing the object code. I did choose this one over the others, because it&#8217;s <strong>compact, clean and probably the best performing way</strong>. If you are familiar with other languages using the object oriented programming paradigm, you might have recognized some differences. The code doesn&#8217;t seem to have a classic class declaration syntax. Instead of this <strong>the code has been split up into three important parts</strong>. The line <strong>MyProject = {};</strong> isn&#8217;t really necessary but very helpful to keep track of your classes when a project grows bigger. <strong>It&#8217;s the <a href="http://de.wikipedia.org/wiki/Do_it_yourself" target="_blank">DIY</a> way of creating a namespace alike structure</strong>. The empty curly braces are JavaScript specific syntax for creating empty objects. It&#8217;s the simplies way to create objects or dictionary data scructures. JavaScript as well as ActionScript (<a href="http://en.wikipedia.org/wiki/ECMAScript" target="_blank">ECMA Hooray!</a>) doesn&#8217;t differentiate at that point, because JavaScript doesn&#8217;t depend on static types. That enables you to <strong>link every type of language element into the pseudo-namespace at every time</strong>. That&#8217;s exactly what&#8217;s happening in line 3: <strong>MyProject.Foo = function() {&#8230;}</strong>.</p>
<p>These lines simple create an attribute or the object represented by the <strong>MyProject</strong> variable, actually behaving as Namespace. The Value of <strong>MyProject.Foo</strong> will be a function, which only job it is to call the <strong>this.initialize()</strong> method. Speaking of object oriented theory, this is the object construtor. It&#8217;s just calling an initialization method and returning itself to the caller. Yes, <strong>exactly</strong> itself. Therefore we need to combine the call of <strong>MyProject.Foo()</strong> with the <strong>new</strong> statement in front of it. That creates a new copy of any given object, as you can see in line 21.</p>
<p><strong>Lines 8 to 18 are containing the prototype implementations of the MyProject.Foo class</strong>. Watch out for the leading <strong>this.</strong> in front of every access to functions or variables of the current instance. Unlike Java or ActionScript for example, JavaScript doesn&#8217;t auto detect the function of variable scope by itself. Every call without scope declaration, will be executed within the current function scope. </p>
<p>Phew, pretty much to handle yet. As you can see, there are a lot differences between object orientation as we know it by languages like Java, Ruby or C++ and JavaScript. But at least <strong>there are only a few basic principles</strong> that you may keep in mind when developing JavaScript the OOP way:</p>
<ul>
<li>JavaScript <strong>objects are extendable at runtime</strong></li>
<li><strong>Prototypes</strong> instead of static typed classes</li>
<li>Always <strong>declare scope when calling attributes/methods</strong></li>
<li>Use <strong>the <em>new</em> keyword</strong> to create instances of prototype objects.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.abakia.de/blog/2010/03/16/whats-different-with-javascript-oop/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
