<?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>Cranky Bit &#187; JavaScript</title>
	<atom:link href="http://blog.crankybit.com/tags/webdev/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.crankybit.com</link>
	<description>Take a byte out of tech!</description>
	<lastBuildDate>Wed, 09 Mar 2011 17:23:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Trimming a String in JavaScript</title>
		<link>http://blog.crankybit.com/trimming-a-string-in-javascript/</link>
		<comments>http://blog.crankybit.com/trimming-a-string-in-javascript/#comments</comments>
		<pubDate>Thu, 03 Jul 2008 15:30:12 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[General Web Dev.]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://blog.crankybit.com/?p=307</guid>
		<description><![CDATA[This is a nice clean way to implement string trimming for the String object in JavaScript: PLAIN TEXT JavaScript: String.prototype.trim = function&#40;&#41; &#123;    return this.replace&#40;/^\s+&#124;\s+$/g,""&#41;; &#125; With that implemented, you can then trim a string in the object-oriented way you would prefer and love: PLAIN TEXT JavaScript: var myStr="This is a test!   "; [...]]]></description>
			<content:encoded><![CDATA[<p>This is a nice clean way to implement string trimming for the String object in JavaScript:</p>
<div class="igBar"><span id="ljavascript-3"><a href="#" onclick="javascript:showCodeTxt('javascript-3'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JavaScript:</span>
<div id="javascript-3">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">String.<span style="color: #006600;">prototype</span>.<span style="color: #006600;">trim</span> = <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">   <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">replace</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066FF;">/^\s+|\s+$/g</span>,<span style="color: #3366CC;">""</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>With that implemented, you can then trim a string in the object-oriented way you would prefer and love:</p>
<div class="igBar"><span id="ljavascript-4"><a href="#" onclick="javascript:showCodeTxt('javascript-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JavaScript:</span>
<div id="javascript-4">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">var</span> myStr=<span style="color: #3366CC;">"This is a test!   "</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000066;">alert</span><span style="color: #66cc66;">&#40;</span>myStr.<span style="color: #006600;">trim</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>This is handy for client-side clean-up of form information, although bear in mind that depending on client-side code for data entry clean-up isn't necessarily wise unless you have some server-side code also checking the data.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.crankybit.com/trimming-a-string-in-javascript/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>An Infinite Loop of AIR</title>
		<link>http://blog.crankybit.com/an-infinite-loop-of-air/</link>
		<comments>http://blog.crankybit.com/an-infinite-loop-of-air/#comments</comments>
		<pubDate>Thu, 11 Oct 2007 23:15:30 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[General Web Dev.]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Mac OS X]]></category>

		<guid isPermaLink="false">http://blog.crankybit.com/an-infinite-loop-of-air/</guid>
		<description><![CDATA[Okay, sorry for the dorky play on words. In addition to AIR getting an article from Oliver Goldman over at Dr. Dobb's, the AIR app called Spaz--one of the AIR Developer Derby winners--and its developer, Ed Finkler, got some attention via an interview over at Ars Technica's Infinite Loop journal. Spaz gets more time in the [...]]]></description>
			<content:encoded><![CDATA[<p>Okay, sorry for the dorky play on words. In addition to AIR getting an <a target="_blank" href="http://www.ddj.com/architect/202401085">article</a> from Oliver Goldman over at Dr. Dobb's, the AIR app called <a target="_blank" href="http://funkatron.com/spaz">Spaz</a>--one of the AIR Developer Derby winners--and its developer, Ed Finkler, got some <a target="_blank" href="http://arstechnica.com/journals/apple.ars/2007/10/11/twitter-with-spaz-air-interview-with-dev-ed-finkler">attention via an interview</a> over at Ars Technica's Infinite Loop journal.</p>
<p>Spaz gets more time in the Twitter limelight, and Ed talked up the benefits of AIR. Good job, Ed! I haven't had a chance to read the whole interview yet, but look forward to reading it soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.crankybit.com/an-infinite-loop-of-air/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CFUnited 2007 Preconference Classes</title>
		<link>http://blog.crankybit.com/cfunited-2007-preconference-classes/</link>
		<comments>http://blog.crankybit.com/cfunited-2007-preconference-classes/#comments</comments>
		<pubDate>Wed, 27 Jun 2007 01:25:14 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[General Web Dev.]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://blog.crankybit.com/cfunited-2007-preconference-classes/</guid>
		<description><![CDATA[I attended Rob Gonda's "FLEX Intensive for ColdFusion Developers" class on Monday and Peter Bell's "Practical Code Generation: By Example" class on Tuesday. I didn't take any notes during Rob's class, as we spent practically the entire class scouring through FLEX examples. I did take notes during Peter's class during the discourse sections of his [...]]]></description>
			<content:encoded><![CDATA[<p>I attended <a href="http://www.robgonda.com/">Rob Gonda</a>'s "FLEX Intensive for ColdFusion Developers" class on Monday and <a href="http://www.pbell.com/">Peter Bell</a>'s "Practical Code Generation: By Example" class on Tuesday.</p>
<p>I didn't take any notes during Rob's class, as we spent practically the entire class scouring through FLEX examples. I did take notes during Peter's class during the discourse sections of his class.</p>
<p><strong>FLEX Intensive for ColdFusion Developers</strong></p>
<p>I have two reasons for learning FLEX: (1) I am interested in developing <a href="http://labs.adobe.com/technologies/air/">AIR</a> applications, and I'd like to do some of the more advanced functionality, which requires FLEX. (2) After learning the basics of FLEX, I want to try to use FLEX for some enhanced form functionality!</p>
<p>I think I'd only want to write full-fledged FLEX apps when writing AIR apps. To do this, Rob recommended the official <a href="http://labs.adobe.com/wiki/index.php/Cairngorm">Cairngorm</a> microarchitecture, although <a href="http://www.model-glue.com/flex.cfm">Model Glue: FLEX</a> is now a new option to look into as well. He also recommended using <a href="http://www.ericfeminella.com/blog/cairngen/">Cairngen</a> to get things set up and started with Cairngorm.</p>
<p>Rob usually <em>does</em> include the compiled FLEX SWFs in his Subversion repository. He will have the FLEX source in one directory outside of the web directory, and have the binary output directory be the assets directory within the web directory. This way, the compiled FLEX is ready to be used within the web app, and everything can just be committed to the repository.</p>
<p>Rob recommends using <a href="http://blog.deconcept.com/swfobject/">SWFObject</a> for deploying the SWFs. </p>
<p>Finally, he recommended the <a href="http://labs.adobe.com/wiki/index.php/Flex_Framework:FABridge">FLEX-AJAX Bridge</a>.</p>
<p><strong>Practical Code Generation: By Example</strong></p>
<p>Peter Bell's class was amazing. Even if you decide to use frameworks, you can automate work or application generation by using code generation. Below are my notes from his class.</p>
<p>Active generation (can regenerate as requirements change, and custom code is in separate files) is better, although passive generation (can generate once, but requires tweaking, and cannot regenerate) is faster to implement.</p>
<p><em>Methods for creating the code. </em></p>
<p>Concatenation: Code stored in a variable. &lt;cfset ScriptHTML="&lt;cfquery&gt;..&lt;/cfquery&gt;"&gt;. Good for when there’s variables, looping, etc. When there is a lot of specialized processing.</p>
<p>Templating: Much better. Template-based approach is easier to read and takes up less space. Good for mainly fixed code. Simple models. And it’s an approach we are familiar. ColdFusion itself is a manner of building HTML templates that get modified by the code.</p>
<p><em>Anatomy of a Generator.</em></p>
<ul>
<li>Metadata (List of fields, etc). Could be in database, XML, etc.</p>
<li>Template.
<li>Iterator. We immediately think, “For each business object, do…”
<li>Orchestrator.
</ul>
<p><em>Metadata.</em></p>
<p>Use ColdFusion to build structs. Use XML. Or even flat text in a particular format. Any are fine. </p>
<p><em>Template.</em></p>
<p>XSL, CF Template. We will use CF Template because its readability is so much better than XSL.</p>
<p><em>Iterator.</em></p>
<p>Generate n files. One DAO per business object. One template per screen. Need filter support.</p>
<p><em>Orchestrator.</em></p>
<p>Generate m collections of n files. Tell it what metadata to use with what template, iterating how many times, and how to generate the filenames.</p>
<p><em>Extending Generated Code.</em></p>
<p>Need to mix the custom modifications with the standard generated code.</p>
<p>Protected blocks.  Mark where generated code exists with a special string, and generator will not touch code inside custom blocks. Can actually be harder to write a generator using this method too. So this method is out of favor.</p>
<p>Inheritance.  Just generate the standard CFCs, and you can have custom decorators that inherit the standard CFCs.</p>
<p>Events.  Have custom code that looks for events, and when particular events are thrown by the standard code, the custom code method would generate.</p>
<p>Mixins.  You basically put a <cfinclude> right into the standard code so that the custom code can be inserted right into the execution stream. Of course, this introduces lots of conflicts since you’re sharing the time and space with all of your standard code.</p>
<p>Aspect Oriented Programming (AOP).  When someone calls this method, before, after, or during that, call some custom code.</p>
<p><em>Frameworks vs. Code Generation</em></p>
<p>Remember when there was the initial conflict between compiled vs. interpreted languages? Same consideration for frameworks vs. code generation. Not either/or. Typically there will be a combination of generated code vs. frameworks you use. Intellectual property and performance concerns may be there. You may not want to give away an entire framework that will build something quickly that the clients can change themselves. So, this may cause you to choose code generation.</p>
<p><em>Getting Started</em></p>
<p><a href="http://cftemplate.riaforge.org">http://cftemplate.riaforge.org</a><br />
<a href="http://cfgen.riaforge.org">http://cfgen.riaforge.org</a><br />
<a href="http://www.pbell.com">http://www.pbell.com</a></p>
<p>Also check out opensource projects ColdSpring, LightWire, IBO.</p>
<p><em>Additional Notes During Walkthroughs</em></p>
<p>If you want to automagically generate IDs, titles, etc. for all aspects of the database and CFC, decouple it from the primary code generation. This way, you can generate stuff with almost no work, but yet it is still customizable because you just tweak the generated metadata for the code generation!</p>
<p><em>Design Patterns</em></p>
<p>Model-View-Controller. Business logic in the model. The meat of your application. View is the presentation. Perhaps some HTML or AJAX or Flex that displays it. Controller glues the two together, getting something from the view to the model.</p>
<p>Be careful against putting things in the wrong area. Most notably, beware logic in the controller! If just a web app, you may not notice, but when implementing AJAX or other connectivity, this can cause a problem.</p>
<p><em>Model consists of:</em></p>
<ul>
<li>Bean. Basic business object. Gets, sets, validation.
<li>Service Class / Manager. Used to get beans, in different ways. GetByFilter(), GetByProperty(), DeleteByFilter(), DeleteByProperty(), Save(), New().
<li>Data Access Object / Gateway.
</ul>
<p>CFM page -- Service, which may gen bean -- DAO -- DB.</p>
<p>Generic getters and setters can be handy for dynamic references. Easier for code generation too. Use in conjunction with a GettablePropertyList and SettablePropertyList for controlling access. Can have custom processing too by checking for the custom getter or setter and calling that with an Evaluate().</p>
<p>Typical IBO: get(), set(), access(), mutate(), loadStruct(), loadQuery(), first(), last(), next(), reset()</p>
<p>Remember, even if you just use a code generator to generate forms, or ColdSpring config files, or various other repetitive items, do it! If there is a framework that will meet your needs well enough, just go with that, but you can still help implement it with code generation.</p>
<p>Be careful--there is so much data overlap between the database specs and the CFCs and the forms and whatnot, that before you know it, you’ll be writing code generation for the whole app. </p>
<p>When doing the code generation, you then should use inheritance for the custom code. Develop your service so that it will look to see if the custom CFC exists, and if not, it just sends back the base CFC. You could autogenerate an empty CFC, but then you have to look inside the empty file to see if you have any customization. It is more apparent if the custom CFC doesn’t even exist!</p>
<p><strong>Conclusion</strong></p>
<p>These were a couple great classes. A lot to think about.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.crankybit.com/cfunited-2007-preconference-classes/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>An IE Pitfall With Class Name Alteration</title>
		<link>http://blog.crankybit.com/an-ie-pitfall-with-class-name-alteration/</link>
		<comments>http://blog.crankybit.com/an-ie-pitfall-with-class-name-alteration/#comments</comments>
		<pubDate>Wed, 13 Jun 2007 15:23:44 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[General Web Dev.]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://blog.crankybit.com/an-ie-pitfall-with-class-name-alteration/</guid>
		<description><![CDATA[I recently used the basic principles in Validation Hints For Your Form by askthecssguy.com for a password management application. I didn't notice any problems on my speedy development machine, but when I pushed the app to some beta testers, I noticed some slower-than-expected performance in IE. As it turns out, the problem was due to [...]]]></description>
			<content:encoded><![CDATA[<p>I recently used the basic principles in <a href="http://www.askthecssguy.com/2007/05/validation_hints_for_your_form_1.html" target="_blank">Validation Hints For Your Form</a> by <a href="http://www.askthecssguy.com" target="_blank">askthecssguy.com</a> for a password management application. I didn't notice any problems on my speedy development machine, but when I pushed the app to some beta testers, I noticed some slower-than-expected performance in IE. As it turns out, the problem was due to the JavaScript that would update an element's class, triggered by the onkeyup event of an input field. It was slow enough to even be disruptive to the experience.</p>
<p>Here is an example of a function that could duplicate the slowdown in IE. It could be attached to the onkeyup event of the username field. It will provide immediate feedback by altering the class name of the field's container  when criteria are met (in this case, the value being greater than 7 characters in length). Your CSS and HTML can then determine exactly what that feedback will look like.</p>
<div class="igBar"><span id="ljavascript-7"><a href="#" onclick="javascript:showCodeTxt('javascript-7'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JavaScript:</span>
<div id="javascript-7">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">function</span> checkUsername<span style="color: #66cc66;">&#40;</span>whatYouTyped<span style="color: #66cc66;">&#41;</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #003366; font-weight: bold;">var</span> fieldset = whatYouTyped.<span style="color: #006600;">parentNode</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #003366; font-weight: bold;">var</span> txt = whatYouTyped.<span style="color: #006600;">value</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>txt.<span style="color: #006600;">length</span>&gt; <span style="color: #CC0000;color:#800000;">7</span><span style="color: #66cc66;">&#41;</span> fieldset.<span style="color: #006600;">className</span> = <span style="color: #3366CC;">"welldone"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000066; font-weight: bold;">else</span> fieldset.<span style="color: #006600;">className</span> = <span style="color: #3366CC;">""</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>As it turns out, the slowdown in IE is due to a general slowdown that IE experiences anytime the class name of the element is changed. It may be unnoticeable if it happens once, but when it happens on every key press, it is noticeable. The slowdown only occurs, however, when the class name is changed, not when the value is referenced. So the easy solution is to compare the existing value to the value you want to set, and only assign the class name if it is different.</p>
<p>You might change the function above to look something like this.</p>
<div class="igBar"><span id="ljavascript-8"><a href="#" onclick="javascript:showCodeTxt('javascript-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JavaScript:</span>
<div id="javascript-8">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">function</span> checkUsername<span style="color: #66cc66;">&#40;</span>whatYouTyped<span style="color: #66cc66;">&#41;</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #003366; font-weight: bold;">var</span> fieldset = whatYouTyped.<span style="color: #006600;">parentNode</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #003366; font-weight: bold;">var</span> txt = whatYouTyped.<span style="color: #006600;">value</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #003366; font-weight: bold;">var</span> newClassName = <span style="color: #3366CC;">""</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>txt.<span style="color: #006600;">length</span>&gt; <span style="color: #CC0000;color:#800000;">7</span><span style="color: #66cc66;">&#41;</span> newClassName = <span style="color: #3366CC;">"welldone"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span> fieldset.<span style="color: #006600;">className</span> != newClassName <span style="color: #66cc66;">&#41;</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; fieldset.<span style="color: #006600;">className</span> = newClassName;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>This will theoretically improve performance in all browsers, although it is relatively moot in Firefox, as it doesn't experience the same level of slowdown. But for IE, this tweak in your code will make a noticeable speed improvement.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.crankybit.com/an-ie-pitfall-with-class-name-alteration/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Scriptaculous Cheat Sheet</title>
		<link>http://blog.crankybit.com/scriptaculous-cheat-sheet/</link>
		<comments>http://blog.crankybit.com/scriptaculous-cheat-sheet/#comments</comments>
		<pubDate>Mon, 29 Jan 2007 11:14:43 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[General Web Dev.]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://blog.crankybit.com/scriptaculous-cheat-sheet/</guid>
		<description><![CDATA[If you're not using Scriptaculous yet, start using it! And once you do, you can reference this awesome Scriptaculous Cheat Sheet designed by Amy Hoy of Slash7.  She did a great job at covering the basics, keeping it simple.]]></description>
			<content:encoded><![CDATA[<p>If you're not using <a target="_blank" href="http://script.aculo.us/">Scriptaculous</a> yet, start using it!</p>
<p>And once you do, you can reference this awesome <a target="_blank" href="http://www.slash7.com/articles/2006/04/22/scriptaculous-cheat-sheet-1">Scriptaculous Cheat Sheet</a> designed by Amy Hoy of <a target="_blank" href="http://www.slash7.com/">Slash7</a>.  She did a great job at covering the basics, keeping it simple.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.crankybit.com/scriptaculous-cheat-sheet/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Levels of JavaScript Knowledge</title>
		<link>http://blog.crankybit.com/levels-of-javascript-knowledge/</link>
		<comments>http://blog.crankybit.com/levels-of-javascript-knowledge/#comments</comments>
		<pubDate>Tue, 14 Nov 2006 19:01:23 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[General Web Dev.]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://blog.crankybit.com/levels-of-javascript-knowledge/</guid>
		<description><![CDATA[Jenny posted about an interesting article over at Particletree called Levels of Web Development Knowledge. My favorite article, which I was cracking up over, was Dean Edwards' Levels of JavaScript Knowledge, which actually has 6 variants of JavaScript Hello World code to demonstrate 6 levels of JavaScript developer expertise. I love it! It's fun because, if [...]]]></description>
			<content:encoded><![CDATA[<p>Jenny <a href="http://blog.neatlysliced.com/index.php/2006/11/friendly-bit-dotcom/" target="_blank">posted</a> about an interesting article over at Particletree called <a href="http://particletree.com/notebook/levels-of-web-development-knowledge/" target="_blank">Levels of Web Development Knowledge</a>. My favorite article, which I was cracking up over, was Dean Edwards' <a href="http://dean.edwards.name/weblog/2006/06/levels/" target="_blank">Levels of JavaScript Knowledge</a>, which actually has 6 variants of JavaScript Hello World code to demonstrate 6 levels of JavaScript developer expertise. I love it!</p>
<p>It's fun because, if you've been in the business for a bit, you can look at the levels and recall when you were there. Of course, the new kids coming into the business are learning the modern methods up front and may have never even coded in the lower levels. For a while, though, there was no better way to do things reliably. JavaScript support has come a long way recently.</p>
<p>I'm only at level 5 right now, but I've been aware of level 6, trying to wrap my brain around it, and will hopefully begin coding in that manner soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.crankybit.com/levels-of-javascript-knowledge/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dump Your JavaScript!</title>
		<link>http://blog.crankybit.com/dump-your-javascript/</link>
		<comments>http://blog.crankybit.com/dump-your-javascript/#comments</comments>
		<pubDate>Tue, 14 Nov 2006 18:16:27 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[General Web Dev.]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://blog.crankybit.com/dump-your-javascript/</guid>
		<description><![CDATA[No, I'm not saying you should get rid of your JavaScript. Just dump it. Of course, I'm referring to dumping elements to the screen to help you debug and inspect data while developing an application. Have you ever wondered what precisely is going on inside that JavaScript array or struct, since you're not getting the [...]]]></description>
			<content:encoded><![CDATA[<p>No, I'm not saying you should get rid of your JavaScript. Just dump it. <img src='http://blog.crankybit.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> </p>
<p>Of course, I'm referring to dumping elements to the screen to help you debug and inspect data while developing an application. Have you ever wondered what precisely is going on inside that JavaScript array or struct, since you're not getting the output you expect? In the ColdFusion world, <a href="http://livedocs.macromedia.com/coldfusion/7/htmldocs/00000239.htm" target="_blank">cfdump</a> is invaluable for this kind of thing.</p>
<p>Well, the Net Grow folks have developed an awesome <a href="http://www.netgrow.com.au/files/javascript_dump.cfm" target="_blank">JavaScript Dump</a> method that behaves very similar to ColdFusion's dump functionality. Awesome! This is definitely a must-have.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.crankybit.com/dump-your-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Aptana: A Promising Upcoming Web IDE</title>
		<link>http://blog.crankybit.com/aptana-a-promising-upcoming-web-ide/</link>
		<comments>http://blog.crankybit.com/aptana-a-promising-upcoming-web-ide/#comments</comments>
		<pubDate>Tue, 01 Aug 2006 04:28:32 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[General Web Dev.]]></category>
		<category><![CDATA[IDEs]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://blog.crankybit.com/aptana-a-promising-upcoming-web-ide/</guid>
		<description><![CDATA[I just got wind of Aptana today. At first glance, I would describe Aptana as a new IDE focused on web development, especially with an eye to Web 2.0 development. In other words, it has strong support for JavaScript-oriented code insight for AJAX development. Aptana's strength, then, from what I can see in some of [...]]]></description>
			<content:encoded><![CDATA[<p>I just got wind of <a target="_blank" href="http://www.aptana.com/">Aptana</a> today. At first glance, I would describe Aptana as a new IDE focused on web development, especially with an eye to Web 2.0 development. In other words, it has strong support for JavaScript-oriented code insight for AJAX development.</p>
<p>Aptana's strength, then, from what I can see in some of the screencasts, is that is supports HTML <span style="font-style: italic">and</span> JavaScript <span style="font-style: italic">and</span> CSS all in the same editor, providing outline insight and even error detection with all the code intermixed. This seemed pretty nice.</p>
<p>Being that it is still in its infancy, I'm hard-pressed to try it at this time. After all, Eclipse can do most of what Aptana claims to do with various plugins, and much more. The thing, though, is that Aptana is also offered as a plugin for Eclipse itself. I actually just downloaded <a target="_blank" href="http://www.interaktonline.com/Products/Eclipse/JSEclipse/Overview/">JSEclipse</a> and the <a target="_blank" href="http://www.eclipse.org/atf/">ATF</a> today, but if I find these mediocre, maybe Aptana would be worth a closer look.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.crankybit.com/aptana-a-promising-upcoming-web-ide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

