Server-side Javascript and Other Nerd Things

Note: This is a bit of a meandering post to talk about my experience with node.js and Ghost, if you don't care, proceed to the more interesting parts of my blog.

I nominally started this blog to capture my interest in travel and record my methods to my first round-the-world trip, but to be honest, the thing that made me actually get around to starting it was my interest in server-side javascript.

It's worth noting that I am not a programmer and my experience with this stuff is cursory at best, but I still enjoy learning and causing trouble for myself.

When node.js came around, it struck me as an odd concept, especially since I've always been fairly traditional in terms of web programming. I grew up writing static HTML and migrated to PHP pretty quickly, mostly for extremely basic ease of use (includes, woah!).

Experimenting with PHP (look away mom!)

My first actual website was a blog back in 2004, published with WordPress. I tinkered around with the backend a bit to get a script that loaded my last played music from, but that was about the extent of my experience with any amount of coding. I proceeded to do some minor scripting in PHP for things like video game maps, user authentication for a third party forum, but nothing crazy. PHP just worked and that was plenty good for me.

The first issue I ran into with PHP came with one of my nerdiest projects yet: a replication of the Pokémon Trading Card Game in web-form (you know you're jelly).

pokemon cards Don't pretend you don't remember these

Since having an intuitive UI was important, I picked up jQuery (and Angular) to manage the pretty portions of dealing with cards on the screen from the nitty-gritty game logic. Since I was starting to separate front-end from back-end (something I'd never done before with PHP, with the exception of some templating in phpBB and WordPress), I began running into things that PHP just doesn't deal with nicely on its own. There are frameworks out there, such as Zend or CakePHP, but I was ready for something different.

Snakes on a Framework

I'd used Python before (particularly Twisted) for some scripting-style event-driven applications before, including an IRC bot, to great success, so I began exploring along those lines and ran into Django. It was awesome. It took care of the web-bits I didn't particularly want to deal with and left me with taking care of the logic. It was my first introduction to the Model-View-Controller (MVC) architecture and it was exactly what I needed for this application. Since then I haven't gone back to PHP (with the exception of some large platforms that aren't worth re-doing like MediaWiki).

The abstraction of the stuff that I didn't want to deal with (web servers, templating, user management) was all taken care of, leaving me to work on the fun stuff, such as UX, business logic, and figuring out how Pokémon Powers work. Django worked well enough for that application and a few others and I never really bothered to look for anything new.

Until I got bored.

Server Side Javascript

Node.js is fairly well known at this point, but I've never been one to let being extremely late to a party slow me down. The concept is fairly simple: an event-driven, non-blocking language, coded in javascript. Weird. Node.js uses Google's compiled V8 javascript engine to run and by all accounts, it runs pretty darn fast.

Since javascript has never been my specialty, I was intrigued. I'd seen blog posts about Ghost, which has its roots in a Kickstarter that raised over $300k and promised an open-source "just a blogging platform". Having done the whole Wordpress deal (which is fine) I was excited to try something new.

Having only scratched the surface of node.js, I can't say much about it. However, Ghost is pretty darn cool. While it's lacking some niceties of Wordpress (as is evident from some rough edges around here), the templating engine (based off of Handlebars) is extremely powerful and I'm in love with the Markdown-based authoring tools. Add in a native mobile-first admin panel and a custom Bootstrap template, and I'm extremely happy with it.

ghost admin panel

Now's your opportunity to disabuse me of my foolish notions of technical competencies down below.