<?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>reZo Labs &#187; Web Development</title>
	<atom:link href="http://rezolabs.com/topic/web-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://rezolabs.com</link>
	<description>Yet another nerd blog about GNU/Linux and Web Development!</description>
	<lastBuildDate>Fri, 09 Jul 2010 04:55:32 +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>Combining Web 2.0 with 1.0</title>
		<link>http://rezolabs.com/web-development/combining-web-20-with-10/</link>
		<comments>http://rezolabs.com/web-development/combining-web-20-with-10/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 08:05:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[combining]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[web 1.0]]></category>
		<category><![CDATA[web 2.0]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://rezolabs.com/?p=14</guid>
		<description><![CDATA[It's all very nice and dandy to have a website built within 2.0 standards. However, what if the website hasn't been built for non-JavaScript browsers, or for people with JavaScript disabled?

Since all web 2.0 website's require JavaScript, whether we are talking about Flash or AJAX. A nice way to resolve this issue is to return true, or false from a function being called via a JavaScript event. This can determine if the client is using a web 2.0 or 1.0 web browser.]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s all very nice and dandy to have a website built within 2.0 standards. However, what if the website hasn&#8217;t been built for non-JavaScript browsers, or for people with JavaScript disabled?</p>
<p>Since all web 2.0 website&#8217;s require JavaScript, whether we are talking about Flash or AJAX. A nice way to resolve this issue is to return true, or false from a function being called via a JavaScript event. This can determine if the client is using a web 2.0 or 1.0 web browser.</p>
<p>An example of this is:</p>
<p>index.html</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;test.js&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">onclick</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;return test();&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;/&quot;</span>&gt;</span>a simple test<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;update&quot;</span>&gt;</span>will be updated<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span></pre></div></div>

<p>test.js</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> test <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'update'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">innerHTML</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'updated...'</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>What we have here, is the onclick JavaScript event checking the return type of the test function.</p>
<p>In this case, we are returning false, therefore, we will not follow the hyperlink, but update the content dynamically using JavaScript.</p>
<p>This is very useful when using AJAX, if something goes wrong, we can return true so the browser knows to follow the hyperlink (web 1.0 style). If all goes well, we can return false (web 2.0 style) and update the content dynamically. Then of cause, if JavaScript is disabled, it will follow the hyperlink automatically.</p>
]]></content:encoded>
			<wfw:commentRss>http://rezolabs.com/web-development/combining-web-20-with-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gedit Plugins</title>
		<link>http://rezolabs.com/web-development/gedit-plugins/</link>
		<comments>http://rezolabs.com/web-development/gedit-plugins/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 08:04:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[gedit]]></category>
		<category><![CDATA[gnu/linux]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[plugins]]></category>

		<guid isPermaLink="false">http://rezolabs.com/?p=12</guid>
		<description><![CDATA[Software Freedom Day was held on Saturday 20th September. It was a chance to raise more awareness of GNU/Linux and free software. I got involved with the day, and setup an awareness stand with my friend Jake. We burnt off about 25 copies of Ubuntu, 10 copies of Open Disc (containing OpenOffice, Firefox and more free software), and about 5 copies of Open Education disc, which contained free educational software for students.

The day went from 10am till 4pm. Software Freedom Day for our team consided of a few lengthy discussions based on GNU/Linux, showing off the Compiz-Fusion project, demonstrating a few features of OpenOffice, and of course, teaching some newcomers what GNU/Linux is about.]]></description>
			<content:encoded><![CDATA[<p>The text editor gedit is part of the GNOME desktop environment, which I happen to use currently. One really nice feature about this GUI text editor, is the fact it supports Python and C plugins.</p>
<p>So, I thought I&#8217;d take my time to share some useful plugins which I&#8217;ve been using. Also, below the list, you can find out how to install a plugin.</p>
<p>Embeded Terminal</p>
<p>This is a nice plugin, it gives you a small terminal within gedit. Of cause you could just tab into your terminal, within another window. But it&#8217;s nice to have one built in.</p>
<p>External Tools</p>
<p>Very useful plugin, allows you to create a shortcut to an external tool. For instance, if you want to run make, or execute the current source code file, you can do so using the external tools plugin. Simple to setup, and has a few pre-made examples which you can use.</p>
<p><a href="http://live.gnome.org/Gedit/Plugins?action=AttachFile&amp;do=view&amp;target=fullscreen-2006-07-13.tar.bz2">Fullscreen</a></p>
<p>Have you ever wanted gedit to be fullscreen, or generally code in fullscreen mode. This plugin will be handy for you. You still have all the features of the text editor, but it&#8217;s fullscreen and without the window decoration.</p>
<p>Indent Lines</p>
<p>A standard plugin, which comes with gedit itself.</p>
<p><a href="http://vaem.googlecode.com/files/gedit2_regex_replace_plugin.tar.gz">Regex Search and Replace</a></p>
<p>Very useful, and is an essential for every text editor. Use regular expressions for searching and substitution of text.</p>
<p>Snippets</p>
<p>Another standard plugin, yet one I can&#8217;t live without. Makes life so much easier. Snippets allows you to make little auto-complete code snippets. Where, say you type &#8220;inc&#8221;, it could translate to &#8220;#include &lt;$0&gt;&#8221; when tab-completed.</p>
<p>Installing a Plugin</p>
<p>Once you have downloaded the plugin you want, extract it. For instance:</p>
<p>tar zxvf plugin-name.tar.gz</p>
<p>Then, `cp` the extracted contents to ~/.gnome2/gedit/plugins/. For me, this directory location didn&#8217;t exist, so create it if it doesn&#8217;t exist.</p>
<p>Reload gedit, go to Edit -&gt; Preferences, and enable your plugins within the plugin tab.</p>
<p>Extra Plugins</p>
<p>Also, you can get extra official gedit plugins from the Debian / Ubuntu repository.</p>
<p>apt-get install gedit-plugins</p>
<p>Note</p>
<p>External links are only for those plugins which were created by 3rd party.</p>
<p>Happy hacking!</p>
]]></content:encoded>
			<wfw:commentRss>http://rezolabs.com/web-development/gedit-plugins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Memcache with PHP</title>
		<link>http://rezolabs.com/web-development/using-memcache-with-php/</link>
		<comments>http://rezolabs.com/web-development/using-memcache-with-php/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 07:42:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[gnu/linux]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[memcache]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://rezolabs.com/?p=1</guid>
		<description><![CDATA[It's been at the back of my mind for a while, using objects from cache, without destructing them, and only initializing them once.

Many thanks to Memcache this is now possible. Memcached (daemon) stores arrays, objects and variables in memory available for clients to access them at any time. This speeds up the process of a web application a lot. Instead of having to create a new object each time the page is loaded, you can simply retrieve the desired object from Memcache and operate on it normally.]]></description>
			<content:encoded><![CDATA[<div class="content">
<p>It&#8217;s been at the back of my mind for a while, using objects from cache, without destructing them, and only initializing them once.</p>
<p>Many thanks to Memcache this is now possible. Memcached (daemon) stores arrays, objects and variables in memory available for clients to access them at any time. This speeds up the process of a web application a lot. Instead of having to create a new object each time the page is loaded, you can simply retrieve the desired object from Memcache and operate on it normally.</p>
<p>Memcache was fairly easy to get up and running to. Since I&#8217;m on Debian (lenny/sid), I was able to get it from the repository (apt-get install memcache). Or you can always compile it from source. Once that was setup, I then installed the memcache PHP extension, php5-mod-memcache, to allow PHP to interact with the Memcache daemon (memcached CLI).</p>
<p>There are some really nice features about Memcache, for instance, it allows you to use a pool of computers, perhaps a rack of hard drives, and to run a copy of Memcache on each of these. Therefore, using Memcache on the network across multiple machines.</p>
<p>Since this is just a testing server and development laptop, I was happy with the default memory allocation setting for Memcache, which is 64mb. Not that I&#8217;ll use it all! (Maybe for extreme cases for stress testing / benchmarking). The maximum recommended size for each instance of Memcache is 2gb of allocated memory, which is really only useful for a production server, within a data center or the like.</p>
<p>Memcache also has a limit of 1mb for any given array, object or variable. Which is very useful, as this would most likely help prevent memory leaks and what not.</p>
<p>The Memcache daemon is fairly easy to get up and running too, with the -h parameter on a Unix box, you get the CLI argument options. I went pretty much default on this, with the extra -v and -vv for full verbose mode. This allowed me to see if everything was working correctly, which it was.</p>
<p>Overall, Memcache is an excellent new addition to my web development environment, and will hopefully use it for a long time!</p></div>
]]></content:encoded>
			<wfw:commentRss>http://rezolabs.com/web-development/using-memcache-with-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
