<?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>Lorem Ipsum</title>
	<atom:link href="http://trentvb.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://trentvb.com/blog</link>
	<description>I came, I saw, I wrote.</description>
	<lastBuildDate>Thu, 15 Dec 2011 06:06:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Learning AJAX with Coffeescript, jQuery, PHP, and SQLite Part 2</title>
		<link>http://trentvb.com/blog/2011/12/learning-ajax-with-coffeescript-jquery-php-and-sqlite-part-2/</link>
		<comments>http://trentvb.com/blog/2011/12/learning-ajax-with-coffeescript-jquery-php-and-sqlite-part-2/#comments</comments>
		<pubDate>Thu, 15 Dec 2011 06:00:26 +0000</pubDate>
		<dc:creator>Trent Van Bemmel</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://trentvb.com/blog/?p=371</guid>
		<description><![CDATA[Today we are going to talk database. For small learning projects like this, I love sqlite. I like it because I don&#8217;t have to worry about installing and getting a separate database running, it doesn&#8217;t take up system resources when &#8230; <a href="http://trentvb.com/blog/2011/12/learning-ajax-with-coffeescript-jquery-php-and-sqlite-part-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Today we are going to talk database. For small learning projects like this, I love <a href="http://www.sqlite.org/" title="sqlite">sqlite</a>. I like it because I don&#8217;t have to worry about installing and getting a separate database running, it doesn&#8217;t take up system resources when I&#8217;m done using it, and I can store the database with the code in <a href="http://subversion.apache.org/" title="subversion">subversion</a>. This is handy if, like me, you find yourself developing on several different workstations.</p>
<h2>Project Setup</h2>
<p>In the document root of your PHP server, create a folder called <code>quotes</code>. Within the <code>quotes</code> folder, create another folder called <code>data</code>. Our folder structure now looks like this <code>quotes\data</code>.</p>
<p>Since sqlite is so easy, we could create a new file in our <code>data</code> folder, rename it <code>quotes.db</code>, call it good and do the heavy lifting with PHP. But, since the only compelling reason to develop on Windows is the plethora of gui tools, we are going to make it even easier.</p>
<ul>
<li>Download SQLite Adminstrator from <a href="http://download.orbmu2k.de/download.php?id=19" title="SQLite Administrator">here</a>.</li>
<li>Create a new database (call it quotes.db if you like) and save it in the <code>data</code> folder.</li>
<li>Run this query:
<pre>CREATE TABLE quotes (id INTEGER PRIMARY KEY AUTOINCREMENT, q_text TEXT, q_author TEXT, q_source TEXT)</pre>
</li>
</ul>
<p>That pretty much covers it from the database side. Not a lot of code in here yet, but, at least its something. Till next time.</p>
]]></content:encoded>
			<wfw:commentRss>http://trentvb.com/blog/2011/12/learning-ajax-with-coffeescript-jquery-php-and-sqlite-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learning AJAX with Coffeescript, jQuery, PHP, and SQLite Part 1</title>
		<link>http://trentvb.com/blog/2011/11/learning-ajax-with-coffeescript-jquery-php-sqlite/</link>
		<comments>http://trentvb.com/blog/2011/11/learning-ajax-with-coffeescript-jquery-php-sqlite/#comments</comments>
		<pubDate>Tue, 15 Nov 2011 05:55:19 +0000</pubDate>
		<dc:creator>Trent Van Bemmel</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://trentvb.com/blog/?p=346</guid>
		<description><![CDATA[We recently went through a huge migration at work (Lotus Notes to Exchange) and I needed a way to decompress, so I thought I would learn something new. I have some previous experience in web development, so I thought a &#8230; <a href="http://trentvb.com/blog/2011/11/learning-ajax-with-coffeescript-jquery-php-sqlite/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>We recently went through a huge migration at work (Lotus Notes to Exchange) and I needed a way to decompress, so I thought I would learn something new. I have some previous experience in web development, so I thought a little project like this would be fun.</p>
<h2>The Tools</h2>
<p>Let me dwell a second and give some of the reasoning behind the tools I&#8217;m using here. </p>
<p><a href="http://www.sqlite.org/" title="SQLite">SQLite:</a> I like SQLite for learning applications because it is quick, easy, and, since it is a file based database, I can replicate the changes through <a href="http://subversion.tigris.org/" title="SVN">SVN</a>. This way, no matter which work station I sit at, I can have the exact environment I left&#8230;even the database. </p>
<p><a href="http://php.net/" title="PHP">PHP:</a> I programmed with PHP at my last job and despite the fact that I enjoy the syntax of <a href="http://python.org/" title="python">python</a> better, PHP is still a great tool. </p>
<p><a href="http://jquery.com/" title="jQuery">jQuery:</a> its hard to do anything involving JavaScript without mentioning jQuery. It&#8217;s shortcuts are priceless. </p>
<p><a href="http://jashkenas.github.com/coffee-script/" title="Coffeescript">Coffeescript:</a> Obviously the least known tool in the stack, one may wonder why you need anything more than jQuery in order to write good JavaScript. And, you&#8217;re right. You don&#8217;t &#8220;need&#8221; Coffeescript. You don&#8217;t even need jQuery. I stumbled upon Coffeescript a while back and really related to the syntax. JavaScript, especially the proper scoping of variables, remains somewhat of an enigma to me. Coffeescript helps me translate it into something I understand a bit better.</p>
<h2> The Setup</h2>
<p>This walk through doesn&#8217;t require much, but, I always find the best place to start is the beginning. Before we can write some code, we need to setup our environment.</p>
<h3>PHP</h3>
<p>Any LAMP, WAMP, MAMP, or BAMP setup will work just dandy for anything I will be doing in the next couple entries (although we won&#8217;t be using the M part of any of those setups since we&#8217;ll be using SQLite instead of MySql.) Usually, on Windows, I prefer the <a href="http://www.zend.com/en/products/server-ce/" title="Zend Community Server">Zend Community Server</a>. The only stipulation is that the version of PHP needs to be able to do PDO. Correct me if I&#8217;m wrong, but, I think your pretty safe with any PHP version that starts with a 5.</p>
<h3>Coffeescript</h3>
<p>The trickiest part of the development environment is getting Coffeescript setup. If your setup has any *nix in it, you&#8217;ll have to take a detour through <a href="http://nodejs.org/" title="Node.js">here</a> to get that figured out. Once you have Node.js working, its as easy as:</p>
<p><code>npm install -g coffee-script</code></p>
<p>For those of you following along on your Windows box, I have a different solution. Following the instructions <a href="https://github.com/alisey/CoffeeScript-Compiler-for-Windows">here</a>:</p>
<ol>
<li>Download the Node.js executable for windows from <a href="http://nodejs.org/#download">http://nodejs.org/#download</a> and run the installer.</li>
<li>Download Coffeescript from <a href="http://github.com/jashkenas/coffee-script/tarball/master">http://github.com/jashkenas/coffee-script/tarball/master</a>, extract (use <a href="http://www.7-zip.org/">7-zip</a> if you need to), and place in your <code>Program Files</code> directory.</li>
<li>Create a new text file on your desktop and rename it to <code>coffee.cmd</code>. Edit the file so that it contains the following text:<br /><code>@echo off<br />
"%PROGRAMFILES%/nodejs/node.exe" "%PROGRAMFILES%/CoffeeScript/bin/coffee" %*</code></p>
<p><strong><em>Note:</em></strong>If you are running 64-bit Windows, you can either replace <code>"%PROGRAMFILES%/Node/node.exe"</code> with <code>"C:\Program Files (x86)\nodejs\node.exe"</code> or move your <code>nodejs</code> folder from <code>C:\Program Files (x86)</code> to <code>C:\Program Files</code>. Its your call.</li>
<li>Move <code>coffee.cmd</code> to your <code>C:\Windows\System32</code> folder</li>
</ol>
<p>If all is well in Coffeescript land, you should be able to open a command line, type <code>coffee</code> and enter an interactive session. Use <code>ctrl-c</code> to exit.</p>
<p>With that, we should be all setup. Tune in next time and we will actually write some code.</p>
<ul>
<li><a href="http://trentvb.com/blog/2011/12/learning-ajax-with-coffeescript-jquery-php-and-sqlite-part-2/" title="Part 2">Part 2, Database setup &#8211;></a></li>
]]></content:encoded>
			<wfw:commentRss>http://trentvb.com/blog/2011/11/learning-ajax-with-coffeescript-jquery-php-sqlite/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The pot calls the kettle black. Facebook v Google</title>
		<link>http://trentvb.com/blog/2011/05/the-pot-calls-the-kettle-black-facebook-v-google/</link>
		<comments>http://trentvb.com/blog/2011/05/the-pot-calls-the-kettle-black-facebook-v-google/#comments</comments>
		<pubDate>Thu, 12 May 2011 17:03:31 +0000</pubDate>
		<dc:creator>Trent Van Bemmel</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://trentvb.com/blog/?p=327</guid>
		<description><![CDATA[I read an article this morning about the smear campaign Facebook hired a PR firm to run against Google. You can read the full article here. The explosion of irony happens when Facebook states its reasons for the campaign: Facebook &#8230; <a href="http://trentvb.com/blog/2011/05/the-pot-calls-the-kettle-black-facebook-v-google/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I read an article this morning about the smear campaign Facebook hired a PR firm to run against Google. You can read the full article <a href="http://www.engadget.com/2011/05/12/facebook-admits-hiring-pr-firm-to-smear-google/">here</a>.</p>
<p>The explosion of irony happens when Facebook states its reasons for the campaign:</p>
<ol>
<li>Facebook believes Google is violating users privacy (which Google may be doing&#8211;I am not familiar with the particular Google service the article mentions).</li>
<li>Facebook believes that Google &#8220;may be improperly using data they have scraped about Facebook users.&#8221;</li>
</ol>
<p>This would be equivalent to Facebook taking <em>your</em> personal information, publishing it on a billboard, and then crying foul at Google for looking at the billboard.</p>
<p>All I can say is<a href="http://en.wikipedia.org/wiki/Facepalm"> /facepalm</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://trentvb.com/blog/2011/05/the-pot-calls-the-kettle-black-facebook-v-google/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

