<?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 &#187; Longer articles</title>
	<atom:link href="http://www.abakia.de/blog/category/general/articles/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>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>
		<item>
		<title>WebGL: My First Impressions</title>
		<link>http://www.abakia.de/blog/2010/02/10/webgl-my-first-impressions/</link>
		<comments>http://www.abakia.de/blog/2010/02/10/webgl-my-first-impressions/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 17:18:54 +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=326</guid>
		<description><![CDATA[Lately I spend some hours for a research on WebGL. It&#8217;s quite amazing in which ways internet technologies have evolved. I still remember times, when it was nearly impossible to render any graphics using JavaScript only. Nowadays it&#8217;s one of the minor difficulties since we have technologies like SVG or Canvas. Even after animated realtime [...]]]></description>
			<content:encoded><![CDATA[<p>Lately I spend some hours for <strong>a research on WebGL</strong>. It&#8217;s quite amazing in which ways internet technologies have evolved. I still remember times, when it was nearly impossible to render any graphics using JavaScript only. Nowadays it&#8217;s one of the minor difficulties since we have technologies like SVG or Canvas. Even after animated realtime graphics are nothing special anymore, there&#8217;s a new player in town: <strong>WebGL</strong>.</p>
<p><strong>3d computer graphics in web applications</strong> seem to be still a topic thats is heavily associated with technologies like flash, shockwave or other plugin based platforms. This may become history soon. At least if the development of WebGL browsers will proceed as it currently does. If you already use a <a href="http://learningwebgl.com/blog/?p=11" taget="_blank">WebGL enabled browser</a> and had a look at one of the several examples as they appear constantly on <a href="http://learningwebgl.com/" target="_blank">http://learningwebgl.com/</a>, then you will figure out quickly what I&#8217;m talking about. </p>
<p><img src="http://www.abakia.de/blog/wp-content/uploads/2010/02/shadertoy.png" alt="shadertoy" title="shadertoy" width="300" height="250" class="alignright size-full wp-image-341" />Beside the usual operations we are familiar with from nearly any 3D engine, the most Important part on WebGL seems to me that we are able to <strong>use vertex and fragment shaders in the usual native way</strong>. While the whole application code is written with JavaScript, the shader programs will be implemented in a C style shader code. In the end nothing special for OpenGL veterans. But hey! Exactly that&#8217;s the point! If you&#8217;ve ever developed your personal, most awesome shader ever, there&#8217;s the possibility to reuse or partly use them for WebGL. There&#8217;s an <strong>amazing experiment written by Inigo Quilez</strong> about this shader topic. It&#8217;s called <a href="http://www.iquilezles.org/apps/shadertoy/" target=_blank">Shadertoy</a> (don&#8217;t forget to use a WebGL enabled browser). The Shadertoy website, currently offers you <strong>about 28 sample shaders</strong> of different kinds. All are looking very pretty and all are native shader programs, which are executed on the graphics accelerator. Hardware acceleration for Webapps: Just great!</p>
<p>The basic possibilities offered by this technology may end into <strong>enourmous impacts for webstandards</strong>. You already may have recognized the <a href="http://paulirish.com/work/gordon/demos/" target="_blank">Flash Gordon Project</a> of <a href="http://github.com/tobeytailor" target="_blank">Tobias Schneider</a>. His approach is to implement an <strong>open source flash runtime, written in JavaScript</strong>. Imagine this implementation, using the powers of GL rendering. Or ways better: a new runtime plattform using WebGL as rendering layer. </p>
<p><strong>Enough of nerdy enthusiastic day dreaming</strong>. There are still some difficulties with WebGL. At first of course, the minor density of WebGL enabled browsers out there in userland. But there&#8217;s a silverline on the horizon: last September Mozilla announced to implement WebGL in future versions of Firefox. The current nightly builds yet implement it, but it&#8217;s disabled by default. So it&#8217;s just a matter of time, when WebGL will be available easily by default.</p>
<p><img src="http://www.abakia.de/blog/wp-content/uploads/2010/02/Screen-shot-2010-02-10-at-18.10.27.png" alt="Screen shot 2010-02-10 at 18.10.27" title="Screen shot 2010-02-10 at 18.10.27" width="344" height="215" class="alignleft size-full wp-image-337" /> <strong>Second flaw:</strong> It is quite uncomfortable to keep track of all matrix transformations by yourself. Bare WebGL won&#8217;t do that job for you. Many examples on the internet (including the <a href="http://learningwebgl.com/blog/?p=11" taget="_blank">Learning WebGL lessons</a>) implement their own helper functions for identity loading, by encapsuling <a href="http://sylvester.jcoglan.com/" target="_blank">Sylvester (vector and matrix math for JavaScript)</a> routines. That&#8217;s a common but never the less hacky way to fix the problem. And even creating simple basic shapes still produces a lot of code. Many shaders are embedded directly into HTML code, like it is well know from CSS or JavaScript embedding. That feels pretty ugly, when you&#8217;ve a complex WebGL application in mind.</p>
<p>In my opinion, the best solution for this case is <a href="http://github.com/OneGeek/WebGLU" target="_blank">WebGLU</a> by <a href="http://bjartr.blogspot.com/" target="_blank">Benjamin DeLillo</a>. This library is a set of frequently high usefull routines for developing your very own WebGL application. You can load externalized Shader code, enjoy the ease of a camera and many more fine features.</p>
<p>So if you are interested into WebGL now, you should have a look at <a href="http://learningwebgl.com/blog/?p=11" taget="_blank">Learning WebGL</a>. It&#8217;s in my opinion one of the best and most up to date resources on the net. If you are interested in the papers and basics of the new standard, it&#8217;s the best to search <a href="http://www.khronos.org/" target="_blank">The Khronos Group website</a> for further information.</p>
<p>If you&#8217;ve any other interesting news or resources for WebGL, please leave a comment or message me on any of the known ways. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.abakia.de/blog/2010/02/10/webgl-my-first-impressions/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Double Release Party</title>
		<link>http://www.abakia.de/blog/2010/01/14/double-release-party/</link>
		<comments>http://www.abakia.de/blog/2010/01/14/double-release-party/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 19:06:36 +0000</pubDate>
		<dc:creator>Dennis Wilson</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Longer articles]]></category>
		<category><![CDATA[Showcase]]></category>

		<guid isPermaLink="false">http://www.abakia.de/blog/?p=295</guid>
		<description><![CDATA[
Okay, everybody stay calm now, there&#8217;s no reason to panic: I got a new showcase! Yes, it&#8217;s a brand new one. Please&#8230; ladies and gentlemen, please! Let&#8217;s behave like well civilized people. There&#8217;s enough for every single one of you.
After my last showcase went broken some months ago, I promised to myself to create new [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.abakia.de/showcase" target="_blank"><img src="http://www.abakia.de/blog/wp-content/uploads/2010/01/showcase_preview.png" alt="Abakia Project Showcase" title="Abakia Project Showcase" width="600" height="172" class="aligncenter size-full wp-image-297" style="border:1px solid #aaa"/></a></p>
<p>Okay, everybody stay calm now, there&#8217;s no reason to panic: <a target="_blank" href="http://www.abakia.de/showcase/">I got a new showcase</a>! Yes, it&#8217;s a brand new one. Please&#8230; ladies and gentlemen, please! Let&#8217;s behave like well civilized people. There&#8217;s enough for every single one of you.</p>
<p>After my last showcase went broken some months ago, I promised to myself to create new one next (actually THIS) year. You may see the results at <a target="_blank" href="http://www.abakia.de/showcase/">http://www.abakia.de/showcase/</a>. I made heavy use of native flash features, as well as of my interactive framework called <a target="_blank" href="http://github.com/dejowi/monosodium/">Monosodium</a>. </p>
<p><a href="http://github.com/dejowi/monosodium"><img src="http://www.abakia.de/blog/wp-content/uploads/2010/01/monosodium.png" alt="Monosodium Flash Framework" title="Monosodium Flash Framework" width="150" height="182" class="alignright size-small wp-image-303" /></a></p>
<p>So actually this is also a <strong>double release party</strong>. When I started developing ActionScript Flash in 2008, I also began to collect often used chunks of code and glued them to build a giant tar ball of death. No, <strong>that&#8217;s not</strong> what the framework is actually made of. In late 2009 I throw away the prototype and started to create a better version of the old <del datetime="2010-01-14T18:07:53+00:00">framework</del> <del datetime="2010-01-14T18:07:53+00:00">library</del> <del datetime="2010-01-14T18:07:53+00:00">collection</del>&#8230; frankenstein monster. </p>
<p>The rewrite resulted in a lightweight and easy to use flash framework, for creating view based interactive flash apps. There&#8217;s probably nothing ground shaking with this framework but it&#8217;s my very personal 2 cent and &#8220;thank you&#8221; to the flash community itself. The project is still lacking some documentation. But I&#8217;m working on that as I continue integrating features and refactoring the code. Yes, the framework is still under heavy development. You know the game&#8217;s name: commit early, commit often and listen to the audience.<br />
So if you&#8217;re interested in the framework, please give me some feedback on that.</p>
<p>Special thanks goes out to Sebastian Deutsch (<a href="http://9elements.com/" target="_blank">9elements</a>), for supporting me while developing Monosodium in the early stages.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.abakia.de/blog/2010/01/14/double-release-party/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
