<?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>Web Cash &#187; development</title>
	<atom:link href="http://www.earn-web-cash.com/tag/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.earn-web-cash.com</link>
	<description>Writing, Designing, and Making Money Online</description>
	<lastBuildDate>Sun, 04 Dec 2011 22:52:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
		<item>
		<title>Great Resources: Learning JS, AJAX, and DOM</title>
		<link>http://www.earn-web-cash.com/2008/02/19/resources-js-ajax-dom/</link>
		<comments>http://www.earn-web-cash.com/2008/02/19/resources-js-ajax-dom/#comments</comments>
		<pubDate>Tue, 19 Feb 2008 23:00:50 +0000</pubDate>
		<dc:creator>Walkere</dc:creator>
				<category><![CDATA[Online Tools]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[dom]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[resources]]></category>

		<guid isPermaLink="false">http://www.earn-web-cash.com/2008/02/19/resources-js-ajax-dom/</guid>
		<description><![CDATA[Over the weekend, I decided it was finally time to learn how to use JS and AJAX. I&#8217;d deliberately avoided using JS for anything I could accomplish in PHP &#8211; but I admit that I was getting a bit intrigued by the AJAX hooplah. I found some very useful resources for dealing with JS, AJAX, [...]]]></description>
			<content:encoded><![CDATA[<p>Over the weekend, I decided it was finally time to learn how to use JS and AJAX.  I&#8217;d deliberately avoided using JS for anything I could accomplish in PHP &#8211; but I admit that I was getting a bit intrigued by the AJAX hooplah.</p>
<p>I found some very useful resources for dealing with JS, AJAX, and DOM, so I thought I&#8217;d share them for any other eager learners.<br />
<span id="more-131"></span></p>
<h5>Getting Started with AJAX</h5>
<p>The first place I stopped in my quest for knowledge was the <a href="http://www.ibm.com/developerworks/views/web/libraryview.jsp?search_by=Mastering+Ajax">Mastering Ajax</a> series of articles at IBM&#8217;s Developer Works.</p>
<p>I read through the first half of the series.  Articles 1, 2, and 3 give a pretty good overview of how to create and use an AJAX request.  The later articles introduce the DOM and provide a good overview of how to work with the AJAX response and edit the existing web page.</p>
<p>After reading the first two articles, I was able to re-craft the examples and create some basic AJAX-driven forms of my own.  It wasn&#8217;t anything exciting &#8211; but the concept was easy enough to master.</p>
<p>Although you can get by without ever working directly with the AJAX request object, I agree with the author of this series of articles.  It&#8217;s best to learn to do something the hard way first &#8211; then you can take shortcuts.</p>
<h5>AJAX the Easy Way &#8211; Prototype.js</h5>
<p>Later in the weekend, I set about creating my first real AJAX application.  My <a href="http://www.earn-web-cash.com/2008/02/18/digg-badge-popular-posts/">Digg WordPress Plugin</a> uses AJAX to check the Digg API for info on an article after the page has loaded.</p>
<p>I tried to rework the code that I&#8217;d built with the Developer Works tutorial, but I ran into a problem when I had to make more than one request.  I knew I had to make extra instances of the HttpRequest object, but I was having trouble getting the code to execute the way I wanted it to.  Admittedly I&#8217;m a JS newbie &#8211; the first Javascript I ever wrote was the code from the first AJAX tutorial.</p>
<p>I found a great solution though &#8211; <a href="http://www.prototypejs.org/api">prototype.js</a>.  This is a javascript/ajax framework that makes it much simpler to work with the base AJAX class.</p>
<p>This made it much easier to create multiple instances of an AJAX request class and have them simultaneously fire off and handle requests.  It also handles some of the browser compatibility issues.  I like to do things on my own, but I&#8217;m pretty sure I&#8217;ll be using prototype.js from now on for any AJAX projects I work on.</p>
<h5>DOM: Document Object Model Resources</h5>
<p>Once I got a hang of sending and processing requests with AJAX, I had to turn to DOM to edit the page.  After reading through the Developer Works tutorial and fiddling a bit on my own, I found this surprisingly easy.</p>
<p>If you&#8217;ve got an understanding of OOP and XML, the DOM should be pretty straightforward for you.  However, there are a decent amount of methods/properties you&#8217;ll run into.  I found two great references that I&#8217;ll be using for a while until I get more familiar with the DOM methods/properties.</p>
<p>howtocreate.co.uk has a compact <a href="http://www.howtocreate.co.uk/tutorials/javascript/domstructure">list of pertinent methods and properties</a>.  It&#8217;s not explained very well, but it&#8217;s good for looking up a method quickly.  By contrast, <a href="http://www.javascriptkit.com/domref/elementmethods.shtml">Javascript Kit</a> has a thorough reference of methods and properties with explanations.  It&#8217;s a bit more verbose, but a better choice if you haven&#8217;t got a clue how a method works.</p>
<p>Working with JS, AJAX, and DOM is pretty simple &#8211; especially if you already know a scripting language like PHP.  So don&#8217;t wait any longer &#8211; go out and add to your repertoire.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.earn-web-cash.com/2008/02/19/resources-js-ajax-dom/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Time Well Spent, Learning Programming</title>
		<link>http://www.earn-web-cash.com/2008/02/01/time-learning-programming/</link>
		<comments>http://www.earn-web-cash.com/2008/02/01/time-learning-programming/#comments</comments>
		<pubDate>Sat, 02 Feb 2008 02:15:21 +0000</pubDate>
		<dc:creator>Walkere</dc:creator>
				<category><![CDATA[Sundry Musings]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[learning]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.earn-web-cash.com/2008/02/01/time-learning-programming/</guid>
		<description><![CDATA[Browsing through DZone, I stumbled on an interesting illustration - the <a href="http://osteele.com/archives/2008/01/programmers-pyramid">Programmer's Food Pyramid</a>.

The Pyramid illustrates the different activities that someone generally engages in while learning to program.  While looking at the pyramid, I thought, "Do I do all these things?"]]></description>
			<content:encoded><![CDATA[<p>Browsing through DZone, I stumbled on an interesting illustration &#8211; the <a href="http://osteele.com/archives/2008/01/programmers-pyramid">Programmer&#8217;s Food Pyramid</a>.</p>
<p>The Pyramid illustrates the different activities that someone generally engages in while learning to program.  While looking at the pyramid, I thought, &#8220;Do I do all these things?&#8221;<br />
<span id="more-94"></span><br />
For the most part, I do on a daily basis.</p>
<h5>Writing About Code and Writing Code</h5>
<p>I spend a decent amount of timing writing about code &#8211; or thinking about writing about code.  That&#8217;s a lot of what this website is about, and it&#8217;s also why I spend a lot of time on forums like <a href="http://www.daniweb.com">DaniWeb</a> and <a href="http://www.digitalpoint.com">Digital Point</a>.</p>
<p>As a high school teacher, I know all too well that you learn best by teaching.  So I spend a lot of timing writing about what I&#8217;m trying to figure out &#8211; so I can help others learn it, but also so I can figure it out myself.</p>
<p>On the pyramid, &#8220;Writing About Code&#8221; and &#8220;Writing Code&#8221; are separated into two different categories &#8211; but for me they&#8217;re pretty synonymous.  If I spend time writing some code, I usually devote some time to writing about it.  It helps me gain a deeper understanding of what I did.</p>
<h5>Reading, Revising, and Reading About Code</h5>
<p>Likewise, the pyramid divides these into three different tasks &#8211; but I&#8217;d say they mostly occur at the same time for me.</p>
<p>I spend a lot of time trolling around the PHP sections of webmaster forums (like DaniWeb, DigitalPoint, etc).  I like to see what problems other people are having&#8230; and then try to solve them.</p>
<p>In the process, I generally end up reading someone&#8217;s code, fixing errors in it, and searching the internet to solutions to deeper problems.  A small problem in a forum post can easily drive me to learn more about a topic I didn&#8217;t know a lot about.</p>
<p>For example, someone posted a question about using preg_replace().  I never used the function much, because I never had a reason to use it over str_replace().  Instead of directing the person to str_replace() like most other respondents did, I spent some time learning how to use preg_replace() and I fixed the error in the original poster&#8217;s code.</p>
<h5>Reading Environmental Code</h5>
<p>If there&#8217;s one thing I hate, out of all the bits included in the pyramid, it&#8217;s reading environmental code.</p>
<p>For example, I operate another site using CMS Made Simple (<a href="http://www.teachbabel.com">Babel</a>).  I wrote some modules for the website to make it do exactly what I wanted&#8230; and that meant spending a lot of time mucking through the CMS&#8217; source code.</p>
<p>Like most projects, the source code was not well commented or documented.  The code didn&#8217;t follow the highest standards of coding, either, and I found myself wanting to stop and fix little problems in it as I went.</p>
<p>No, I definitely find it an annoying chore to read through someone else&#8217;s code when it&#8217;s not well-written and well-documented.  That&#8217;s part of the reason I always try to make my own code as clear as possible, with documentation throughout.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.earn-web-cash.com/2008/02/01/time-learning-programming/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
	</channel>
</rss>

