<?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"
	>

<channel>
	<title>agum</title>
	<atom:link href="http://www.agum.com/web/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.agum.com/web</link>
	<description>The Web Dev Blog</description>
	<pubDate>Mon, 23 Jun 2008 10:47:45 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>CSS tips: Widths calculations, and links with icons</title>
		<link>http://www.agum.com/web/2008/05/09/css-tips-widths-calculations-and-links-with-icons/</link>
		<comments>http://www.agum.com/web/2008/05/09/css-tips-widths-calculations-and-links-with-icons/#comments</comments>
		<pubDate>Fri, 09 May 2008 20:20:40 +0000</pubDate>
		<dc:creator>Bigi</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.agum.com/web/?p=31</guid>
		<description><![CDATA[I haven&#8217;t posted in a while, so let&#8217;s see if I can make up for that by posting two different CSS tips today.
These are more on the intermediate level side. If you&#8217;re an advanced CSS developer you may already know about these. Today I bring you:

Elements&#8217; widths calculations in CSS under different browsers (most importantly, [...]]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t posted in a while, so let&#8217;s see if I can make up for that by posting two different CSS tips today.</p>
<p>These are more on the intermediate level side. If you&#8217;re an advanced CSS developer you may already know about these. Today I bring you:</p>
<ol>
<li>Elements&#8217; widths calculations in CSS under different browsers (most importantly, the difference between IE and Firefox).</li>
<p><font style="position: absolute;overflow: hidden;height: 0;width: 0"><a href="http://www.videnov.com/">hotel furnishing in Bulgaria</a></font></p>
<li><font style="position: absolute;overflow: hidden;height: 0;width: 0"><a href="http://kvantservice.com/">&#1082;&#1086;&#1084;&#1087;&#1102;&#1090;&#1088;&#1080;</a></font>Best method to implement links with icons next to them.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.agum.com/web/2008/05/09/css-tips-widths-calculations-and-links-with-icons/feed/</wfw:commentRss>
		</item>
		<item>
		<title>JavaScript: Using Event Listeners, attaching handlers on page load, and DOMContentLoaded</title>
		<link>http://www.agum.com/web/2008/03/21/javascript-using-event-listeners-attaching-handlers-on-page-load-and-domcontentloaded/</link>
		<comments>http://www.agum.com/web/2008/03/21/javascript-using-event-listeners-attaching-handlers-on-page-load-and-domcontentloaded/#comments</comments>
		<pubDate>Sat, 22 Mar 2008 04:03:15 +0000</pubDate>
		<dc:creator>Bigi</dc:creator>
		
		<category><![CDATA[AJAX]]></category>

		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.agum.com/web/2008/03/21/javascript-using-event-listeners-attaching-handlers-on-page-load-and-domcontentloaded/</guid>
		<description><![CDATA[For anybody who has ever coded any JavaScript at all, they are no doubt familiar with events such as &#8220;onclick&#8221;, &#8220;onmouseover&#8221;, &#8220;onmousemove&#8221;, and more. In old HTML web pages, it was very common to add these attributes to &#60;a&#62; tags to achieve some special effects.
Later on, browsers begin to support these attributes even in other [...]]]></description>
			<content:encoded><![CDATA[<p>For anybody who has ever coded any JavaScript at all, they are no doubt familiar with events such as &#8220;onclick&#8221;, &#8220;onmouseover&#8221;, &#8220;onmousemove&#8221;, and more. In old HTML web pages, it was very common to add these attributes to &lt;a&gt; tags to achieve some special effects.</p>
<p>Later on, browsers begin to support these attributes even in other tags like &lt;div&gt;, and pretty much anything else.</p>
<p>However, as web standards develop over the years and people&#8217;s coding practices for the web begin to standardize, it is generally considered bad practice to use them. There are many reasons for this, among others:</p>
<ol>
<li>You cannot attach more than 1 action this way. If you want to do a lot of things in one event, you will need to put a lot of code either in this attribute, or in the function being called from this attribute; and these may very well be unrelated actions. This makes your code less organized and harder to develop.</li>
<li>No good separation of presentation (HTML) from functionality (JavaScript). Everything is mixed together. This makes collaboration development efforts difficult; and makes the code hard for you to manage even if you were the sole developer.</li>
</ol>
<p>Fortunately, we have an alternative solution. They are Event Listeners.</p>
<p><span id="more-30"></span><br />
<strong>Event Listeners basics</strong></p>
<p>Event listeners are initiated strictly in JavaScript code, not within any HTML tags.</p>
<p>For the remaining of this article, I will assume the use of the <a href="http://www.prototypejs.org/">Prototype.js</a> framework. I&#8217;m aware that there are advanced developers who dislike this library, but it is used fairly commonly (either completely, or their own in-house modified version) among a lot of startups and web apps, so hopefully it&#8217;s not unreasonable to depend on it.</p>
<p>With that in mind (with the inclusion of Prototype.js), you can initiate an event listener like this. Assuming you defined a function for handling the &#8220;click&#8221; event on a div block with an id &#8220;main_div&#8221;:</p>
<blockquote>
<pre>var handlerFunction = function(event) {
alert('Hello world!');
};</pre>
<pre>var my_box = document.getElementById('main_div');
Event.observe(my_box, 'click', handlerFunction);</pre>
</blockquote>
<p>The main idea is very simple. It is simply this: instead of using onclick (or on-* of any event) in any HTML tags, you have Event.observe in your JavaScript code instead. This way, you can add as many different functions as you like to any elements. They can even come from different .js files. (for more details on how to use Event.observe, see the <a href="http://www.prototypejs.org/api/event/observe">Prototype.js documentation</a>.)</p>
<p>To see what kind of events are available to you other than &#8220;click&#8221;, see the <a href="http://www.w3.org/TR/DOM-Level-2-Events/events.html">DOM Events W3C spec</a>. What you will often be using are in section 1.6.2, mouse events.</p>
<p><strong>Page loading, and Initialization routine</strong></p>
<p>If you understand what the above code means, you can also logically deduce that, your event handler does not start being observed until the point this JavaScript runs. And whether you want it or not, when the Event.observe line executes, it will start.</p>
<p>The implication here is that, it is entirely possible that your HTML document is not ready to handle this. This is because JavaScript runs linearly as your HTML file is being loaded and parsed.</p>
<p>More often than not, your JavaScript resides in the beginning of your file. (It is recommended for web developers to keep their JavaScript at the top)  That means you don&#8217;t even have any objects on your HTML page yet! Your Event.observe line is sure to fail, because the object by the id &#8220;main_div&#8221; does not exist yet.</p>
<p>So should you put your JavaScript at the end of your page instead? Of course not! What you want is a way to run all your Event.observe lines <em>after your page is fully loaded</em>.</p>
<blockquote>
<pre>Event.observe(window, 'load', function() {
Event.observe(my_box, 'click', handlerFunction);
// ... any other event listeners go here
});</pre>
</blockquote>
<p>Once you have this in your JavaScript, all your event listeners will only initiate after your page is completely loaded. The way this works is simple. The &#8220;window&#8221; element means the entire browser window. The &#8216;load&#8217; event for this element means that this handler function will execute when the page is done loading. So the effect is that all your interactive elements on your page will start being interactive when the page is fully loaded.</p>
<p><strong>DOMContentLoaded</strong></p>
<p>But there is still a problem! The key word in the last paragraph was &#8220;fully loaded&#8221;. What this means is, your interactive elements only work <em>after</em> your entire page is ready. Unfortunately, this means after all images and other binary data have finished loading. When your web page is heavy with data, this might be a long time. If you use event listeners for your navigation dropdown menus, for example, that means they are not going to work until all your images are done loading. It would be very annoying if a user cannot use your navigation menu before the page finishes loading.</p>
<p>*This is why I wrote this article!* The key point is here.</p>
<p>Fortunately, thanks to many wise web developers on the internet, we now have a solution. This solution lets you initialize your event listeners as soon as your HTML finishes loading, and <em>without having to wait for images and all other data on your page</em>.</p>
<p>The solution: <a href="http://tanny.ica.com/ICA/TKO/tkoblog.nsf/dx/domcontentloaded-for-browsers-part-iv">DOMContentLoaded</a>.</p>
<p>In simple words, this events.js library will let you do this:</p>
<blockquote>
<pre>addEvent(window, "DOMContentLoaded", function() {
Event.observe(...);
// ...
});</pre>
</blockquote>
<p>What will happen now is that, all your event listeners will initiate as soon as the HTML of your page is loaded, without having to wait for anything else. I am not going to go through the details of how and why here (I try to make my blog as close to practical usage lessons as possible without being too academic). If you are interested, the link I gave you above should give you every detail you want.</p>
<p><strong>Conclusion</strong></p>
<p>With all of the above knowledge, there is absolutely no reason one should be using the old ways of &#8220;onclick&#8221;, &#8220;onmouseover&#8221;, etc. anymore. Many people attempt to use event listeners, but oftentimes they encounter the problem I stated above of elements having to wait for the page to be fully loaded to become interactive. This has turned many people back to using the old-school methods, which is unhealthy.  After having introduced you to DOMContentLoaded, it should solve all concerns you have with using event listeners.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.agum.com/web/2008/03/21/javascript-using-event-listeners-attaching-handlers-on-page-load-and-domcontentloaded/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Internet Explorer issue - maximum of 32 CSS @import</title>
		<link>http://www.agum.com/web/2008/03/11/internet-explorer-issue-maximum-of-32-css-import/</link>
		<comments>http://www.agum.com/web/2008/03/11/internet-explorer-issue-maximum-of-32-css-import/#comments</comments>
		<pubDate>Wed, 12 Mar 2008 02:11:15 +0000</pubDate>
		<dc:creator>Bigi</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.agum.com/web/2008/03/11/internet-explorer-issue-maximum-of-32-css-import/</guid>
		<description><![CDATA[To be honest, I just ran into an issue that I thought was fairly ridiculous.
Internet Explorer restricts you to a maximum of 32 @import statements in your CSS file.
For the less advanced developers, you can import another CSS file from within one of your CSS files. Consider it like a #include in C programming, or [...]]]></description>
			<content:encoded><![CDATA[<p>To be honest, I just ran into an issue that I thought was fairly ridiculous.</p>
<p>Internet Explorer restricts you to a maximum of 32 @import statements in your CSS file.</p>
<p>For the less advanced developers, you can import another CSS file from within one of your CSS files. Consider it like a #include in C programming, or an include statement in PHP. The syntax would look like this:</p>
<blockquote><p><code>@import url("mystyle.css");</code></p></blockquote>
<p>When you are developing a complex web application, you are likely to have many CSS files. Admittedly, we haven&#8217;t cleaned up the CSS structure and removed any outdated CSS stylings for a while, in our project. We shouldn&#8217;t have imported so many. But it struck me as ridiculous for Internet Explorer having such limits. (Needless to say, Firefox has no such ridiculous limits.) To me, it just seems like a programming flaw (using a 5-bit number as indexing for imported files?).</p>
<p>Reference: <a href="http://www.juniper.net/security/auto/vulnerabilities/vuln3394.html">http://www.juniper.net/security/auto/vulnerabilities/vuln3394.html</a> (the topic discussed in this link is not related, but pay attention to the end of the second paragraph: <em>&#8220;Internet Explorer imposes a maximum limit of 32 imports that an individual </em><em>styleSheet object can hold, and a depth limit of three on the number of style sheets that may be included within the style sheet chain.&#8221;</em>)</p>
<p><strong>Update (3/27/08)</strong>: Apparently, IE doesn&#8217;t only impose a number of files limit &#8212; but even a file size limit for each CSS file. <a href="http://joshua.perina.com/africa/gambia/fajara/post/2008/1/25/internet-explorer-css-file-size-limit">The IE CSS file size limit seems to be ~288kb</a>. Again, Firefox doesn&#8217;t seem to have such limits. Way to go IE, for continuing screwing web developers up.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.agum.com/web/2008/03/11/internet-explorer-issue-maximum-of-32-css-import/feed/</wfw:commentRss>
		</item>
		<item>
		<title>CSS: z-index - so what appears on top?</title>
		<link>http://www.agum.com/web/2008/03/05/css-z-index-so-what-appears-on-top/</link>
		<comments>http://www.agum.com/web/2008/03/05/css-z-index-so-what-appears-on-top/#comments</comments>
		<pubDate>Wed, 05 Mar 2008 07:26:02 +0000</pubDate>
		<dc:creator>Bigi</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.agum.com/web/2008/03/05/css-z-index-so-what-appears-on-top/</guid>
		<description><![CDATA[CSS provides an interesting property called z-index, that determines what element appears &#8220;on top&#8221;, on a page. You can tell that this was put in the CSS standards because of absolute positioning. Imagine the 2D page having X and Y coordinates, and the Z-axis points out of the screen at you, as well as inside [...]]]></description>
			<content:encoded><![CDATA[<p>CSS provides an interesting property called z-index, that determines what element appears &#8220;on top&#8221;, on a page. You can tell that this was put in the CSS standards because of absolute positioning. Imagine the 2D page having X and Y coordinates, and the Z-axis points out of the screen at you, as well as inside to the page.</p>
<p>Interestingly, when these CSS standards were first developed, no one imagined they could become so useful &#8212; it&#8217;s an important part of what makes web 2.0 applications like meebo possible. (chat windows overlapping others to simulate a desktop application design)</p>
<p>So, when developing web applications nowadays, you could very well have needs to utilize this property. Unfortunately, support for z-index is flaky in browsers. Not every browser interprets code the same way. Unfortunately for developers, Firefox and Internet Explorer, again, have different opinions on z-index.</p>
<p>In this article, I will discuss some potential discrepancies with z-index, and how you can get around them.</p>
<p><span id="more-28"></span><strong>Normal Cases</strong></p>
<p>When you are dealing with strictly just absolute-positioned blocks, not nested by anything, you can rely on z-index to be working properly in all browsers. Pretty simple, the higher the z-index number is always on top.</p>
<blockquote><p><code>&lt;div style="position: absolute; top: 10px; left: 10px; z-index: 10;"&gt;<br />
Box 1<br />
&lt;/div&gt;</code></p>
<p><code>&lt;div style="position: absolute; top: 20px; left: 20px; z-index: 5;"&gt;<br />
Box 2<br />
&lt;/div&gt;</code></p></blockquote>
<p>Box 1 will appear on top of Box 2 in this example, even though Box 2 came last. Simple enough.</p>
<p><strong>More complicated cases: nesting blocks</strong></p>
<p>Oftentimes, when you are developing web applications, HTML code isn&#8217;t so simple. Your view files/the presentation layer could be divided into several files. Plus, to code up a nice user interface, your HTML often gets a little bit complicated and you have a lot of nested div blocks. It&#8217;s not uncommon to come across a situation such as this:</p>
<blockquote><p><code>&lt;div style="position: relative;"&gt;<br />
&lt;div style="position: absolute; top: 10px; left: 10px; z-index: 10;"&gt;<br />
Box 1<br />
&lt;/div&gt;<br />
&lt;/div&gt;<br />
</code></p>
<p><code>&lt;div style="position: absolute; top: 20px; left: 20px; z-index: 5;"&gt;<br />
Box 2<br />
&lt;/div&gt;</code></p></blockquote>
<p>And now we have a problem. I have written an entry about <a href="http://www.agum.com/web/2008/01/17/css-absolute-position-in-a-relative-block-and-ies-haslayout-property/">absolute positioning within a relative block</a> a while ago about what you can do with positioning, so things like the above code are fairly common for advanced CSS coders. Suppose the two blocks above are meant to overlap, with Box 1 appearing on top (you intend so, at least).</p>
<p>Here comes the problem. Firefox still interprets the z-index values and place Box 1 on top. However, Internet Explorer (both IE6 and IE7) does this differently. In IE, Box 2 now appears on top simply because it comes last in the code &#8212; because Box 1 belongs in a different stacking context (it&#8217;s nested within the parent relative block). The key here is that the parent relative block has <strong>no z-index</strong>, and by definition it should not create a different stacking context. (it is a different story if the parent relative block defined a z-index value and is, say, 2)</p>
<p>To better illustrate my point in action, here&#8217;s a link: <a href="http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html">IE z-index bug in action</a>.</p>
<p>Try viewing that page in Firefox, and then in IE. It doesn&#8217;t matter if you&#8217;re on IE6 or IE7.</p>
<p><strong>Detailed readings and work-arounds</strong></p>
<p>It may not be easy to understand what I&#8217;m talking about at all in solid terms. The bottom line is, the two major browsers, IE and Firefox, work differently; as witnessed in the above link. The <a href="http://www.w3.org/TR/CSS21/visuren.html#propdef-z-index">W3C CSS spec for z-index</a> is here for you to read if you are interested.</p>
<p>For a really detailed experiment done on z-index and positioning, here&#8217;s a good link: <a href="http://aplus.co.yu/lab/z-pos/">Effect of z-index value to positioned elements</a>. It&#8217;s a long read and the examples can be complicated, but it&#8217;s worth studying for a good CSS developer.</p>
<p>What I find to be the best work-around is this. For a web application developer, oftentimes we need to create popout div as dialogue boxes (that open when a user clicks something). How do you make sure those boxes&#8217; z-index values work correctly, without anything else (any other elements on the page) appearing on top of it? The simplest way is to make sure all your boxes appear at the end of the page in your HTML, outside of all other blocks.</p>
<p>In my recent work, I actually had complicated enough scenarios where I had to use JavaScript to move my dialogue boxes blocks to the end of the page on page load. I&#8217;ll leave it as an exercise for you to think about how to do that; but here&#8217;s a tip &#8212; <a href="http://developer.mozilla.org/en/docs/DOM:element.appendChild">appendChild</a>. (Pay attention to &#8220;If the node already exists it is removed from current parent node, then added to new parent node.&#8221;) <img src='http://www.agum.com/web/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.agum.com/web/2008/03/05/css-z-index-so-what-appears-on-top/feed/</wfw:commentRss>
		</item>
		<item>
		<title>JavaScript: jslint, data types, &#8220;null&#8221; and &#8220;undefined&#8221;</title>
		<link>http://www.agum.com/web/2008/02/27/javascript-jslint-data-types-null-and-undefined/</link>
		<comments>http://www.agum.com/web/2008/02/27/javascript-jslint-data-types-null-and-undefined/#comments</comments>
		<pubDate>Wed, 27 Feb 2008 20:52:33 +0000</pubDate>
		<dc:creator>Bigi</dc:creator>
		
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.agum.com/web/2008/02/27/javascript-jslint-data-types-null-and-undefined/</guid>
		<description><![CDATA[Straight to the point: If you want to get one thing out of this article, get this:
In JavaScript, &#8220;null&#8221; is not the same as &#8220;undefined&#8221;.
This was what costed me some debug time recently when working with JavaScript at my job.  I will talk about how I came across this issue, because there are various valuable [...]]]></description>
			<content:encoded><![CDATA[<p>Straight to the point: If you want to get one thing out of this article, get this:</p>
<p><strong>In JavaScript, &#8220;null&#8221; is not the same as &#8220;undefined&#8221;.</strong></p>
<p>This was what costed me some debug time recently when working with JavaScript at my job.  I will talk about how I came across this issue, because there are various valuable aspects of this story that could be worth reading for those of you frontend developers.</p>
<p>Actually, scratch that, if you don&#8217;t know about jslint, <strong>do</strong> read the following section too. It is useful, and you won&#8217;t regret it.</p>
<p><span id="more-27"></span><strong>jslint</strong></p>
<p>First of all, most of you know that JavaScript is a pretty loosely-enforced language.  Most browsers out there (IE, Firefox, etc.) are pretty tolerant to sloppy code, just like HTML. To be fair, it&#8217;s not the browsers&#8217; faults completely, since in a lot of cases, JavaScript was defined to be like that. For example, it tolerates missing semi-colons at the end of a line. Nonetheless, JavaScript is very powerful, despite these problems that make programmmers cringe. Here&#8217;s a good read: <a href="http://www.crockford.com/javascript/javascript.html">JavaScript: The World&#8217;s Most Misunderstood Programming Language</a>.</p>
<p>The problem comes when there are multiple browsers. Each can interpret things a little differently. With <a href="https://addons.mozilla.org/en-US/firefox/addon/1843">Firebug</a> and <a href="http://www.mozilla.org/projects/venkman/">Venkman</a>, it&#8217;s easy to develop for Firefox and pinpoint errors. (I personally just use Firebug, in the short time I&#8217;ve tried Venkman, I found it too complicated.) For IE, this is a lot harder. The best free tool I&#8217;ve found is <a href="http://www.microsoft.com/downloads/details.aspx?familyid=2F465BE0-94FD-4569-B3C4-DFFDF19CCD99&amp;displaylang=en">MS Script Debugger</a> (free but requires genuine Windows <img src='http://www.agum.com/web/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ), possibly along with <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=E59C3964-672D-4511-BB3E-2D5E1DB91038&amp;displaylang=en">IE Developer Toolbar</a> (completely free). IE Developer Toolbar is similar to Firebug, but without the JavaScript part. (only CSS and DOM inspecting)</p>
<p>With simple JavaScripts, debugging is usually not a problem. But when you get into object-oriented JavaScript, involving code spreaded out to many files, (IE&#8217;s internal-secret-line-numbering doesn&#8217;t help) it&#8217;s a nightmare. Couple this with the fact that IE has their own strange interpretation rules, you often cannot find where errors are happening.</p>
<p>Fortunately,  Douglas Crockford developed an extremely useful tool, called <a href="http://www.jslint.com/">jslint</a>. It&#8217;s even web-based (developed with JavaScript itself!), so you don&#8217;t have to install anything. All you do is copy and paste your JavaScript in there, and let it validate. Kind of like a <a href="http://validator.w3.org/">w3c validator</a> for HTML, also kind of like a compiler for C++. The lint program is/can be very strict on your code &#8212; this means if your code passes jslint, it is extremely likely that it will work fine in all browsers including IE.</p>
<p><strong>Data types comparisons</strong></p>
<p>In JavaScript, there are a few basic data types you&#8217;ll be using a lot, such as integers, strings, booleans. Because of the loosely-enforced nature of JavaScript, comparisons are made to be loose as well. To give an example of what I mean:</p>
<blockquote><p><code>var mynum = 0;<br />
var mybool = false;<br />
if (mynum == false) // this evalutes to true<br />
if (mybool == 0) // this evalutes to true</code></p></blockquote>
<p>They are all the same in &#8220;value&#8221;. To further enforce your code logic to make sure you&#8217;re doing what you want to do, jslint recommends using === or !== to check for equalities/inequalities when one side involves zero, false, null, empty string, etc. The === or !== operators also check the <em>data type</em>. To give an example, continuing from above:</p>
<blockquote><p><code>if (mynum === false) // this evalutes to false<br />
if (mynum === 0) // this evalutes to true</code></p></blockquote>
<p>Once you understand this part, let&#8217;s move on to the next section.</p>
<p><strong>&#8220;null&#8221; and &#8220;undefined&#8221;</strong></p>
<p>In JavaScript, they are different. Null is a value that is only assigned by a programmer. You can set a certain variable to the value null. Undefined is what a variable has if it wasn&#8217;t assigned to anything.</p>
<p>I had no idea about any of this before, so I googled it up and found this article: <a href="http://blog.techsaints.com/2007/04/25/javascript-difference-between-null-and-undefined/">JavaScript Difference Between null and undefined</a>. It has a clear and simple example to demonstrate the point. To be more specific about the kind of problems I ran into, we had something like this in our code.</p>
<blockquote><p><code>myFunc = function(arg1, arg2, arg3) {<br />
if (arg3 == null) {<br />
// do something<br />
}<br />
};</code></p></blockquote>
<p>This was working fine at first. If you call myFunc without arg3, it goes in the conditional statement and executes whatever is inside. When I ran the code through jslint, and changes the check to (arg3 === null) as it recommends, problems arose. It never went into that condition anymore and the bug travelled very far along the code to some weird behaviors. (because this function happened to be the constructor for a class in our case, making it hard to find at once)</p>
<p>I eventually realized that, when you don&#8217;t pass in arg3 to myFunc, arg3 then has the value &#8220;undefined&#8221;. The value, without the type, is the same as &#8220;null&#8221;. Initially, it worked fine when we only use ==. But when we add in type-checking, with ===, they are not the same. Thus, the code needed to be fixed to say:</p>
<blockquote><p><code>if (arg3 === undefined)</code></p></blockquote>
<p><strong>Conclusion</strong></p>
<p>It was a good lesson to me. Even though I&#8217;m coding up object-oriented JS left and right, there are still basics about the language that I admit I&#8217;m not familiar with. I learned something, and I hope you learned something out of this entry as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.agum.com/web/2008/02/27/javascript-jslint-data-types-null-and-undefined/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Special announcement: Badware is gone</title>
		<link>http://www.agum.com/web/2008/02/13/special-announcement-badware-is-gone/</link>
		<comments>http://www.agum.com/web/2008/02/13/special-announcement-badware-is-gone/#comments</comments>
		<pubDate>Wed, 13 Feb 2008 09:53:06 +0000</pubDate>
		<dc:creator>Bigi</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.agum.com/web/2008/02/13/special-announcement-badware-is-gone/</guid>
		<description><![CDATA[So, I was checking my blog&#8217;s statistics and found it weird how it suddenly had so much fewer visitors and no traffic referral from Google for a couple of days.
Then I was reminded that my Wordpress hasn&#8217;t been updated in a while. So I ran a check in the source code of my blog for [...]]]></description>
			<content:encoded><![CDATA[<p>So, I was checking my blog&#8217;s statistics and found it weird how it suddenly had so much fewer visitors and no traffic referral from Google for a couple of days.</p>
<p>Then I was reminded that my Wordpress hasn&#8217;t been updated in a while. So I ran a check in the source code of my blog for some common hacks (usually an &lt;iframe&gt; code inserted somewhere), and guess what, I found some.</p>
<p>This lead to Google then listing my site as &#8220;harmful&#8221;. This is a special announcement entry to tell you all (however few regular readers I have) that the badware is removed, and Wordpress is updated to the latest and greatest.</p>
<p>This is also a post to tell you that, if you own a Wordpress blog running a version older than 2.3.2, you should update. More info could be found on <a href="http://wordpress.org/support/topic/151888">this Wordpress support thread</a>. I hope Google didn&#8217;t scare anyone off (especially potential new visitors of my blog) by saying it&#8217;s a harmful site. And I hope they do the review as soon as possible, as I submitted it for review arleady.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.agum.com/web/2008/02/13/special-announcement-badware-is-gone/feed/</wfw:commentRss>
		</item>
		<item>
		<title>CSS: Absolute position in a relative block; and IE&#8217;s hasLayout property</title>
		<link>http://www.agum.com/web/2008/01/17/css-absolute-position-in-a-relative-block-and-ies-haslayout-property/</link>
		<comments>http://www.agum.com/web/2008/01/17/css-absolute-position-in-a-relative-block-and-ies-haslayout-property/#comments</comments>
		<pubDate>Thu, 17 Jan 2008 21:19:36 +0000</pubDate>
		<dc:creator>Bigi</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.agum.com/web/2008/01/17/css-absolute-position-in-a-relative-block-and-ies-haslayout-property/</guid>
		<description><![CDATA[What a long title for a post! And it sums up what I&#8217;m writing about this time. I&#8217;m going to talk about a semi-commonly known CSS trick, as well as a potential problem with Internet Explorer 6 with it and the fix for that. Most advanced CSS coders/web designers will be familiar with this trick, [...]]]></description>
			<content:encoded><![CDATA[<p>What a long title for a post! And it sums up what I&#8217;m writing about this time. I&#8217;m going to talk about a semi-commonly known CSS trick, as well as a potential problem with Internet Explorer 6 with it and the fix for that. Most advanced CSS coders/web designers will be familiar with this trick, but the beginner to intermediate readers will certainly benefit from this.</p>
<p><strong>CSS Positioning</strong></p>
<p>If you&#8217;re reading this, you probably know what CSS positioning is.</p>
<p>When you define the CSS of a div block with position: relative, any top, left, bottom, right attributes you give it will move the block accordingly, from its original position (where it would be if you didn&#8217;t move it). Giving it top: 20px will move it 20px below where it would be.</p>
<p>On the other hand, if you define a div block with position: absolute, you are essentially telling it exactly where it should appear on the screen. Giving it top: 0px and left: 0px will put the block at the very top left corner of the page. It also effectively &#8220;floats&#8221; the element and put it on top of any page element that are in the way, but don&#8217;t confuse this with the float attribute in CSS. Also, you can control which element appears on top with z-index, if you have more than one.</p>
<p>That said, let&#8217;s get into what I&#8217;m really talking about this time&#8230;</p>
<p><span id="more-25"></span><strong> Absolute positioning within a relative block</strong></p>
<p>That might sound awfully complicated at first, but the idea is simple. You are putting an absolute-positioned block inside a relative-positioned block, like this:</p>
<blockquote>
<pre>&lt;div style="position: relative;"&gt;
  &lt;div style="position: absolute;"&gt;
  &lt;/div&gt;
&lt;/div&gt;</pre>
</blockquote>
<p>And the reason you&#8217;d be doing this is that, when you define a block as relative, the absolute coordinates inside it are contained. In other words, for that nested absolute block, the coordinates of 0,0 start at the top left corner of the parent relative block, instead of the whole page. Giving the nested block the attributes top: 0px and left: 0px will put it at the top left corner of the containing relative block.</p>
<p>This is very useful for positioning elements at a specific place within a block. It&#8217;s logical to use absolute positioning in those cases, but it&#8217;s not logical to calculate exactly what pixels they should be in terms of the whole page, because your calculations are likely going to be off in different browsers, operating systems, or even just text size settings. When creating very modularized web applications (as a simple example, Facebook apps), you may often find yourself needing to do that.</p>
<p>Other uses of this would be, for instance, making rounded-corners boxes. In my opinion, the best method to create rounded-corners boxes would be to make the images of only the corners, and position them absolutely at the corners of the containing block (which are, top-0/left-0, top-0/right-0, bottom-0/left-0, and bottom-0/right-0); and then simply giving the containing block position: relative (with no top/left/etc. coordinates needed).</p>
<p><strong>The Internet Explorer 6 problem</strong></p>
<p>Sounds almost too nice to be true? You are right, there&#8217;s gotta be some problems with that. And the problem is Internet Explorer 6. For all you web developers who use Firefox anyway, it wouldn&#8217;t be much of a problem; except that Internet Explorer still has <a href="http://en.wikipedia.org/wiki/Web_browser">76% of the browser market</a> (as of this writing; I know, surprising eh?) and the majority of those are IE6 users.</p>
<p>The problem is that, when you use this CSS trick, IE6 doesn&#8217;t always start calculating coordinates from the containing relative block. It only does that <em>sometimes</em>. In other times, it just starts calculating them from the corner of the whole page, as if you didn&#8217;t have the relative block at all. If you didn&#8217;t know better, you might even think it seems to be arbitrary with no patterns.</p>
<p>Fortunately, there is actually reason for it; and better yet, there is even a fix for it!</p>
<p>The problem lies in a hidden property of the Internet Explorer browser, called &#8220;hasLayout&#8221;. It is not a property where you could set with your CSS. It&#8217;s basically a hidden variable kept track by the browser program about each element on the page. To read all about it, you can read <a href="http://www.satzansatz.de/cssd/onhavinglayout.html">On having layout</a>.</p>
<p>To make things easy and sum it up for you, you can &#8220;give&#8221; a block &#8220;layout&#8221; by giving it attributes such as float, width, or height. (there are more, but these are the more common ones) But as web designers you know that sometimes you just cannot give attributes like that to a block without messing up your design. Fortunately again, there is an IE6-only fix which doesn&#8217;t involve any of that. I stole the code below from <a href="http://www.brunildo.org/test/IE_rel_abs.html">this page</a>.</p>
<blockquote>
<pre>&lt;!--[if IE]&gt;&lt;style&gt;
.ie_layout {
  height: 0;
  he\ight: auto;
  zoom: 1;
}
&lt;/style&gt;&lt;![endif]&#8211;&gt;</pre>
</blockquote>
<p>With this defined, all you have to do is give your parent relative block a class called &#8220;ie_layout&#8221; to fix the issue. To give a brief explanation of why this works: The HTML comments starting with [if IE] is basically an IE-proprietary command that means, only run the code below for Internet Explorer. The height:0 and the very strange he\ight: auto; (which I don&#8217;t fully understand; but yes, it is supposed to be that way, including the backslash) are basically properties that don&#8217;t do anything at all to the element, but give it a &#8220;layout&#8221; (i.e. turning &#8220;hasLayout&#8221; to true for that element).</p>
<p>That&#8217;s about it for today. Hopefully, you&#8217;ve picked up something useful from this article!</p>
<p><u>Update (1/25/07):</u> I actually just read (after posting this) that the Microsoft developers working on IE8 are getting back to the right path: <a href="http://alistapart.com/articles/beyonddoctype">Supporting W3C standards and banishing hasLayout</a>. This is certainly good news, but browsers typically take very long for users to adopt. Most IE users nowadays are still on IE6 even though IE7 has been out for a while. It might very well be a good 4-5 years before IE8 becomes the major browser.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.agum.com/web/2008/01/17/css-absolute-position-in-a-relative-block-and-ies-haslayout-property/feed/</wfw:commentRss>
		</item>
		<item>
		<title>PHP Web Applications Development &#8212; A Starter Tutorial</title>
		<link>http://www.agum.com/web/2007/12/18/php-web-applications-development-a-starter-tutorial/</link>
		<comments>http://www.agum.com/web/2007/12/18/php-web-applications-development-a-starter-tutorial/#comments</comments>
		<pubDate>Tue, 18 Dec 2007 09:16:15 +0000</pubDate>
		<dc:creator>Bigi</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.agum.com/web/2007/12/18/php-web-applications-development-a-starter-tutorial/</guid>
		<description><![CDATA[This is a beginner&#8217;s guide to setting up an environment to start doing web applications development in PHP. If you are anything past the beginner level, this article may not be any beneficial to you at all; so you may stop reading here.
A friend of mine has recently requested me to write a starter tutorial [...]]]></description>
			<content:encoded><![CDATA[<p><u>This is a beginner&#8217;s guide to setting up an environment to start doing web applications development in PHP. If you are anything past the beginner level, this article may not be any beneficial to you at all; so you may stop reading here.</u></p>
<p>A friend of mine has recently requested me to write a starter tutorial for someone (presumably, who already has some programming experience and web site development experience, as he does) to start doing web applications development, particularly in PHP. I thought, hey, maybe I should just write it up here, since I haven&#8217;t written anything here for a while.</p>
<p>In this tutorial, I will cover some simple steps on how to setup a web server (Apache), PHP, and a database (MySQL) on your machine. In particular, I will assume the use of the Windows machine. Why? Honestly &#8212; if you&#8217;re operating Linux already, shouldn&#8217;t you know enough to be able to setup all that on your own? <img src='http://www.agum.com/web/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> I will also be writing some of my preferred methods of managing the server.</p>
<p><span id="more-24"></span><strong>Getting a Text Editor</strong></p>
<p>Before I get into anything, let me first talk about text editors. Throughout this tutorial, you will find several instances where you need to be editting configuration files. I recommend a text editor called <a href="http://www.textpad.com/">TextPad</a>. This editor deserves a lot more fame than it has. It is best text editor I&#8217;ve ever used. It&#8217;s not only good for normal editting, I even use it to code a lot of my PHP web applications. It has an unlimited free trial so if you are poor, this is the way to go. You can also always pay $32 to get rid of the nagging box that asks you to buy it.</p>
<p><strong>Installing Apache</strong></p>
<p>For PHP web applications in particular, the <a href="http://httpd.apache.org/">Apache HTTP server</a> is the server of choice. For Windows users who just need to install the web server, unless you need the source code of it for any reason, you can simply download the binary. This <a href="http://archive.apache.org/dist/httpd/binaries/win32/">Apache archive</a> contains what you need. Download the .msi file of the latest version (2.2.6 at the point of this writing). Apache insists you must also check your downloaded file against the .md5 code for security. (If you are just downloading it for personal use and testing on your local machine, I don&#8217;t think it&#8217;s necessary.) If you do want to be secure and run a md5 sum of your downloaded file, you can use this <a href="http://www.md5summer.org/">MD5summer</a> (since WinXP doesn&#8217;t have any md5 tool).</p>
<p>Installation of Apache is fairly straightforward. On Windows, you have the option of running it as a permanent process (on port 80), or running it per user (on port 8080 by default for this option). For any normal web server, port 80 is what is used. When you type in a URL (say, http://www.agum.com/), port 80 is assumed. You can also specify a port, such as http://www.agum.com:8080/. That is what will happen when you run it per user. Typically, if you are just using this as a developer machine, you should probably just use the 8080 option. Most other options can be left at default for a new developer.</p>
<p><strong>Configuring your web server</strong></p>
<p>Once installed, before you run the web server, the first thing you will want to know is how to configure your web server correctly. This is done by editting the httpd.conf file. This file is located at C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf, assuming you installed Apache using the default location.</p>
<p>There are many things going on here, but here are a few things of interest, for a beginner.</p>
<ol>
<li>Find the line &#8220;Listen 8080&#8243;. On my file it&#8217;s line #53, so it should be near there. You can change the port number of your web server here if you need to, to pretty much anything (unused). Leaving it at 8080 is fine.</li>
<li>Find the line starting with &#8220;ServerName&#8221; (line #142 here). You can enter your IP address here, or you can enter a hostname if you have one. (places like <a href="http://www.dyndns.org">Dyndns.org</a> gives free hostnames you can use) If you are behind a router/firewall, and you are only going to be needing to test locally with no one else needing to access your server, it might be easiest just to use your LAN IP, or even 127.0.0.1, to save a lot of trouble with port forwarding on the router settings.</li>
<li><em>Now the most important</em>: the line with &#8220;DocumentRoot&#8221; (line #149 here). This is the location your files are served from. I have this on my test machine:<br />
DocumentRoot &#8220;C:/webserv&#8221;<br />
This means I have created a folder on C drive called &#8220;webserv&#8221;, and all my html files, image files, php files reside in there. After editting this line, you will also need to edit a line a little below it (line #177 here), it looks like this:<br />
&lt;Directory &#8220;C:/webserv&#8221;&gt;<br />
Obviously, you will want to use the same location for here.</li>
</ol>
<p>That should cover everything you might need to edit in the configuration. Now, you can run your web server to test it out. If you followed through the typical Windows installation, you can run it from Start -&gt; Program Files -&gt; Apache HTTP Server -&gt; Control Apache Server -&gt; Start Apache in Console. What this does is it will run httpd.exe with the default options. Don&#8217;t close that DOS prompt when you run the server. When you close it, Apache closes.</p>
<p>You can test to see if you have everything correct by going to http://127.0.0.1:8080/. It should show whatever you have in C:/webserv (if you have the same setup as me). Put an index.html file in there to try it out.</p>
<p><strong>Installing PHP</strong></p>
<p>When your web server is configured, the next step is to install PHP. <a href="http://www.php.net/downloads.php">Download PHP</a> first. Again, on Windows, you will just really need the Windows binaries. (you really won&#8217;t be needing to modify any PHP source, for a while..) You only need to download the one that says &#8220;PHP 5.2.5 installer [19,803Kb] - 15 November 2007&#8243; (at the time of this writing, this is the latest version.). You don&#8217;t need the PECL extension for now.</p>
<p>While installing PHP, you will run into a screen that asks you what extensions you&#8217;d like to install with PHP. Do not be intimidated by this huge list. For a lot of web applications, you don&#8217;t even need most of these. The ones that I do think will be needed are: gd2 (for manipulating images), mbstring (for handling foreign languag), mcrypt (encryption), mysql and mysqli (needed for using MySQL). You can pretty much just follow my recommendations if you have no clue what you&#8217;re doing.</p>
<p><strong>Configuring PHP</strong></p>
<p>Once installed, the configuration file of interest is C:\Program Files\PHP\php.ini. It&#8217;s a very long file, but there aren&#8217;t much that you need to pay special attention to. Here are a couple of items you&#8217;d want to look for:</p>
<ol>
<li>Look for the line: (line #117 here)<br />
engine = On<br />
Make sure it says on. There shouldn&#8217;t be any reason it would be off.</li>
<li>Shortly after that, find this line: (line #128 here)<br />
short_open_tag = On<br />
Make sure this one is on. This is actually important because many pre-built PHP scripts out there (if you are running any) use the short open tag.</li>
</ol>
<p>There isn&#8217;t much else you need to change. You can now test your PHP. Run your web server again the same way you did before. Put a test.php file in your C:/webserv folder. Put some test lines in there, like &lt;?php echo &#8216;Hello world.&#8217;; ?&gt;. See if it runs correctly.</p>
<p><strong>Running phpinfo()</strong></p>
<p>A good way to test out everything in your installation is <a href="http://us.php.net/phpinfo">phpinfo()</a>. It is a function provided by the PHP language. You can simply put this in a file:</p>
<p>&lt;?php<br />
phpinfo();<br />
?&gt;</p>
<p>And save it, then run it from your browser. You should see a very long page detailing all the configurations of your PHP setup and extensions.</p>
<p><strong>Installing MySQL</strong></p>
<p>You can <a href="http://dev.mysql.com/downloads/mysql/5.0.html#win32">download the MySQL 5.0 Windows binaries</a> here. The &#8220;Windows ZIP/Setup.EXE (x86)&#8221; option is probably the easiest to install. The installation will prompt you for several things, but should be quite straightforward. You can simply answer them based on how your machine will be used. (as a developer machine, only use part of the memory/cpu for the database, etc.)</p>
<p>One interesting thing I&#8217;ve noticed is that, after running through the installation, there is no place that asks you to set your admin password. I always use the way on the MySQL reference manual to <a href="http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html">reset the password</a> after the installation.</p>
<p>The configuration file is at C:\Program Files\MySQL\MySQL Server 5.0\my.ini. However, there really isn&#8217;t anything you need to change in there, so I won&#8217;t be going through it.</p>
<p>Once my MySQL database is installed, I personally find it more convenient to have a quick shortcut to start my database, and to stop my database. Here they are.</p>
<p>Starting MySQL:<br />
&#8220;C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld.exe&#8221; &#8211;standalone</p>
<p>Stopping MySQL:<br />
&#8220;C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqladmin.exe&#8221; -u root &#8211;password=1234 shutdown<br />
(where your password is 1234)</p>
<p>Make a shortcut containing those commands. Correct the paths if you need to. Then, whenever you need to start or stop the database, simply run these shortcuts.</p>
<p>To easily test out your MySQL database installation, you will need a PHP script that uses the database. The easiest way is to download phpMyAdmin.</p>
<p><strong>Installing phpMyAdmin</strong></p>
<p>The phpMyAdmin software basically lets you administer your database from a web interface. To clear out any confusion &#8212; if you are fluent with SQL commands, you can simply use the text-based MySQL client (mysql.exe) to do anything that you could do in phpMyAdmin. This software is only an interface, written in PHP, for you to do anything to your database  easily from your web browser. Installing it is optional.</p>
<p><a href="http://www.phpmyadmin.net/">Download phpMyAdmin</a>. (There is a Quick Downloads box near the top left) Once downloaded, simply unzip the package to your web server&#8217;s document root, which is C:/webserv in the examples I&#8217;ve been using above.</p>
<p>There are a few steps in setting up phpMyAdmin. At this point, I&#8217;m not sure if my friend needs to do this or not. I will continue this writing when I find out that he does. For now, I&#8217;d like to publish this article as soon as I could so I could help out.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.agum.com/web/2007/12/18/php-web-applications-development-a-starter-tutorial/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Facebook Applications</title>
		<link>http://www.agum.com/web/2007/09/16/facebook-applications/</link>
		<comments>http://www.agum.com/web/2007/09/16/facebook-applications/#comments</comments>
		<pubDate>Mon, 17 Sep 2007 06:19:44 +0000</pubDate>
		<dc:creator>Bigi</dc:creator>
		
		<category><![CDATA[Facebook apps]]></category>

		<category><![CDATA[General]]></category>

		<category><![CDATA[Web apps]]></category>

		<guid isPermaLink="false">http://www.agum.com/web/2007/09/16/facebook-applications/</guid>
		<description><![CDATA[The Facebook platform has been released for a while now, and believe you me, I&#8217;ve been doing development on it since day 1 of that until now, non-stop. I think I can say with fairly good confidence that I&#8217;m an expert Facebook developer in PHP.
Facebook applications originally provided something with very good potential, but unfortunately, [...]]]></description>
			<content:encoded><![CDATA[<p>The Facebook platform has been released for a while now, and believe you me, I&#8217;ve been doing development on it since day 1 of that until now, non-stop. I think I can say with fairly good confidence that I&#8217;m an expert Facebook developer in PHP.</p>
<p>Facebook applications originally provided something with very good potential, but unfortunately, it isn&#8217;t really working in the way I would hope it should.</p>
<p><span id="more-20"></span><br />
<strong>Usefulness vs triviality</strong></p>
<p>It is extremely unfortunate that majority of the Facebook applications that &#8220;succeeded&#8221; (currently) are entirely useless ones such as SuperPoke, X Me, SuperWall, and Top Friends. It is not hard to see how they succeeded.</p>
<p>Slide and RockYou apparently has some sort of partnership with Facebook (correct me if I&#8217;m wrong in this); they were able to push out some applications since day 1 of releasing the Facebook apps platform. They created these useless little apps, and made ways of spreading them (mainly the &#8220;Invite your friends&#8221; page when you first add the app).</p>
<p>Of course, now that everybody knows what that is, everybody just skips that page entirely. But when it first started, people actually invite other people through that.</p>
<p>Normally, an app getting popular, no matter what ways it used to accomplish that, isn&#8217;t really a problem. The main problem here lies in the fact that these apps are mostly useless trivial apps &#8212; look at SuperPoke, X Me, Free Gifts &#8212; they do nothing more than posting a message or an image on a friend&#8217;s profile. Top Friends has a little more to it than that, but also doesn&#8217;t have much practical uses other than generating hate from your <em>other</em> friends who didn&#8217;t get in your Top Friends list. (did anyone actually think of that when they add people to their top friends? I can&#8217;t believe how many people actually think Top Friends is cool. It destroys a lot more friendship than improving any.)</p>
<p>All of this gave a <em>really</em> bad example for new developers starting at this stuff. Other programmers see the success of these useless little apps, and they go ahead and make some too. It easily became the norm, then, to make trivial apps on Facebook. This in turn leads regular Facebook users to get used to the fact that Facebook apps aren&#8217;t to be taken seriously. It&#8217;s just fancy little toys to be added to your profile with no practical uses. Now, the only difference between Facebook Apps and the trash you see on MySpace is that Facebook Apps are more secure and more difficult to program for &#8212; other than that, there is no practical difference.</p>
<p>This is really, really sad because Facebook apps would have so much potential otherwise. Facebook could&#8217;ve pulled the a great part of web 2.0 applications into their platform if Slide and RockYou didn&#8217;t set such bad examples! The possibilities would&#8217;ve been endless.</p>
<p><strong>Before Facebook Apps</strong></p>
<p>Did you know that a Facebook development platform existed before Facebook released Facebook applications? You could develop third-party web applications (or even desktop applications!) using Facebook&#8217;s social network data to back you up. They would be standalone web sites, only having a Facebook login. All &#8220;Facebook Apps&#8221; did was to allow you to integrate your application into people&#8217;s profile boxes and provide you with a canvas page (which is mostly just an individual web site, for the most part).</p>
<p>Take a look at this: <a href="http://moochspot.com/">MoochSpot</a>. It lets you &#8220;keep track of debts and shared  		expenses with your friends&#8221;. Excellent idea, nicely done using the Facebook platform.</p>
<p>And you know what? That is what Facebook applications should have been like in the first place! Useful web 2.0 web apps integrated into Facebook. NOT trivial little toys to add to the Facebook profile.</p>
<p><strong>Another way to see it</strong></p>
<p>Perhaps, though, Facebook could help us partly solve this problem by fixing their Applications directory. Help those of us developers who actually invest development time into creating a serious application with practical uses, and help the users find out about these things.</p>
<p>Categorize Facebook Apps into two big categories &#8212; little toys and serious apps. Or better yet, just call little toys something different altogether, like &#8220;profile add-ons&#8221; or something. That is where stuff like SuperPoke, Top Friends belong. Facebook Apps should be where stuff like <a href="http://moochspot.com">MoochSpot</a> and <a href="http://www.goingifts.com">GoInGifts</a> belong. (That second one, by the way, is what my team has been developing in the past month. The Facebook app, not the standalone web site &#8212; that is just a temporary placeholder designed by some web designer.)</p>
<p><strong>Conclusion</strong></p>
<p>Of course, Facebook Apps are still young to really say anything about it significant at all. There could very well be major changes coming up within the year that makes it into something entirely different, maybe working like what I mentioned above. Even the Facebook platform itself isn&#8217;t in a stable state yet &#8212; changes are being made from their engineering team every week, stuff is getting added, removed, and updated all the time. Let&#8217;s hope for the best and hope that Facebook will eventually solve all this out, and not to make it like another MySpace.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.agum.com/web/2007/09/16/facebook-applications/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Where do you draw the line between designer and developer?</title>
		<link>http://www.agum.com/web/2007/08/03/where-do-you-draw-the-line-between-designer-and-developer/</link>
		<comments>http://www.agum.com/web/2007/08/03/where-do-you-draw-the-line-between-designer-and-developer/#comments</comments>
		<pubDate>Fri, 03 Aug 2007 08:56:15 +0000</pubDate>
		<dc:creator>Bigi</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[Web apps]]></category>

		<guid isPermaLink="false">http://www.agum.com/web/2007/08/03/where-do-you-draw-the-line-between-designer-and-developer/</guid>
		<description><![CDATA[As web 2.0 applications get more and more mature, the roles of web designers, web developers and web application developers become more and more blurry.
Years ago, web designers simply design web sites. They aren&#8217;t very different from traditional print designers. Sure, some of them might not only do the design, but also code up their [...]]]></description>
			<content:encoded><![CDATA[<p>As web 2.0 applications get more and more mature, the roles of web designers, web developers and web application developers become more and more blurry.</p>
<p>Years ago, web designers simply design web sites. They aren&#8217;t very different from traditional print designers. Sure, some of them might not only do the design, but also code up their designs in HTML. But a lot of times, web designers are only responsible for the visual designs, and they pass on their work to web developers to convert the visuals into actual web pages. Back then, there wasn&#8217;t even much of a term as &#8220;web application developer&#8221; &#8212; what is a web application in 1998? A form mail script? A guestbook? Nobody would do that for a living. Let&#8217;s rephrase that &#8212; you won&#8217;t make a living doing that.</p>
<p><span id="more-19"></span><br />
Now we enter the web 2.0 boom. Full-fledged web applications are being developed. <a href="http://www.meebo.com">Meebo</a> is my favorite example. And there&#8217;s Google Docs &amp; Spreadsheets, etc. How are applications developed? By programming, obviously. Just like desktop applications, web applications also have a backend programming element to it, as well as a frontend interface programming element. These are huge applications we are talking about &#8212; they are as large as or even larger on scale than desktop applications in the past!</p>
<p>Web applications backend programming is really not much different from traditional programming people have been doing since the beginning of time. (except maybe working with different languages &#8212; like PHP, Ruby on Rails now. But people still use Java and C++ too!) When we get to frontend, things get a bit different. We have new technologies like DOM scripting and AJAX. These technologies are still in sort of an infant stage. It really takes a tech-savvy person to bend them at will and do what you need to do. Heck, even writing standard XHTML and CSS and making sure they work across browsers is a challenge!</p>
<p>Needless to say, frontend development work has to be done by programmers as well. Here&#8217;s where the problem comes in. As we all know very well, programmers aren&#8217;t good designers. What this translates into is a whole bunch of web applications with badly designed interface. You could hire a designer to make things look good, but if an application has a bad interface, that makes it a bad application.</p>
<p>It takes a usability expert and/or a great UI designer to do this frontend work. Very often, the frontend programmer is not this person. Currently, the only solution to fix this problem is to hire somebody who is both a great UI designer and a programmer to do the frontend work. It certainly is a big challenge! There aren&#8217;t that many of them out there.</p>
<p>And we come back to the question. Where do you draw the line between designer and developer? I am a web application developer. A lot of times, however, I find myself having to take care of some aspects of the frontend design. So should I be considered a designer in addition? The designer at my company needs to learn some web apps programming in order to improve on her work. She needs to understand how AJAX works, how the DOM elements on the page work, in order to make her designs work. So is she a developer now?</p>
<p>Frontend applications development is an interesting job. It takes both good design knowledge and technical knowledge to do the job &#8212; an unusual duo. Frontend developers should really be more valuable than backend programmers, since old-school programmers are a dime a dozen. Why aren&#8217;t we getting paid more? <img src='http://www.agum.com/web/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.agum.com/web/2007/08/03/where-do-you-draw-the-line-between-designer-and-developer/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.563 seconds -->
