<?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>Dev + Mocha &#187; JavaScript</title>
	<atom:link href="http://routecafe.com/topics/programming/js-programming/feed" rel="self" type="application/rss+xml" />
	<link>http://routecafe.com</link>
	<description>It's all about David's Blog!</description>
	<lastBuildDate>Fri, 04 Jun 2010 02:59:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Bing API PHP Wrapper Re-factoring</title>
		<link>http://routecafe.com/posts/bing-api-php-re-factoring.moccha</link>
		<comments>http://routecafe.com/posts/bing-api-php-re-factoring.moccha#comments</comments>
		<pubDate>Thu, 14 Jan 2010 17:13:22 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://routecafe.com/?p=212</guid>
		<description><![CDATA[A few months ago I released Bing API PHP to the public out of boredom, it was a hobby, still is. Now re-visiting my code I discovered a few things that needed to be introduced. Starting with an Abstract class, &#8230; <a href="http://routecafe.com/posts/bing-api-php-re-factoring.moccha">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A few months ago I released Bing API PHP to the public out of boredom, it was a hobby, still is. Now re-visiting my code I discovered a few things that needed to be introduced. Starting with an Abstract class, mostly all of Bing&#8217;s XML responses are almost equal to each other. Except for some cases, yet, in the midst of working on a solution on how to &#8220;write less&#8221; and &#8220;be more efficient gathering data&#8221;. I totally forgot about abstract classes, not just totally forgot, the next version of the wrapper itself got stalled due to attempting to &#8220;write less&#8221;.</p>
<p>Why did I start re-factoring now? Good question! It had something to do with OpenType Threads, working on my prototype has taught me a lot of things about classes, design patterns and a better problem solving skill. So when I looked at my wrapper class, I said to myself &#8220;hmmm&#8230; maybe we should do this one more time&#8221;. Yet, while this is still a hobby, one of my goal of why to re-factor the code was to allow me a better manipulation with JavaScript. I know I can use XML in JavaScript but well, we&#8217;ll see how it goes :)</p>
<p>So it&#8217;s time to pay a visit to Bing&#8217;s API documentation and delete old code without thinking twice. </p>
<div><b>2</b> people like this post.</div>
]]></content:encoded>
			<wfw:commentRss>http://routecafe.com/posts/bing-api-php-re-factoring.moccha/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript Madness?</title>
		<link>http://routecafe.com/posts/javascript-madness.moccha</link>
		<comments>http://routecafe.com/posts/javascript-madness.moccha#comments</comments>
		<pubDate>Tue, 12 Jan 2010 15:24:11 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://routecafe.com/?p=201</guid>
		<description><![CDATA[I&#8217;ve been learning JavaScript for a few days now. Yesterday I got stuck and tried to find documentation, to my disappointment there isn&#8217;t a &#8220;centralized documentation&#8221; of the JavaScript language, it&#8217;s methods or useful examples. It&#8217;s more about experimenting and &#8230; <a href="http://routecafe.com/posts/javascript-madness.moccha">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been learning JavaScript for a few days now. Yesterday I got stuck and tried to find documentation, to my disappointment there isn&#8217;t a &#8220;centralized documentation&#8221; of the JavaScript language, it&#8217;s methods or useful examples. It&#8217;s more about experimenting and just listen what your guts tell you. Some have linked me to JavaScript&#8217;s model specifications giving me interfaces and what it should return (and so on) others linked me to MDC ( <s>Microsoft</s> Mozilla Development Center ), MDC has nailed it, very easy to understand examples, brief overview of the JavaScript technology and its Data Types, objects constructs and literals (literals has left me quite with a &#8220;wow&#8221;).</p>
<p>All nice, right? MDC seems like a nice resourceful spot (of course!), now this story will take a plot twist, and it starts when I test my JavaScript code in Internet Explorer, IE yelled errors with nonsense. I took a deep breath, lets do the math! Mozilla: Gecko, Google Chrome: WebKit, IE: well I think it was called &#8220;Trident&#8221;, and Opera? god knows, I forgot. So these people have different implementations on how to render the web, great! Now, they also have a different way on how to interpret JavaScript, just great! The Internet Explorer team needed to follow Microsoft&#8217;s standard, that is, just tweak a few things and claim it. (Like addEventListener converted to attachEvent, extra code is great :) god bless JavaScript libraries for this)</p>
<p>I cried myself to sleep yesterday. I just had one thought in my mind, &#8220;why it had to be like this, how about uniting or something&#8230; a centralized documentation, SOMETHING!&#8221;. I guess that won&#8217;t happen, like a fleeting dream :(</p>
<p>Don&#8217;t get me wrong, I like some of Microsoft technology (and their C# language). I also secretly like their Bing Search Engine, don&#8217;t tell anyone ;)</p>
<p>I&#8217;d like to thank <a href="http://stackoverflow.com/users/126562/justin-johnson">Justin Johnson</a> for his great help over <a href="http://stackoverflow.com/">StackOverflow</a>, enlightened me :) </p>
<div class='wp_likes' id='wp_likes_post-201'>
<div style='display:none' class='text'><b>0</b> people like this post.</div>
<div><a href=' javascript:wp_likes.like(201)' class='like' title='like this post'>Like</a>&nbsp;<img class='loader' src='http://routecafe.com/wp-content/plugins/wp-likes/images/spinner.gif' alt=''/></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://routecafe.com/posts/javascript-madness.moccha/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Zend_Service_Amazon thoughtful decorations</title>
		<link>http://routecafe.com/posts/zend_service_amazon-thoughtful-decorations.moccha</link>
		<comments>http://routecafe.com/posts/zend_service_amazon-thoughtful-decorations.moccha#comments</comments>
		<pubDate>Tue, 02 Jun 2009 19:07:25 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://routecafe.com/?p=66</guid>
		<description><![CDATA[I’ve been playing with Zend_Service_Amazon (part of Zend Framework) for a while and I find the class pretty good, except there is no cart creation class and some other minor stuff. Yet, it’s still a great class to use on &#8230; <a href="http://routecafe.com/posts/zend_service_amazon-thoughtful-decorations.moccha">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I’ve been playing with <a href="http://framework.zend.com/manual/en/zend.service.amazon.html">Zend_Service_Amazon</a> (part of <a href="http://framework.zend.com">Zend Framework</a>) for a while and I find the class pretty good, except there is no cart creation class and some other minor stuff. Yet, it’s still a great class to use on your production sites. <a href="http://routecafe.com/experiment/AmazonDemo">(Click here if you want to see the demo already)</a></p>
<p>I found some “bugs” if you may call it that, for example when getting the images, you will have to assign them to a variable, you cannot echo it directly like <code>$Item->LargeImage->Url</code> because it will throw a catchable fatal error and complain that it cannot convert to string. </p>
<p>Anyway! Let’s get started, I found a popular <a href="http://jquery.com/">jQuery</a> plug-in called <a href="http://devkick.com/lab/galleria/">galleria</a>. This plug-in allows you to create a neat presentation of your gallery. It’s really nice, and very easy to use. I’m not really a javascript guru and well my knowledge in javascript is pretty limited. </p>
<p>So the presentation that galleria delivered and the idea of having a better way to present the product gave me something to work on. It’s really simple, the combination of querying amazon and preparing the query return to work along with galleria worked like a charm with a great display. Now, to end it, I added a simple search and a sidebar providing the product info which also uses jQuery effect.</p>
<p>I&#8217;d hope you liked the result and helped you to continue your projects using Zend_Service_Amazon. There are still things to cover like result pages, etc etc. There are certain limitations in galleria which only allows a max of 10 thumbs and for the javascript guru, there is also a mini problem which I couldn&#8217;t resolve due to my limited knowledge of javascript that is, enabling history and next image does not active product info.</p>
<p><a href="http://routecafe.com/experiment/AmazonDemo">Want to see the end of the result? Click here for the demo</a></p>
<p><a href="http://routecafe.com/AmazonDemo.zip">Download the file</a>
 </p>
<div><b>1</b> people like this post.</div>
]]></content:encoded>
			<wfw:commentRss>http://routecafe.com/posts/zend_service_amazon-thoughtful-decorations.moccha/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
