<?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>evølutiøn-515.net &#187; Coding</title>
	<atom:link href="http://blog.evolution515.net/article/category/coding/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.evolution515.net</link>
	<description>Chaos ist nur eine andere Bezeichung für steigende Komplexität.</description>
	<lastBuildDate>Wed, 03 Jun 2009 22:55:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Resetting the MySQL root password…</title>
		<link>http://blog.evolution515.net/article/resetting-mysql-root-password/</link>
		<comments>http://blog.evolution515.net/article/resetting-mysql-root-password/#comments</comments>
		<pubDate>Tue, 03 Feb 2009 12:00:48 +0000</pubDate>
		<dc:creator>Blu:RayNe</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Datenbanken]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[snippets]]></category>

		<guid isPermaLink="false">http://blog.evolution515.net/?p=259</guid>
		<description><![CDATA[A little snippet you may need from time to time  
$ /etc/init.d/mysql stop
$ killall mysqld; sleep 5; killall -9 mysqld
$ sudo /usr/bin/mysqld_safe &#8211;skip-grant-tables &#38;amp;
$ mysql
mysql&#62; USE mysql;
mysql&#62; UPDATE user SET Password=PASSWORD&#40;&#8216;myNewPAssword&#8217;&#41; WHERE Host=&#8216;localhost&#8217; AND User=&#8216;root&#8217;;
mysql&#62; exit;
$ /etc/init.d/mysql stop # &#40;no &#8216;restart&#8217; here or mysql may reload without grant-tables!&#41;
$ /etc/init.d/mysql start
]]></description>
			<content:encoded><![CDATA[<p>A little snippet you may need from time to time <img src='http://blog.evolution515.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<div class="dean_ch" style="white-space: wrap;">$ /etc/init.d/mysql stop<br />
$ <span class="kw2">killall</span> mysqld; <span class="kw2">sleep</span> <span class="nu0">5</span>; <span class="kw2">killall</span> <span class="nu0">-9</span> mysqld<br />
$ <span class="kw2">sudo</span> /usr/bin/mysqld_safe &#8211;skip-grant-tables &amp;amp;<br />
$ mysql<br />
mysql&gt; USE mysql;<br />
mysql&gt; UPDATE user SET <span class="re2">Password=</span>PASSWORD<span class="br0">&#40;</span><span class="st0">&#8216;myNewPAssword&#8217;</span><span class="br0">&#41;</span> WHERE <span class="re2">Host=</span><span class="st0">&#8216;localhost&#8217;</span> AND <span class="re2">User=</span><span class="st0">&#8216;root&#8217;</span>;<br />
mysql&gt; <span class="kw3">exit</span>;<br />
$ /etc/init.d/mysql stop <span class="re3"># <span class="br0">&#40;</span>no </span><span class="st0">&#8216;restart&#8217;</span> here or mysql may reload without grant-tables!<span class="br0">&#41;</span><br />
$ /etc/init.d/mysql start</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.evolution515.net/article/resetting-mysql-root-password/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Uploads via HTTP are still an issue…</title>
		<link>http://blog.evolution515.net/article/uploads-via-http-are-still-an-issue/</link>
		<comments>http://blog.evolution515.net/article/uploads-via-http-are-still-an-issue/#comments</comments>
		<pubDate>Sun, 01 Feb 2009 21:33:05 +0000</pubDate>
		<dc:creator>Blu:RayNe</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Browser]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[aurigma]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[upload]]></category>
		<category><![CDATA[upload applet]]></category>

		<guid isPermaLink="false">http://blog.evolution515.net/?p=408</guid>
		<description><![CDATA[Even in the days of Web 2.0 you encounter many errors when it comes to Uploads via HTTP. The protocol was never made for uploads or better to say: there are still enough bugs in implementations and the protocol itself. 
Very familar, e.g. is the problem of having a meter on upload progress. And i [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Even in the days of Web 2.0 you encounter many errors when it comes to Uploads via HTTP. The protocol was never made for uploads or better to say: there are still enough bugs in implementations and the protocol itself. </strong></p>
<p><strong>Very familar, e.g. is the problem of having a meter on upload </strong><strong>progress</strong><strong>. And i also don&#8217;t want to mention the problems of WebDAV implementation of Windows for now, or the limitations of firewalls or proxies&#8230; </strong></p>
<p><strong>But let&#8217;s have a look on solutions provided today in the Web for Uploads…</strong></p>
<h3><strong>Flash/HTTP</strong></h3>
<p>We have a modified version of R6 running on a webshop with regular uploads of 20-70MB files. If upload goes to fast – like on business lines with upstream ≥3Mb – Flash is likely to throw errors telling the visitor a script is running too slow. Then the customer has to choose „continue“ or to „cancel“, which usually ends up in canceling the job  <img src='http://blog.evolution515.net/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p>This behavior is caused by Flash calling the „onFileChunkComplete“-Event (or something) too often, or let&#8217;s say after every 4096 bytes sent, which can result in many many calls if you have a good upstream bandwidth.</p>
<p>Second, there are also those „unknown errors“ in Flash caused at runtime. The source yet is unknown and it seems to continue with Flash10 and  some little amount of customers smaller than one percent share. Sorry, <em>unknown </em>means <em>unknown </em>and Adobe won&#8217;t give support here! we&#8217;re back to Flash9  <img src='http://blog.evolution515.net/wp-includes/images/smilies/icon_confused.gif' alt=':-?' class='wp-smiley' /> </p>
<p>Yet the same thing happens to JavaScript if update goes too fast and too often, e.g. by using a progress bar constantly being updated (20-50times in the second). Therefore I had to split up the graphical update process to a seperate class that just goes on update intervals calling the <em>current/total-values</em> of the FileUpload-Class.</p>
<p>Well using Flash as upload client is nice, especially with the ability to use real sockets. For Flash9 the HTTP methods don&#8217;t provide the possibility of splitting large files – so you could upload them in seperate chunks. It&#8217;s about  security.</p>
<p>Then Flash10 possibly could do now (by accepting local files), but here we have the issue of having the upload beeing fired from Flash itself &#8211; scripting doesn&#8217;t work anymore, so no <em>hidden</em> flash uploader, that could do the job  <img src='http://blog.evolution515.net/wp-includes/images/smilies/icon_cry.gif' alt=':cry:' class='wp-smiley' /> </p>
<p>But customer complaints still continues… especially form those using MSIE and don&#8217;t get a thing right.</p>
<h3>PHP and APC, for now. HTTP again…</h3>
<p>Okay, usually you gotta think this works now. It&#8217;s out now for long enough.  But fail of proof!</p>
<p>I leeched some script form <a href="http://www.phpriot.com/articles/php-ajax-file-uploads">PHPRiot</a> yesterday by Quentin Zervaas, fixed some bugs (<em>while(1=1) </em>is great idea in JavaScript  <img src='http://blog.evolution515.net/wp-includes/images/smilies/icon_eek.gif' alt='8-O' class='wp-smiley' /> ), added a file limit check and hoped i finally would have something <em>that really works</em>.  But it didn&#8217;t:</p>
<ul>
<li>Multiple file-fields do not work with APC</li>
<li>If file uploaded is greater than far greater than limit, apc throws out 0-values for current and total</li>
<li>Sometimes just seems stop working somehow; but after an apache restart apache it works again  <img src='http://blog.evolution515.net/wp-includes/images/smilies/icon_cry.gif' alt=':cry:' class='wp-smiley' /> </li>
</ul>
<p>I tried so many ‘solutions’ now and somehow it really seems to me, that monitoring the upload by calling a server-side status-script always has some problems. Probably it is really an Apache-issue… we&#8217;ll have too see…</p>
<h3>Sliced HTTP Upload via Plugins &#8211; a solution?</h3>
<p>I already mentioned it in the Flash/HTTP section, and indeed it&#8217;s more safe, because the file chunks are simply smaller!</p>
<p>I did many tests with Apache, and often it just happens that Apache closes a TCP connection on big file uploads. The source is yet unknown to me. Probably it has to do with Apache itself. I didn&#8217;t encounter the problem when using FastCGI and a Perl-Script to handle my upload.</p>
<p>So, i guess doing sliced upload is a good option. But then you could only use Flash10 which has other restrictions or Java. Yep, that thing that only works on 70-80%  of user browsers, MSIE for the rest that reports about having Java supported – true indeed – the other problem is: does it really run on those often misconfigured and compromised customer systems?</p>
<p>Well Flash10 now does, but have some limitations we probably could live with:</p>
<ul>
<li>load() and save() APIs can only be called in response to user interaction (such as a button click).</li>
<li>locations of the loaded and save files are not exposed to ActionScript.</li>
</ul>
<p>Since the API is now asynchronous (non-blocking),</p>
<h3><strong>Final match: HTTP vs. FTP-Uploads in the client<br />
</strong></h3>
<ul>
<li>HTTP was not made for upload!</li>
<li>use more bandwidth than you actually need (base64!)</li>
<li>HTTP is not resumeable (but you could retry on splitted chunks)</li>
</ul>
<p>Let&#8217;s summariuze: You can only monitor what was uplaoded by having control over your client and you can only split files, when you have access on it.</p>
<p>Use a Java-Applet or code a Flash-Client that works over FTP! And use a FTP-Server that is secure and can handle virtual users, like <em>vsftpd</em><strong>. </strong>Then<strong> code some backend,</strong></p>
<h3>Yes! Probably <em>it is</em> a solution. But you still have the problems with users not supperting Java, or who complain about Java „loading“ too long. Here are some other good tries, that usually work:</h3>
<ul>
<li><a href="http://www.aurigma.com/">http://www.aurigma.com/</a></li>
<li><a href="http://www.jupload.biz/">http://www.jupload.biz/</a></li>
<li><a href="http://www.javaatwork.com">http://www.javaatwork.com</a>/</li>
<li><a href="http://upload.thinfile.com/">http://upload.thinfile.com/</a></li>
</ul>
<p>We&#8217;ll see further when the first FTP libraries for Flash 10 are finished.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.evolution515.net/article/uploads-via-http-are-still-an-issue/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>FLEX has a new AJAX competitor: SmartGWT</title>
		<link>http://blog.evolution515.net/article/flex-has-a-new-ajax-competitor-smartgwt/</link>
		<comments>http://blog.evolution515.net/article/flex-has-a-new-ajax-competitor-smartgwt/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 14:48:16 +0000</pubDate>
		<dc:creator>Blu:RayNe</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Netzwelt]]></category>
		<category><![CDATA[XML-Technologies]]></category>

		<guid isPermaLink="false">http://blog.evolution515.net/?p=392</guid>
		<description><![CDATA[First, I&#8217;m really astonished! SmartGWT – GWT NextGen – is here… 

is fully done in AJAX, has therefore all the possiblities of XML
and so also XHTML and all the browser capabilites
is faster then the great Ext.JS
offers an increadibly amount of interface widgets
keeps beeing fast after loading a couple of examples
is easier to use probably easier [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-393" title="smartgwt-main-bo" src="http://blog.evolution515.net/media/smartgwt-main-bo-276x300.jpg" alt="smartgwt-main-bo" width="276" height="300" />First, I&#8217;m really astonished! <a href="http://www.smartclient.com/smartgwt/">SmartGWT</a> – GWT NextGen – is here…<strong> </strong></p>
<ul>
<li>is fully done in AJAX, has therefore all the possiblities of XML</li>
<li>and so also XHTML and all the browser capabilites</li>
<li>is faster then the great Ext.JS</li>
<li>offers an increadibly amount of interface widgets</li>
<li>keeps beeing fast after loading a couple of examples</li>
<li>is easier to use probably easier to use than FLEX</li>
<li>because everything is done via server side Java Code</li>
<li>and it is licensed under LGPL!</li>
</ul>
<p>Congratulations! This will set new standards for AJAX driven web applications… we will see how it compares to <a href="http://www.gwt-ext.com/">GWT-EXT 2</a> <img src='http://blog.evolution515.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.evolution515.net/article/flex-has-a-new-ajax-competitor-smartgwt/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Replacing adding or adding nodes in SimpleXML</title>
		<link>http://blog.evolution515.net/article/replacing-adding-or-adding-nodes-in-simplexml/</link>
		<comments>http://blog.evolution515.net/article/replacing-adding-or-adding-nodes-in-simplexml/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 18:00:27 +0000</pubDate>
		<dc:creator>Blu:RayNe</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.evolution515.net/?p=320</guid>
		<description><![CDATA[You just can&#8217;t! Because you only communicate with SimpleXML by getter and setter methods. It&#8217;s possible there is another interface – anywsy i doubt it!
So, the magic of adding nodes is to convert from and to DOMDocument. The snippet below is just something stripped from sourcecode, so you get the idea how it works.
// This [...]]]></description>
			<content:encoded><![CDATA[<p>You just can&#8217;t! Because you only communicate with SimpleXML by getter and setter methods. It&#8217;s possible there <em>is</em> another interface – anywsy i doubt it!</p>
<p>So, the magic of adding nodes is to convert from and to DOMDocument. The snippet below is just something stripped from sourcecode, so you get the idea how it works.</p>
<div class="dean_ch" style="white-space: wrap;"><span class="co1">// This document is emtpy &#8211; &nbsp;it just illustrates an example!</span><br />
<span class="re0">$this</span>-&gt;<span class="me1">xml</span> = simple_xml_load<span class="br0">&#40;</span><span class="st0">&#8221;</span><span class="br0">&#41;</span>; </p>
<p><span class="co1">// convert base document from simplexml to dom</span><br />
<span class="re0">$dom</span> = dom_import_simplexml<span class="br0">&#40;</span><span class="re0">$xml</span><span class="br0">&#41;</span>-&gt;<span class="me1">ownerDocument</span>;</p>
<p><span class="co1">// get our nodes</span><br />
<span class="re0">$newNode</span> = dom_import_simplexml<span class="br0">&#40;</span><span class="re0">$this</span>-&gt;<span class="me1">character</span>-&gt;<span class="me1">xml</span><span class="br0">&#41;</span>;<br />
<span class="re0">$oldNode</span> = <span class="re0">$dom</span>-&gt;<span class="me1">getElementsByTagName</span><span class="br0">&#40;</span><span class="st0">&#8216;character&#8217;</span><span class="br0">&#41;</span>-&gt;<span class="me1">item</span><span class="br0">&#40;</span><span class="nu0">0</span><span class="br0">&#41;</span>;</p>
<p><span class="co1">// import replacement node into our working DOM and reassign it</span><br />
<span class="re0">$newNode</span> = <span class="re0">$dom</span>-&gt;<span class="me1">importNode</span><span class="br0">&#40;</span><span class="re0">$newNode</span>,<span class="kw2">true</span><span class="br0">&#41;</span>;</p>
<p><span class="co1">// for example: replace the -element in our DOM</span><br />
<span class="re0">$oldNode</span>-&gt;<span class="me1">parentNode</span>-&gt;<span class="me1">replaceChild</span><span class="br0">&#40;</span><span class="re0">$newNode</span>, <span class="re0">$oldNode</span><span class="br0">&#41;</span>;</p>
<p><span class="co1">// convert it back</span><br />
<span class="re0">$this</span>-&gt;<span class="me1">xml</span> = simplexml_import_dom<span class="br0">&#40;</span><span class="re0">$dom</span><span class="br0">&#41;</span>;</div>
<p><strong>Damn ugly but that&#8217;s just the way it is! <img src='http://blog.evolution515.net/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /><br />
</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.evolution515.net/article/replacing-adding-or-adding-nodes-in-simplexml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom fonts: text replacement via Canvas and VML</title>
		<link>http://blog.evolution515.net/article/custom-fonts-text-replacement-via-canvas-and-vml/</link>
		<comments>http://blog.evolution515.net/article/custom-fonts-text-replacement-via-canvas-and-vml/#comments</comments>
		<pubDate>Tue, 28 Oct 2008 13:29:55 +0000</pubDate>
		<dc:creator>Blu:RayNe</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[@font-face]]></category>
		<category><![CDATA[custom fonts]]></category>
		<category><![CDATA[text replacement]]></category>

		<guid isPermaLink="false">http://blog.evolution515.net/?p=303</guid>
		<description><![CDATA[Still we have to wait until @font-face is ready in all modern browsers. We had text-replacement by Flash, by images created on the server and by half-working SVG so far. Now it&#8217;s time for another approach: text replacement via pure Javascript!
Basically the script draws JSON font outlines converted via a Perl-Script from TTF and uses [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.evolution515.net/media/typeface-js.png"><img class="size-medium wp-image-304 alignright" style="float:right;margin-left:1em" title="CSS supported via typeface.js" src="http://blog.evolution515.net/media/typeface-js-300x202.png" alt="" width="200" height="120" /></a>Still we have to wait until @font-face is ready in all modern browsers. We had text-replacement by Flash, by images created on the server and by half-working SVG so far. Now it&#8217;s time for another approach: text replacement via pure Javascript!</p>
<p>Basically the script draws JSON font outlines converted via a Perl-Script from TTF and uses both VML and Canvas for rendering. Only problem: text cannot be selected and copied to the clipboard anymore.</p>
<div style="clear:both;height:1em"></div>
<blockquote><p><strong>There&#8217;s work left to be done. Planned improvements:</strong></p>
<ul>
<li>Full support for @font-face rules, if possible</li>
<li>Support for hinting (this seems like a viable option)</li>
<li>Speed improvements, especially for IE</li>
<li>Work around Opera&#8217;s getComputedStyle() issues</li>
<li>Possible support for SVG backend</li>
<li>Work around needing to specify &#8216;typeface-js&#8217; as a class name</li>
<li>More CSS support, including :hover and x-height</li>
<li>React to DOMNode* events to support DHTML</li>
</ul>
</blockquote>
<p> </p>
<p><strong>Great job: It&#8217;s working on all major modern and semi-modern browser (MSIE7). I&#8217;ll be using that! Thanks!</strong></p>
<p>More here: <a href="http://typeface.neocracy.org/">http://typeface.neocracy.org/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.evolution515.net/article/custom-fonts-text-replacement-via-canvas-and-vml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Little bash snippet to kill locking queries from MySQL</title>
		<link>http://blog.evolution515.net/article/little-bash-snippet-to-kill-locking-queries-from-mysql/</link>
		<comments>http://blog.evolution515.net/article/little-bash-snippet-to-kill-locking-queries-from-mysql/#comments</comments>
		<pubDate>Thu, 09 Oct 2008 16:44:14 +0000</pubDate>
		<dc:creator>Blu:RayNe</dc:creator>
				<category><![CDATA[Datenbanken]]></category>
		<category><![CDATA[database locks]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[slow queries]]></category>

		<guid isPermaLink="false">http://blog.evolution515.net/?p=301</guid>
		<description><![CDATA[I just tell you: optimize your tables! I will not give anymore support for bad code, stupid database layout and i am not going to debug your messy code. If you don&#8217;t get the introductino chapters of MySQL – stay away from me! Yep, it was just one of these days…
#!/bin/bash
echo &#34;Killing MySQL Queries&#8230;&#34;
MYSQL=&#34;$(which mysql)&#34;
MyUSER=&#34;username&#34;
MyPASS=&#34;password&#34;
for [...]]]></description>
			<content:encoded><![CDATA[<p>I just tell you: optimize your tables! I will not give anymore support for bad code, stupid database layout and i am not going to debug your messy code. If you don&#8217;t get the introductino chapters of MySQL – stay away from me! Yep, it was just one of these days…</p>
<div class="dean_ch" style="white-space: wrap;"><span class="re3">#!/bin/bash</span><br />
<span class="kw3">echo</span> <span class="st0">&quot;Killing MySQL Queries&#8230;&quot;</span><br />
<span class="re2">MYSQL=</span><span class="st0">&quot;$(which mysql)&quot;</span><br />
<span class="re2">MyUSER=</span><span class="st0">&quot;username&quot;</span><br />
<span class="re2">MyPASS=</span><span class="st0">&quot;password&quot;</span></p>
<p><span class="kw1">for</span> pid <span class="kw1">in</span> `mysqladmin proc &nbsp;-u<span class="re1">$MyUSER</span> -p<span class="re1">$MyPASS</span> | <span class="kw2">grep</span> -i Query &nbsp;| <span class="kw2">grep</span> -i lock|awk <span class="st0">&#8216;{ print $2;}&#8217;</span>`<br />
<span class="kw1">do</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re2">query=</span><span class="st0">&quot;KILL $pid;&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">echo</span> <span class="st0">&quot;&gt; $query&quot;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re1">$MYSQL</span> -u<span class="re1">$MyUSER</span> &nbsp;-p<span class="re1">$MyPASS</span> -e <span class="st0">&quot;$query&quot;</span><br />
<span class="kw1">done</span>;</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.evolution515.net/article/little-bash-snippet-to-kill-locking-queries-from-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DOJO needs a package managment!</title>
		<link>http://blog.evolution515.net/article/dojo-needs-a-package-managment/</link>
		<comments>http://blog.evolution515.net/article/dojo-needs-a-package-managment/#comments</comments>
		<pubDate>Mon, 25 Feb 2008 13:21:41 +0000</pubDate>
		<dc:creator>Blu:RayNe</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[]]></category>
		<category><![CDATA[dojo]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[internationalization]]></category>
		<category><![CDATA[jel]]></category>
		<category><![CDATA[localisation]]></category>

		<guid isPermaLink="false">http://blog.evolution515.net/article/dojo-needs-a-package-managment/</guid>
		<description><![CDATA[I needed some locale date and number parsing fucntion for javascript today. As it goes for what the user sees i do usually do parsing and validation on the server-side. But this time i needed something for an admin interface that does also some javascript-based price calculation on the client-side.
So far i searched via Google [...]]]></description>
			<content:encoded><![CDATA[<p>I needed some locale date and number parsing fucntion for javascript today. As it goes for what the user sees i do usually do parsing and validation on the server-side. But this time i needed something for an admin interface that does also some javascript-based price calculation on the client-side.</p>
<p>So far i searched via Google for Prototype-based Libs on i18n, sprintf and so on. I found&nbsp; <a href="http://jel.mondea.com.au">JEL (JavaScript Enhancement Library)</a>&nbsp; and gave it try, but hardly to say: it is too bloated and the author implemented much english-language based method, but so far no <i>sprintf</i>, which i find is essential. And in overall the lib was ober 200KB for only doing I18n stuff!</p>
<p>Then i found out <a href="http://dojotoolkit.org/">DOJO</a> implements <i>Date.POSI</i>X and also a a <i>String.sprintf</i> that seemed very complete and began browsing the <a href="http://dojotoolkit.org/">DOJO-Website</a>. DOJO so far is IBM-sponsored and it was nice to see it reached a mature stage of development. I don&#8217;t like the namespaced function calls in JavaScript much, but on the server side doing java stuff like in GWT would be nice with that.</p>
<p>Still one big problem remains with DOJO: it just fucking hangs my browser and loads too damn slow!</p>
<p>DOJO has a nice dojo.require() which loads required dependencies on-the-fly. I had my own approach on that via the Prototype-based Postload.js. But the main problem with DOJO is that every class has again it&#8217;s own dependencies. You just have to inlcude one line of javascript in your HTML header, but when you do following require-statements&hellip;</p>
<div class="dean_ch" style="white-space: wrap;">
dojo.<span class="me1">require</span><span class="br0">&#40;</span><span class="st0">&quot;dojo.date.locale&quot;</span><span class="br0">&#41;</span>;<br />
dojo.<span class="me1">require</span><span class="br0">&#40;</span><span class="st0">&quot;dojo.currency&quot;</span><span class="br0">&#41;</span>;<br />
dojo.<span class="me1">require</span><span class="br0">&#40;</span><span class="st0">&quot;dojo.i18n&quot;</span><span class="br0">&#41;</span>;</div>
<p><b>&hellip; it results in firing up about 40 requests on .js-files!&nbsp; That&#8217;s horrible! No wonder, my little Firefox hangs until all files are loaded! So, please, don&#8217;t harm the web, DOJO!</b></p>
<p>I don&#8217;t know if there is any solution out by the DOJO team, so please tell me. My conculusion so far is that for default load process of the website the dependencies should be resolved before the page is even sent to the browser. The browser should have just to load one JavaScript-file that is compressed and contains all default dependencies used by DOJO on the page. So far that can only be done having a little reference of all dependencies, so the haeder can be written accordingly.</p>
<p>If there isn&#8217;t such a thing someone should do that! So far I think think DOJO is a good for my future use, as long as there isn&#8217;t an Prototype- or jQuery-equivalent for i18n.&nbsp;</p>
<p><a href="http://kauriproject.org/wiki/g1/g3/69-kauri.html">KAURI</a> has also a nice <a href="http://kauriproject.org/wiki/g1/g3/69-kauri.html">comparision chart</a> of JavaScript-libraries.</p>
<p><b>UPDATE #1:</b> Probably i could now also check out localisation-support for <a href="http://www.extjs.org">Ext.js</a>&hellip; which seems to miss parse()-functions (or does it automatically). And in overall i don&#8217;t find any great localisation support either <img src='http://blog.evolution515.net/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p><b>UPDATE #2:</b> There seems to be such a thing for DOJO called <a href="http://dojotoolkit.org/book/dojo-book-0-4/part-6-customizing-dojo-builds-better-performance/dojo-build-system/creating-cust">DOJO Build System</a> that uses ant. It could be used as base for automatic server-side file generation in PHP&hellip; great <img src='http://blog.evolution515.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  I just everyone who uses DOJO is also using it, otherwise I am gonig to hate your websites!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.evolution515.net/article/dojo-needs-a-package-managment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Prototip: Now does AJAX with this little Extension.</title>
		<link>http://blog.evolution515.net/article/prototip-new-does-ajax-with-this-ajax-extension/</link>
		<comments>http://blog.evolution515.net/article/prototip-new-does-ajax-with-this-ajax-extension/#comments</comments>
		<pubDate>Fri, 30 Nov 2007 13:37:56 +0000</pubDate>
		<dc:creator>Blu:RayNe</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[dynamic content]]></category>
		<category><![CDATA[prototip]]></category>
		<category><![CDATA[prototype]]></category>

		<guid isPermaLink="false">http://blog.evolution515.net/article/prototip-new-does-ajax-with-this-ajax-extension/</guid>
		<description><![CDATA[Prototip.js is my favorite prototype.js-based tooltip-script at the moment. I&#8217;ve just written this piece in morning because we needed the capability of having dynamic content (or postloading big bits of HTML with images). Enjoy!

/**
&#160;* AjaxTip
&#160;* @version 0.1
&#160;* @desc Extension for prototip.js. Now it supports dynamic loading of content. (http://www.nickstakenburg.com/projects/prototip/)
&#160;* @author Markus Geiger 2007
&#160;* @package AjaxTip
&#160;* [...]]]></description>
			<content:encoded><![CDATA[<p><strong><a href="http://www.nickstakenburg.com/projects/prototip/">Prototip.js</a> is my favorite <a href="http://www.prototypejs.org">prototype.js</a>-based tooltip-script at the moment. I&#8217;ve just written this piece in morning because we needed the capability of having dynamic content (or postloading big bits of HTML with images). Enjoy!</strong></p>
<div class="dean_ch" style="white-space: wrap;">
/**<br />
&nbsp;* AjaxTip<br />
&nbsp;* @version 0.1<br />
&nbsp;* @desc Extension for prototip.js. Now it supports dynamic loading of content. (http://www.nickstakenburg.com/projects/prototip/)<br />
&nbsp;* @author Markus Geiger 2007<br />
&nbsp;* @package AjaxTip<br />
&nbsp;* @license MIT<br />
&nbsp;* @url http://blog.evolution515.net<br />
&nbsp;*/</p>
<p>var AjaxTip = Class.create(Tip, {<br />
&nbsp; &nbsp; hasContentLoaded: false,<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; start: function() {<br />
&nbsp; &nbsp; &nbsp; &nbsp; this.require(&#8216;Tip&#8217;);<br />
&nbsp; &nbsp; },<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; initialize: function(elem, href) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; this.elem = elem;<br />
&nbsp; &nbsp; &nbsp; &nbsp; this.href = href;<br />
&nbsp; &nbsp; &nbsp; &nbsp; this.options = arguments[3] || {};<br />
&nbsp; &nbsp; &nbsp; &nbsp; this.eventMousemove = this.mousemove.bindAsEventListener(this);<br />
&nbsp; &nbsp; &nbsp; &nbsp; elem.observe(&#8216;mousemove&#8217;, this.eventMousemove);<br />
&nbsp; &nbsp; },<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; mousemove: function(e) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (this.tip)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return false;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; // Initialize Tip<br />
&nbsp; &nbsp; &nbsp; &nbsp; var content = &#8216;&lt;img alt=&quot;&quot; src=&quot;lib/ajaxloader/tooltip.gif&quot; style=&quot;vertical-align: top;&quot; /&gt; Loading&amp;hellip;&#8217;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; this.tip = new Tip(<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; this.elem, <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; content,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; this.options<br />
&nbsp; &nbsp; &nbsp; &nbsp; );</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; // Make AJAX Request and load content<br />
&nbsp; &nbsp; &nbsp; &nbsp; var tip = this.tip;<br />
&nbsp; &nbsp; &nbsp; &nbsp; this.request = new Ajax.Request(<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; this.href, <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; method: &#8216;get&#8217;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; onSuccess: function(transport) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tip.content = transport.responseText;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tip.tip.innerHTML = transport.responseText;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; );</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; this.elem.tip = this.tip;<br />
&nbsp; &nbsp; &nbsp; &nbsp; Event.stopObserving(this.elem, &#8216;mousemove&#8217;, this.eventMousemove);<br />
&nbsp; &nbsp; }<br />
});</div>
<p><strong>And here&#8217;s a replacement for a better default </strong><strong>CSS </strong><strong>style:</strong></p>
<div class="dean_ch" style="white-space: wrap;">
<p><span class="coMULTI">/* Tooltip styles */</span><br />
<span class="re1">.prototip</span> <span class="re1">.default</span> <span class="br0">&#123;</span> <br />
&nbsp; &nbsp; <span class="kw1">width</span>: <span class="re3">150px</span>; <br />
<span class="br0">&#125;</span><br />
<span class="re1">.prototip</span> <span class="re1">.default</span> <span class="re1">.toolbar</span> <span class="br0">&#123;</span> <br />
&nbsp; &nbsp; <span class="kw1">background</span>: <span class="re0">#FFE</span>; <br />
<span class="br0">&#125;</span><br />
<span class="re1">.prototip</span> <span class="re1">.default</span> <span class="re1">.title</span> <span class="br0">&#123;</span> <br />
&nbsp; &nbsp; <span class="kw1">padding</span>: <span class="re3">5px</span>; <br />
<span class="br0">&#125;</span><br />
<span class="re1">.prototip</span> <span class="re1">.default</span> <span class="re1">.content</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; <span class="kw1">background</span>: <span class="re0">#FFE</span>; <br />
&nbsp; &nbsp; <span class="kw1">font-size</span>: <span class="re3">11px</span>;<br />
&nbsp; &nbsp; <span class="kw1">font-family</span>: Arial, <span class="kw2">sans-serif</span>;<br />
&nbsp; &nbsp; <span class="kw1">padding</span>: <span class="re3">6px</span>;<br />
&nbsp; &nbsp; text-align<span class="re2">:left</span>;<br />
&nbsp; &nbsp; min-height<span class="re2">:<span class="re3">1em</span></span>;<br />
&nbsp; &nbsp; width<span class="re2">:<span class="re3">200px</span></span>;<br />
&nbsp; &nbsp; <span class="kw1">color</span>:<span class="re0">#<span class="nu0">000</span></span>;<br />
&nbsp; &nbsp; border<span class="re2">:<span class="re3">1px</span></span> <span class="kw2">solid</span> <span class="re0">#<span class="nu0">999</span></span>;<br />
&nbsp; &nbsp; border-radius<span class="re2">:<span class="re3">5px</span></span>;<br />
&nbsp; &nbsp; -moz-border-radius<span class="re2">:<span class="re3">5px</span></span>;<br />
<span class="br0">&#125;</span><br />
&nbsp;</div>
<p>You can create a neat AJAX-Loader GIF <a href="http://www.ajaxload.info/">here</a>. Use&nbsp; <i>#FFFFDD</i> for background and <i>#999999 </i>for foreground color.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.evolution515.net/article/prototip-new-does-ajax-with-this-ajax-extension/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Interactive Flash Panoramas</title>
		<link>http://blog.evolution515.net/article/interactive-flash-panoramas/</link>
		<comments>http://blog.evolution515.net/article/interactive-flash-panoramas/#comments</comments>
		<pubDate>Wed, 12 Sep 2007 08:04:56 +0000</pubDate>
		<dc:creator>Blu:RayNe</dc:creator>
				<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://blog.evolution515.net/article/interactive-flash-panoramas/</guid>
		<description><![CDATA[I normaly don&#8217;t post much about Flash but this Interactive Panorama is really cool. It was built on Papervision3D, probably the most popular Flash 3D-Engine (but not as advanced as Away3D) 
Somehow the stuff reminds me of the things that already were possible with quicktime, but were also harder to realizie and didn&#8217;t load as [...]]]></description>
			<content:encoded><![CDATA[<p>I normaly don&#8217;t post much about Flash but this <a href="http://flashpanoramas.com/blog/2007/05/23/add-some-life-to-panoramas/">Interactive Panorama</a> is really cool. It was built on <a href="http://blog.papervision3d.org/">Papervision3D</a>, probably the most popular Flash 3D-Engine (but not as advanced as </a><a href="away.kiev.ua/away3d/">Away3D</a>) </p>
<p>Somehow the stuff reminds me of the things that already were possible with quicktime, but were also harder to realizie and didn&#8217;t load as fast as Flash Panorama.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.evolution515.net/article/interactive-flash-panoramas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP: Zend Framework Tutorial by Ralf Eggert</title>
		<link>http://blog.evolution515.net/article/php-zend-framework-tutorial-by-ralf-eggert/</link>
		<comments>http://blog.evolution515.net/article/php-zend-framework-tutorial-by-ralf-eggert/#comments</comments>
		<pubDate>Thu, 09 Aug 2007 21:52:20 +0000</pubDate>
		<dc:creator>Blu:RayNe</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.evolution515.net/article/php-zend-framework-tutorial-by-ralf-eggert/</guid>
		<description><![CDATA[I was a friend of Zend Framework when it was in version 0.5 because of the convincing and really well-thought concepts. Most of them are even better than those of CakePHP  (ok, CakePHP can some little other frameworks can do much more than Zend Framework). But Zend Framework is now final and already 1.01, [...]]]></description>
			<content:encoded><![CDATA[<p>I was a friend of <a href="http://framework.zend.com">Zend Framework</a> when it was in version 0.5 because of the convincing and really well-thought concepts. Most of them are even better than those of <a href="http://www.cakephp.org">CakePHP</a>  (ok, <a href="http://www.cakephp.org">CakePHP</a> can some little other frameworks can do much more than <a href="http://framework.zend.com">Zend Framework</a>). But <a href="http://framework.zend.com">Zend Framework</a> is now final and already 1.01, and i guess it has a bright future <img src='http://blog.evolution515.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>There is an easy to understand and some <a href="http://www.ralfeggert.de/kategorie/zend-framework-tutorial/">good tutorials</a> on <a href="http://www.ralfeggert.de/">Ralf Eggert&#8217;s Blog</a> that gives you an introduction to MVC and how things work with <a href="http://framework.zend.com">Zend Framework</a>. Just try it for yourself!</p>
<p><strong>And for all trolls: I know Java is better!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.evolution515.net/article/php-zend-framework-tutorial-by-ralf-eggert/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
