<?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>Blog of Travis Glines</title>
	<atom:link href="http://www.travisglines.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.travisglines.com</link>
	<description>Interesting stuff, coding tips ... you name it</description>
	<lastBuildDate>Tue, 10 May 2011 01:39:50 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Startup Fundamentals: Lessons Learned the Hard Way</title>
		<link>http://www.travisglines.com/web/startup-fundamentals-lessons-learned-the-hard-way</link>
		<comments>http://www.travisglines.com/web/startup-fundamentals-lessons-learned-the-hard-way#comments</comments>
		<pubDate>Tue, 10 May 2011 01:16:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.travisglines.com/?p=289</guid>
		<description><![CDATA[During my high school years I played basketball. One thing that stuck with me more than anything from my experience was that the difference between teams that won and teams that lost was fundamentals. Coach Howard would tell us day in and day out that taking care of the ball, reducing turnovers, making free throws, [...]]]></description>
				<content:encoded><![CDATA[<p>During my high school years I played basketball.  One thing that stuck with me more than anything from my experience was that the difference between teams that won and teams that lost was fundamentals.  Coach Howard would tell us day in and day out that taking care of the ball, reducing turnovers, making free throws, getting the ball inside, playing solid defense and controlling the pace of the game were all essential.  It finally paid off when we made it to the championship game in my senior year.</p>
<p>What does this have to do with web startups you ask?  Well, since that time in pretty much any competitive game, I&#8217;ve noticed that there are a few key focus areas that separate winning teams from loosing teams.  You can grade a team based on these things and predict very well how they would do.  After spending the last few months working on a web startup, I&#8217;d like to share the things I learned first hand and the fundamentals that governed the game.  Please excuse my naivety if this post seems obvious, or overgeneralizing to you as I sure didn&#8217;t know these things well enough going into the process and had I read this post I may have been that little bit more effective.  Hopefully it&#8217;ll help someone else out there trying to do the same.</p>
<p><img alt="Startup Fundamentals" src="https://chart.googleapis.com/chart?cht=p&#038;chs=400x200&#038;chdl=Traction|Technical%20Execution|Idea&#038;chdlp=r&#038;chco=3399CC%2C80C65A%2CFF0000&#038;chd=e%3A......" title="Startup Fundamentals" class="aligncenter" width="400" height="200" /></p>
<p>The three fundamentals I found were the Idea, Traction and Technical Execution.  Each of these has equal weight.  Now let me go much deeper into each of these to explain why they&#8217;re important, what I really mean by each and more specific details.</p>
<p><strong>Idea</strong><br/></p>
<p>The idea is essential to the business, however commonly too heavily relied upon as someone thinking they can have a great product.  The idea for me, is more encompassing than the typical &#8220;I have a business idea!&#8221; with no more further thought.  It includes things that people like Paul Graham would ask you: &#8220;How big is the possible addressable market?  Who are your competitors?  How will you make money?  Does it fix a need or problem people have?  What&#8217;s new about your idea?&#8221;  This is where the Lean Startup movement really shines because basically you quickly pivot until you find an idea that works.  You define an idea that works by one that finds traction readily available.  The better the idea the easier the traction will be to aquire.</p>
<p><strong>Technical Execution</strong><br/></p>
<p>Can your team sustainably put together a solid product and iterate?  If you&#8217;re going to compete in a red hot market like web startups you need to have the chops to code a product quickly and iterate on it to improve it.  In some rare cases technical execution can be nearly all you need;  These are typically areas that are on the edge of what is possible technically, where the idea is more obvious and can provide first mover advantage if executed.  </p>
<p>Technical execution is everything from design to site speed.  Its the quality of the product you have produced.  If you&#8217;re Zappos its customer service, if you&#8217;re Netflix its streaming bandwidth and if you&#8217;re TechCrunch its the quality and relevance of your posts.  I say sustainably because writing good code is only a small piece of pulling a product off.  You need to be able to have a nice work environment and work together as a team.  Politics and disgruntled team members will distract you into ruins unless you&#8217;re vigilant.  </p>
<p><strong>Traction</strong><br/></p>
<p>More precisely the ability to gain traction.  This was one of the realizations that hit home the hardest:  you can build the best product in the world, that everyone wants and still fail.  Relevant people need to hear about it.  Good startups will have a plan (not &#8220;Well, we&#8217;ll just post it on HackerNews&#8221;) for getting people to actually start using and continue using their product.  I feel like most web startups these days fail, not because the idea sucked or the team made a bad product &#8230; but because no one ever heard about it.</p>
<p><strong>Some Examples:</strong><br/></p>
<p>Google stole market share from Lycos, Yahoo!, Excite, AskJeeves and the like through having better search results.  Their superior PageRank algorithim drove traction through an established business/product model.</p>
<p>Facebook seems like traction wizardry to me.  It came into a market already dominated my MySpace.  However going after college students first and starting in the best place to do that (Boston, MA is probably the best/largest college &#8220;town&#8221; in the world) was a brilliant circumstance that I think led to its success over MySpace.  College students share things &#8230; fast, and have enough time/willingness to try them out.</p>
<p><strong>TLDR;</strong><br/></p>
<p>Startups need to focus on one question:  Are you building something well, that people want, will pay for and will somehow hear about?  </p>
<p>Lacking in any one of these areas can kill off your startup entirely.  Most startups need to beat their competition in all three fundamentals and blow them away in one.</p>
<p>Discussion on HN: <a href="http://news.ycombinator.com/item?id=2530902">http://news.ycombinator.com/item?id=2530902</a> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.travisglines.com/web/startup-fundamentals-lessons-learned-the-hard-way/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WebGL + Node.js + WebSockets = A Web Technology Perfect Storm</title>
		<link>http://www.travisglines.com/web-coding/webgl-node-js-websockets-a-web-technology-perfect-storm</link>
		<comments>http://www.travisglines.com/web-coding/webgl-node-js-websockets-a-web-technology-perfect-storm#comments</comments>
		<pubDate>Thu, 07 Apr 2011 05:43:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Coding]]></category>

		<guid isPermaLink="false">http://www.travisglines.com/?p=279</guid>
		<description><![CDATA[Over the past few months a few things have become extremely clear to me: web technologies are exploding and the capabilities for software on the web is soon to meet that of desktop software if innovation continues along this path. The web technologies I&#8217;m talking about are webGL, websockets and node.js. WebGL enables web developers [...]]]></description>
				<content:encoded><![CDATA[<p>Over the past few months a few things have become extremely clear to me: web technologies are exploding and the capabilities for software on the web is soon to meet that of desktop software if innovation continues along this path.</p>
<p>The web technologies I&#8217;m talking about are webGL, websockets and node.js.  WebGL enables web developers to utilize many of OpenGL&#8217;s features inside a web browser and bring 3D applications to the web.  Websockets allow a client to communicate with a server with significantly less overhead than ajax, making real time applications on the web much more doable.  Node.js allows the server to salably handle all these websocket connections.  The real kicker is that they&#8217;re all coming to maturity at the same time and cater to each other in a huge way.</p>
<p>When you think of 3D on the web, you typically think of games first.  Games in 3D are fun, but what if you could do multiplayer gaming inside a web browser, with a server that could scale?  This is a reality that I think is now upon us and on a night before YCombinator starts announcing who gets into their summer program and developers are showing off their apps, I&#8217;d like to share with you a simple app I made to demonstrate what I mean.  I made a simple chat application using the above technology stack (and others: socket.io, now.js, three.js).  Keep in mind its mostly just a proof of concept, I wrote it in a few hours and is very primitive.</p>
<p>Demo: <a href="http://labs.travisglines.com">http://labs.travisglines.com</a></p>
<p>You can move around with the arrow keys and hit enter to send the text you have written.  Its extremely simple and there are plenty of bugs/errors/vulnerabilities I&#8217;m sure, but it gets the point across.</p>
<p>I personally can&#8217;t wait for 3D to come to the web (hopefully its in the form of WebGL instead of Adobe&#8217;s Molehill) and think its just a matter of time until it happens.  One of the things that people are instantly going to want to do is interact.  In 3 dimensions that means sharing 3 position variables, chat and actions all in real time.  Luckily enough node.js came along just in time to make the process nearly trivial and in 57 lines of server side code I can share 3 position variables and let users chat with each other.  The individual pieces are themselves very cool, but with all of these technologies coming to maturity at roughly the same time the opportunities and possibilities are huge.  Things like a web based MMO game, 3D shopping with friends in realtime (something I&#8217;d like to pursue here soon if we don&#8217;t get accepted to YC) and more are all possible at this point.</p>
<p>Whenever new technologies or server stacks come out, it seems there is always a company that succeeds and champions the tech. I look forward to what comes out of these technologies in the next few years and am excited for the company that gets it right.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.travisglines.com/web-coding/webgl-node-js-websockets-a-web-technology-perfect-storm/feed</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
		<item>
		<title>Dear Google Chrome Team: Please Add An SSH Client To Google Chrome</title>
		<link>http://www.travisglines.com/web/dear-google-chrome-team-please-add-an-ssh-client-to-google-chrome</link>
		<comments>http://www.travisglines.com/web/dear-google-chrome-team-please-add-an-ssh-client-to-google-chrome#comments</comments>
		<pubDate>Wed, 09 Mar 2011 02:00:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.travisglines.com/?p=268</guid>
		<description><![CDATA[Dear Google Chrome Team, I&#8217;m a huge fan of your browser, Chrome OS and your efforts to bring applications to the web. However I find that one thing missing would help me greatly: an SSH client built into Chrome. I&#8217;ve even found more people looking for the same: http://groups.google.com/a/chromium.org/group/chromium-os-discuss/browse_thread/thread/50ec071f2512371d http://www.google.com/support/forum/p/Chrome/thread?tid=5953879cbacec9f0&#038;hl=en Like said in those threads [...]]]></description>
				<content:encoded><![CDATA[<p>Dear Google Chrome Team,</p>
<p>I&#8217;m a huge fan of your browser, Chrome OS and your efforts to bring applications to the web.  However I find that one thing missing would help me greatly:  an SSH client built into Chrome.</p>
<p>I&#8217;ve even found more people looking for the same:<br />
<a href="http://groups.google.com/a/chromium.org/group/chromium-os-discuss/browse_thread/thread/50ec071f2512371d">http://groups.google.com/a/chromium.org/group/chromium-os-discuss/browse_thread/thread/50ec071f2512371d</a></p>
<p><a href="http://www.google.com/support/forum/p/Chrome/thread?tid=5953879cbacec9f0&#038;hl=en">http://www.google.com/support/forum/p/Chrome/thread?tid=5953879cbacec9f0&#038;hl=en</a></p>
<p>Like said in those threads it could be extremely simple &#8230; type <strong>&#8220;ssh://username@domain.com:port_number&#8221;</strong>.  You could even bookmark it and simply click it to go to the server, it would ask you for a password and bingo you&#8217;d be in.  Heres a screenshot:</p>
<p><a href="http://www.travisglines.com/wp-content/uploads/2011/03/ssh.jpg"><img src="http://www.travisglines.com/wp-content/uploads/2011/03/ssh-298x300.jpg" alt="" title="ssh" width="298" height="300" class="alignnone size-medium wp-image-271" /></a></p>
<p>If you wanted to get real fancy with it you could do some theme overriding, ssh key stuff and scp file upload/download tool.</p>
<p>I use windows as my main operating system (software availability/drivers being the main motivation for this) and typically ssh into linux servers from there.  This means that I have to use Putty or another SSH client to navigate to them.  One main problem is if I&#8217;m on a friends/family member/library&#8217;s computer it probably has Google Chrome but no SSH client.  This means I have to go out and download Putty onto their system if I can at all.  (<del datetime="2011-03-09T10:13:12+00:00">Administrator privileges required</del>)  An SSH client built in would solve that in one fell swoop.  </p>
<p>I would love to use just one application to communicate with outside servers (and have applications live on the web, not on my desktop) some day and think that integrating an SSH client could be a huge step forward in this goal.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.travisglines.com/web/dear-google-chrome-team-please-add-an-ssh-client-to-google-chrome/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Lets make a Twitter Clone in Node.js</title>
		<link>http://www.travisglines.com/web-coding/lets-make-a-twitter-clone-in-node-js</link>
		<comments>http://www.travisglines.com/web-coding/lets-make-a-twitter-clone-in-node-js#comments</comments>
		<pubDate>Sat, 05 Mar 2011 21:28:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[Web Coding]]></category>

		<guid isPermaLink="false">http://www.travisglines.com/?p=238</guid>
		<description><![CDATA[During last few weeks I&#8217;ve promised many (mostly from HackerNews) that I would publish and open source an example application in Node.js using some of the techniques I&#8217;ve talked about. While in need of a little intellectual diversity from my normal role working 24/7 on my startup (http://www.exipe.com) I decided that making a twitter clone [...]]]></description>
				<content:encoded><![CDATA[<p>During last few weeks I&#8217;ve promised many (mostly from HackerNews) that I would publish and open source an example application in Node.js using some of the techniques I&#8217;ve talked about.  While in need of a little intellectual diversity from my normal role working 24/7 on my startup (<a href="http://www.exipe.com">http://www.exipe.com</a>) I decided that making a twitter clone would be cool.  </p>
<p>This morning I purchased the domain name nodrr.com (instead of tweet you nod &#8230; if that makes any sense &#8230; kind of a play on node.js + twitter + some physical action) for this purpose.  It&#8217;s currently just after 4:15 PM on Saturday afternoon the East Coast of the US, I just went out Thursday night for a bit with friends so I&#8217;m not feeling all socially isolated by this, I just watched The Social Network (inspiration) and I&#8217;m feeling the need to code &#8230; lets make a Twitter clone in node.</p>
<p>I&#8217;ll be live blogging the whole time with edits, updates and battleplans.  Please forgive my lack of attention to grammar/spelling/common sense English writing skills as I&#8217;ll be focusing on coding, not so much whether that use of ellipsis was correct. Watch my coding progress on github as well if you&#8217;d like: <a href="https://github.com/tglines/nodrr">https://github.com/tglines/nodrr</a></p>
<p><strong>4:25PM &#8211; First things first:</strong></p>
<ul>
<li>Set up EC2 Micro Instance with Ubuntu 64-bit</li>
<li>Set up git/github link on the EC2 instance</li>
<li>Download and install Node.js, npm and some of the libraries I&#8217;ll be using</li>
<li>Provision an AWS elastic IP and point nodrr.com at my EC2 instance</li>
</ul>
<p><strong>4:40PM &#8211; Box is up:</strong></p>
<ul>
<li>EC2 is up, dns records are pointed to the elastic IP and we&#8217;re SSH&#8217;ed In</li>
<li>Compiling node</li>
</ul>
<p><strong>5:10PM &#8211; Git project initialized, node built, npm installed.</strong></p>
<ul>
<li>Grabbed express, connect-auth, mongoose, jade for now from npm</li>
<li>Now installing mongodb packages</li>
<li>Cue the <a href="http://www.youtube.com/watch?v=YtdWHFwmd2o&#038;feature=BF&#038;list=MLGxdCwVVULXdoMgoVZr_K9d8CXXSb1xvF&#038;index=2">Daft Punk</a></li>
<li>Vote for the news item on <a href="http://news.ycombinator.com/item?id=2292563">HackerNews</a> <img src='http://www.travisglines.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </li>
</ul>
<p><strong>5:35PM &#8211; Project directories setup, main script started &#8230; getting an unexpected error</strong></p>
<ul>
<li>Grabbed a few more npm libs &#8211; connect-mongodb and connect-force-domain</li>
<li>Getting and error with express.bodyDecoder() &#8230; hmmm</li>
</ul>
<p><strong>5:50 PM &#8211; Theres the bug &#8230; connect renamed bodydecoder to bodyparser</strong></p>
<ul>
<li>Gotta keep up on this stuff &#8211; <a href="https://github.com/senchalabs/connect">https://github.com/senchalabs/connect</a></li>
<li>Back on track here</li>
</ul>
<p><strong>6:05 PM &#8211; Facebook Connect Setup</strong></p>
<ul>
<li>Got oauth through npm</li>
<li>Set up the app on facebook</li>
<li>Jade template isn&#8217;t getting the title &#8230;. </li>
</ul>
<p><strong>6:10 PM &#8211; Battling a new one</strong></p>
<ul>
<li><a href="http://groups.google.com/group/express-js/browse_thread/thread/4ef880f85fe32cfb">The Error &#8230; </a></li>
</ul>
<p><strong>6:23 PM &#8211; Hello World</strong></p>
<ul>
<li>Got a hello world up (taking down now so dont check yet)</li>
<li>Fixed the express.js local variable passing change &#8230; see my error above about the title</li>
<li>Lets start putting in some real stuff here &#8230; auth/login &#8230; forms  &#8230; all the good stufff</li>
</ul>
<p><strong>6:40 PM &#8211; Some Frontend</strong></p>
<ul>
<li>Added a reset style sheet from yahoo and included style.css</li>
<li>Included jquery from google&#8217;s cdn and a template main.js</li>
</ul>
<p><strong>6:55 PM &#8211; Dinner Break</strong></p>
<ul>
<li>Be back in a bit</li>
</ul>
<p><strong>7:10 &#8211; Back @ it</strong></p>
<ul>
<li>The buffalo chicken/cuscus was very tasty.</li>
<li>Lets do a color scheme like: <a href="http://nodejs.org/">http://nodejs.org/</a></li>
<li>Working on facebook login auth &#8230; we&#8217;ll later add more providers like twitter/github/google etc</li>
</ul>
<p><strong>7:30 PM &#8211; Once More Into the Breach</strong></p>
<ul>
<li>Now Getting this error on redirect attempts:  Error: Can&#8217;t set headers after they are sent.</li>
<li><a href="https://github.com/visionmedia/express/issues/closed/#issue/555">hmm&#8230;</a></li>
</ul>
<p><strong>8:10 PM &#8211; Redirect Problem = Solved For Now</strong></p>
<ul>
<li>The redirect problem with facebook connect has now been solved</li>
<li>After initial login with connect throwing the user to a make a username page.</li>
</ul>
<p><strong>8:45 PM &#8211; We Have Nods!</strong></p>
<ul>
<li>The first nods are going in the database now, some serious securing to do </li>
<li>Heres a screenshot:<br />
            <img src="http://www.travisglines.com/wp-content/uploads/2011/03/nods.jpg" alt="" title="nods" width="349" height="244" class="alignnone size-full wp-image-259" />
        </li>
</ul>
<p><strong>9:05 PM &#8211; Stylin</strong></p>
<ul>
<li>A little more style:<br />
            <img src="http://www.travisglines.com/wp-content/uploads/2011/03/nods2.jpg" alt="" title="nods2" width="496" height="265" class="alignnone size-full wp-image-261" />
        </li>
</ul>
<p><strong>11:22 &#8211; Another Screenshot</strong></p>
<ul>
<li>User Pages Much Better</li>
<li>Need Pagination and character limits</li>
<li>Screenshot:<img src="http://www.travisglines.com/wp-content/uploads/2011/03/nods3.jpg" alt="" title="nods3" width="444" height="711" class="alignnone size-full wp-image-264" />
        </li>
</ul>
<p><strong>12:18 &#8211; Check it Out: <a href="http://www.nodrr.com">http://www.nodrr.com</a></strong></p>
<ul>
<li>It works pretty decently but needs a lot of features to be more usable</li>
<li>Please keep in mind that this was just a demo and proof of concept</li>
<li>Check out my real startup @ www.exipe.com</li>
<li>Time for bed.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.travisglines.com/web-coding/lets-make-a-twitter-clone-in-node-js/feed</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>What it&#8217;s like building a real website in Node.js</title>
		<link>http://www.travisglines.com/web-coding/what-its-like-building-a-real-website-in-node-js</link>
		<comments>http://www.travisglines.com/web-coding/what-its-like-building-a-real-website-in-node-js#comments</comments>
		<pubDate>Mon, 28 Feb 2011 02:35:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[Web Coding]]></category>

		<guid isPermaLink="false">http://www.travisglines.com/?p=232</guid>
		<description><![CDATA[It seems more and more so that people are interested in building their applications in node.js yet there are few reviews on what it&#8217;s actually like to work with the framework. I&#8217;ve designed and am nearly finished building out all of the features of a full scale (user accounts etc) social news site in node. [...]]]></description>
				<content:encoded><![CDATA[<p>It seems more and more so that people are interested in building their applications in node.js yet there are few reviews on what it&#8217;s actually like to work with the framework.  I&#8217;ve designed and am nearly finished building out all of the features of a full scale (user accounts etc) social news site in node. (<a href="http://www.exipe.com">www.exipe.com</a>)  Here are a few of the things I&#8217;ve found and maybe they can help you in your decision to go with node.  I will choose to ignore the thing that people point to first: because its event oriented it can handle more concurrent users better.  Lets assume that as true and talk about some things that less people are talking about.</p>
<ol>
<li><strong>There&#8217;s a steep asynchronus learning curve</strong></li>
<p>Even though I&#8217;ve made many a javascript application before working on this project, including fooling around in node some, I found adapting to the asynchronous programming style a significant challenge.  Every database interaction you do, every file system read or write, even http requests are asynchronous and need callbacks.  This means that quite often if you want to do 10 different things for example you can end up with spaghetti code with 10 different scoping levels of indentation.  As you learn and grow with the tools in node you learn that you can attach listeners to things and create separate functions to mitigate these problems and shortly after it almost feels natural.
  </p>
<li><strong>The Node.js project and its libraries move fast, and you have to keep up</strong></li>
<p>As many of you know node is a very new open source framework that has undergone many changes (some of which can break things) in the last few months. (since I started working with it on Exipe)   This meant that I needed to be careful to notice what changed in the update and make sure I fixed anything that broke when updating.  Some would ask &#8220;why don&#8217;t you just use the old version?&#8221;  My response to that is the bug fixes and improvements are well worth the small changes in node.  Another thing that happens is libraries such as mongoose (which we have been using to interact with our MongoDB database) undergo many changes as well.  If I had any advice to give here it would be keep up with the latest going on in node and the packages/libraries you use because if you fall behind there may be no one willing to support an older version.</p>
<li><strong>The community support is amazing and very active</strong></li>
<p>Like many programmers I frequent sites like github, google groups and stackoverflow.  Upon asking questions, posting comments or sharing bugs about anything node related on those sites I&#8217;ve found a response that was fast, cordial and most importantly &#8230; correct.  This has made any headaches in dealing with such a new framework relatively painless because so many others are going through or working on the same issues.  I think I even heard that the node github page is more active than the rails project page.</p>
<li><strong>Some of the libraries can save you a ton of time</strong></li>
<p>I found that one of the features I wanted in the site was a facebook login.  While I&#8217;ve previously dealt with facebook connect in php and found it relatively painless there I expected something like that might be a headache in node.  After finding the connect-auth library it turned into a piece of cake with a little monkey see monkey do thrown in from following the examples.  I wanted to interact with S3 to store images and found a wonderful project called knox.  Pretty much anything you can think of theres probably a tool that integrates with node that is of high quality and actively developed.</p>
<li><strong>Server stuff is often easier to handle</strong></li>
<p>Working on php applications I often remember having to learn the black magic of configuring apache to do what I wanted.  While not rocket science it seemed to be overly difficult and finding easy to understand, accurate documentation was hard.  In node, if you use it as the server things like changing the port you&#8217;re hosting it on is as easy as changing which number you tell it to listen on.  (these things are often/can be internal to node)</p>
<li><strong>You can &#8220;cut corners&#8221; on requests easier</strong></li>
<p>It is fairly trivial to tell node to return a web request (say a user voting on a link) before interacting with the database, thus minimizing the time that the user is waiting for feedback.  While I never got deep enough on a big project to want to do this with php, I&#8217;m not sure of how to do it off the top of my head.</p>
<li><strong>Interacting with other websites is simple</strong></li>
<p>Telling your webserver to go out, download a web page, parse it and return something of significance to you is very easy in node.  Something I have found more challenging in other languages and frameworks. (while possible and very doable they don&#8217;t support it so directly as node does)</p>
<li><strong>You can MVC all you want</strong></li>
<p>In one of my <a href="http://www.travisglines.com/web-coding/a-simple-mvc-setup-in-node-js">previous posts</a> I talk about a simple MVC setup with node.js.  Similar to frameworks in other languages it is not only possible, but easy to set up and powerful</p>
<li><strong>NPM is awesome</strong></li>
<p>If you want to install/update any of the packages you are using for node it is always very easy to do so with a tool like NPM.  A simple npm install whatever_package and bingo you have it, ready to go.</p>
</ol>
<p>Hopefully this post has convinced some people to try out node for its active community/powerful tools and dissuaded some not intent on the extra learning/maintenance because that&#8217;s what I&#8217;ve found you&#8217;re probably in for. Whether node.js is the choice for you or not, I&#8217;ve found that the pros outweigh the cons in development of exipe and have loved working with the framework.  Shameless plug:  If you feel like checking out what a node.js website feels like head over to <a href="http://www.exipe.com">www.exipe.com</a> and sign up for our beta coming in March.</p>
<p>For those of you from HackerNews waiting for me to open source the more specific/thorough example of a node MVC setup, worry not as its nearly done and I&#8217;ll share it soon</p>
]]></content:encoded>
			<wfw:commentRss>http://www.travisglines.com/web-coding/what-its-like-building-a-real-website-in-node-js/feed</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>A Simple MVC Setup In Node.JS</title>
		<link>http://www.travisglines.com/web-coding/a-simple-mvc-setup-in-node-js</link>
		<comments>http://www.travisglines.com/web-coding/a-simple-mvc-setup-in-node-js#comments</comments>
		<pubDate>Mon, 21 Feb 2011 02:22:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Coding]]></category>

		<guid isPermaLink="false">http://www.travisglines.com/?p=220</guid>
		<description><![CDATA[I&#8217;m sure many of you have heard about the new server side javascript project called node.js. I&#8217;ve been using myself to build full stack dynamic websites and find it a very nice environment to create a dynamic website. When I first started out I had no idea what sort of way one should create an [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m sure many of you have heard about the new server side javascript project called node.js.  I&#8217;ve been using myself to build full stack dynamic websites and find it a very nice environment to create a dynamic website.  When I first started out I had no idea what sort of way one should create an MVC style framework with node or what modules would help me to achieve the model, view, controller ideal.  Heres my stack:</p>
<ul>
<li><strong>Node.js</strong> (<a href="http://nodejs.org/">http://nodejs.org/</a>) of course</li>
<li><strong>NPM</strong> (<a href="http://npmjs.org/">http://npmjs.org/</a>) to easily install packages for node.</li>
<li><strong>Express</strong> (<a href="http://expressjs.com/">http://expressjs.com/</a>) &#8211; a very nice web development framework built on connect (allows &#8220;controllers&#8221;)</li>
<li><strong>Mongoose</strong> (<a href="http://mongoosejs.com/">http://mongoosejs.com/</a>) &#8211; a solid orm for mongodb in node.js that just released a much improved version (allows &#8220;models&#8221;)</li>
<li><strong>Jade</strong> (<a href="http://jade-lang.com/">http://jade-lang.com/</a>) &#8211; a template engine for node that allows some cool shorthand (allows &#8220;views&#8221;)</li>
<li>Other tools were used of course but those were the essentials.</li>
</ul>
<p>The application directory looks something like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>app-root
  <span style="color: #000000; font-weight: bold;">/</span>models
  <span style="color: #000000; font-weight: bold;">/</span>views
  <span style="color: #000000; font-weight: bold;">/</span>controllers
  <span style="color: #000000; font-weight: bold;">/</span>public
  <span style="color: #000000; font-weight: bold;">/</span>tests
  <span style="color: #000000; font-weight: bold;">/</span>scripts
  <span style="color: #000000; font-weight: bold;">/</span>logs
  <span style="color: #000000; font-weight: bold;">/</span>tmp
  app.js</pre></td></tr></table></div>

<p>Inside the application I instantiate express, include my mongoose models and include my routes/controllers from the controllers directory at the bottom.  Inside the controllers I call res.render to render the jade views and it all works very nicely.  If people would like me to elaborate on this more let me know.</p>
<p>A huge shoutout and thank you to the LearnBoost guys (TJ Holowaychuk, Guillermo Rauch, Aaron Heckmann, and many more that aren&#8217;t associated with LearnBoost) who&#8217;ve made Node.js web application development a breeze. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.travisglines.com/web-coding/a-simple-mvc-setup-in-node-js/feed</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Node.js, Unix based OS and MongoDB (NUM) are the new LAMP</title>
		<link>http://www.travisglines.com/web-coding/node-js-unix-based-os-and-mongodb-num-are-the-new-lamp</link>
		<comments>http://www.travisglines.com/web-coding/node-js-unix-based-os-and-mongodb-num-are-the-new-lamp#comments</comments>
		<pubDate>Sat, 11 Sep 2010 14:51:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Coding]]></category>

		<guid isPermaLink="false">http://www.travisglines.com/?p=209</guid>
		<description><![CDATA[LAMP is the web stack that powers the majority of websites today. My argument is that we are in the beginning stages of a transition away from using Linux, Apache, MySQL and PHP (there other variants) towards utilizing Node.js, a Unix based operating system and MongoDB for hosting web applications. Here&#8217;s why: Node.js scales better [...]]]></description>
				<content:encoded><![CDATA[<p>LAMP is the web stack that powers the majority of websites today.  My argument is that we are in the beginning stages of a transition away from using Linux, Apache, MySQL and PHP (there other variants) towards utilizing Node.js, a Unix based operating system and MongoDB for hosting web applications.  Here&#8217;s why:</p>
<h2>Node.js scales better and can do more with a simpler interface than Apache and PHP</h2>
<p>The combination of apache and php to serve web sites is a threaded system.  When a request comes in to apache it spawns a new thread and php renders the page.  During heavy load apache&#8217;s spawning of threads can actually be the bottleneck in the system if the database is really fast.  Node uses a very different system, running under Google Chrome&#8217;s V8 javascript engine it runs an event based system on one thread.  It has callbacks for just about everything and the thread never needs to wait for i/o to finish before moving on to something else.  During high load node excels because of this asynchronous system where it doesn&#8217;t use nearly as much memory because it does not spawn threads.  (A great talk on the difference: <a href="http://jsconf.eu/2009/video_nodejs_by_ryan_dahl.html">http://jsconf.eu/2009/video_nodejs_by_ryan_dahl.html</a>)  Another thing to keep in mind is websockets are starting to gain a backing and having many requests coming into apache over websockets is not just complicated but slow.</p>
<h2>Unix based OS</h2>
<p>While this will probably be linux both technologies work great on FreeBSD and Apple&#8217;s OSX.  This is really nothing new because there are things like wamp that exist for the lamp stack on windows.  I however, cringe when someone tells me they are developing anything other than a flash or windows application on windows.</p>
<h2>MongoDB</h2>
<p>The NoSQL trend is gaining huge traction these days because of its extreme performance advantages.  As opposed to MySQL and its other sql friends MongoDB keeps as much in memory as possible while still keeping it usable.  I make this point because Redis provides the speed of memory but without the tools you would find in an sql database.  Some benchmarking that proves my point: <a href="http://jayant7k.blogspot.com/2009/08/document-oriented-data-stores.html">http://jayant7k.blogspot.com/2009/08/document-oriented-data-stores.html</a></p>
<h4>I see a NUM future on the web, with users running real time web applications that utilize websockets.  They are sending at least a factor of ten more requests per second and the lamp stack&#8217;s days are most certainly numbered</h4>
]]></content:encoded>
			<wfw:commentRss>http://www.travisglines.com/web-coding/node-js-unix-based-os-and-mongodb-num-are-the-new-lamp/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>ClubLOC &#8211; A Big HTML5 Canvas Experiment</title>
		<link>http://www.travisglines.com/web-coding/clubloc-a-big-html5-canvas-experiment</link>
		<comments>http://www.travisglines.com/web-coding/clubloc-a-big-html5-canvas-experiment#comments</comments>
		<pubDate>Wed, 17 Mar 2010 03:52:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[Web Coding]]></category>
		<category><![CDATA[canvas]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[music]]></category>

		<guid isPermaLink="false">http://www.travisglines.com/?p=196</guid>
		<description><![CDATA[Check out my latest project: http://www.clubloc.com Its an ongoing project of mine that&#8217;ll let you listen to music while seeing cool visualizations in canvas. I&#8217;ll be updating it soon to let users have their own playlists and share them with friends. Eventually I want it to have a chat capability that lets you meet local [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.clubloc.com"><img src="http://www.travisglines.com/wp-content/uploads/2010/03/clubloc.jpg" alt="" title="clubloc" width="640" height="206" class="alignnone size-full wp-image-197" /></a></p>
<p>Check out my latest project: <a href="http://www.clubloc.com">http://www.clubloc.com</a></p>
<p>Its an ongoing project of mine that&#8217;ll let you listen to music while seeing cool visualizations in canvas.  I&#8217;ll be updating it soon to let users have their own playlists and share them with friends.  Eventually I want it to have a chat capability that lets you meet local people and share what you&#8217;re listening to.</p>
<p>I side step the legal barriers to this by using a neat trick, if you can figure it out props to you.</p>
<p>It gets its inspiration from the notorious demo by 9emelents at: <a href="http://9elements.com/io/projects/html5/canvas/" rel="nofollow">http://9elements.com/io/projects/html5/canvas/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.travisglines.com/web-coding/clubloc-a-big-html5-canvas-experiment/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google App Engine Python Time and Datetime Confusion</title>
		<link>http://www.travisglines.com/web-coding/google-app-engine-python-time-and-datetime-confusion</link>
		<comments>http://www.travisglines.com/web-coding/google-app-engine-python-time-and-datetime-confusion#comments</comments>
		<pubDate>Thu, 28 Jan 2010 02:18:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Coding]]></category>
		<category><![CDATA[datetime]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[time]]></category>

		<guid isPermaLink="false">http://www.travisglines.com/?p=187</guid>
		<description><![CDATA[Today while coding my first Facebook application running on Google App Engine I was getting odd errors related to time from the datastore. The problem was that Google App Engine&#8217;s time is always running from Coordinated Universal Time (UTC), even when you use something like: 1 2 import datetime datetime.datetime.now&#40;&#41; How you should and I [...]]]></description>
				<content:encoded><![CDATA[<p>Today while coding my first Facebook application running on Google App Engine I was getting odd errors related to time from the datastore.</p>
<p>The problem was that Google App Engine&#8217;s time is always running from Coordinated Universal Time (UTC), even when you use something like:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">datetime</span>
<span style="color: #dc143c;">datetime</span>.<span style="color: #dc143c;">datetime</span>.<span style="color: black;">now</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

<p>How you should and I have compensate for this is taking the difference of the time you want to UTC time in order to shift the time to the time zone of interest:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">datetime</span>
<span style="color: #dc143c;">time</span> <span style="color: #66cc66;">=</span> <span style="color: #dc143c;">datetime</span>.<span style="color: #dc143c;">datetime</span>.<span style="color: black;">utcnow</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span> - <span style="color: #dc143c;">datetime</span>.<span style="color: black;">timedelta</span><span style="color: black;">&#40;</span>hours <span style="color: #66cc66;">=</span> <span style="color: #ff4500;">5</span><span style="color: black;">&#41;</span> <span style="color: #808080; font-style: italic;"># for East Coast United States</span>
<span style="color: #dc143c;">time</span> <span style="color: #66cc66;">=</span> <span style="color: #dc143c;">datetime</span>.<span style="color: #dc143c;">datetime</span>.<span style="color: black;">utcnow</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span> - <span style="color: #dc143c;">datetime</span>.<span style="color: black;">timedelta</span><span style="color: black;">&#40;</span>hours <span style="color: #66cc66;">=</span> <span style="color: #ff4500;">6</span><span style="color: black;">&#41;</span> <span style="color: #808080; font-style: italic;"># for Central United States</span>
<span style="color: #dc143c;">time</span> <span style="color: #66cc66;">=</span> <span style="color: #dc143c;">datetime</span>.<span style="color: #dc143c;">datetime</span>.<span style="color: black;">utcnow</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span> - <span style="color: #dc143c;">datetime</span>.<span style="color: black;">timedelta</span><span style="color: black;">&#40;</span>hours <span style="color: #66cc66;">=</span> <span style="color: #ff4500;">7</span><span style="color: black;">&#41;</span> <span style="color: #808080; font-style: italic;"># for Rocky Mountains United States</span>
<span style="color: #dc143c;">time</span> <span style="color: #66cc66;">=</span> <span style="color: #dc143c;">datetime</span>.<span style="color: #dc143c;">datetime</span>.<span style="color: black;">utcnow</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span> - <span style="color: #dc143c;">datetime</span>.<span style="color: black;">timedelta</span><span style="color: black;">&#40;</span>hours <span style="color: #66cc66;">=</span> <span style="color: #ff4500;">8</span><span style="color: black;">&#41;</span> <span style="color: #808080; font-style: italic;"># for West Coast United States</span></pre></td></tr></table></div>

<p>This will give you the correct time in your time zone</p>
]]></content:encoded>
			<wfw:commentRss>http://www.travisglines.com/web-coding/google-app-engine-python-time-and-datetime-confusion/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Google App Engine Patch Invalid Sender Error</title>
		<link>http://www.travisglines.com/web-coding/google-app-engine-patch-invalid-sender-error</link>
		<comments>http://www.travisglines.com/web-coding/google-app-engine-patch-invalid-sender-error#comments</comments>
		<pubDate>Thu, 21 Jan 2010 10:39:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Coding]]></category>

		<guid isPermaLink="false">http://www.travisglines.com/?p=185</guid>
		<description><![CDATA[I got stuck this morning with an invalid sender error from my deployed Google app engine application (you can see the errrors in the log in the dashboard if it just says &#8220;Server Error&#8221; in the title tag) and I had to search around for a while for an answer. I eventually figured it out [...]]]></description>
				<content:encoded><![CDATA[<p>I got stuck this morning with an invalid sender error from my deployed Google app engine application (you can see the errrors in the log in the dashboard if it just says &#8220;Server Error&#8221; in the title tag) and I had to search around for a while for an answer.</p>
<p>I eventually figured it out and I&#8217;ll post my solution here just to make it easier for others:</p>
<ol>
<li> Make sure the email in your main settings.py is valid and yours/part of your groups.</li>
<li> Also make sure that that email is included in the developers in the dashboard of the application. (<a href="https://appengine.google.com/" rel="nofollow">https://appengine.google.com/</a>)</li>
<li>If its not:</li>
<ol>
<li>Log into the dashboard with the original user</li>
<li>Go into the developers section and invite them to also be an administrator to the application</li>
</ol>
<p>This simple walk through doesn&#8217;t only pertain to those that use Google app engine, it applies to all users of Google app engine.</p>
<p>Hopefully it will save someone some time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.travisglines.com/web-coding/google-app-engine-patch-invalid-sender-error/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
