Rails vs Node.js - A Sympathetic Comparison

From DevSummit
Jump to: navigation, search

Programming languages are useful. Let's talk about Javascript and Ruby. Specifically node.js and Ruby as interesting languages for web programming.

Cooper: facilitator.

Kathryn: professional software engineer.

Andrew: Front end web developer without much programming experience.

Lee: Background in Systems and production ops. Doing lots of software dev now. Knows a lot of languages.

Mike: Front end web developer. Working with Django and Python.



Programming languages have strengths and weaknesses. You wouldn't use a hammer to saw wood. Some tools are specific but it's more difficult to tell the difference between programming languages because they have very similar characteristics.

Why's Poignant Guide to Ruby is an excellent programming manual. Anyone who understands pictures and has thought about Ruby as a programming language is impressed with this programming manual. Him and Dave Thomas helped westernize the language since it was created in Japan and had a predominantly Japanese community.

Smalltalk is the OG language that started the trend of dynamic interpreted object oriented languages. The compromise is usually performance of the machine that executes the code.

Ruby is a popular language among people who don't have a

JavaScript was a response to Microsoft controlling the operating system. It was also a response to Java due to code delivery to a browser being an attractive way to get people to write code on the platform. Java failed in this area for many reasons. JS was very simple to get started with, much like PHP the community grew because it was fun and simple to write simple programs.

Java is a hard language to dabble in. Whereas teenagers are writing games in JavaScript. One of the reasons JS has crappy syntax because it was written in ten days.

Functional versus imperative programming. JS started as a Scheme project but later was converted into it's own weird thing. When this problem was presented they backed out of that idea and made this weird catch all language that's like a lot of things but isn't any of them.

LightTable is an IDE for Clojure. It could be interesting for a way to help people understand recursion.

Node.js is a framework for building event driven frameworks and do async I/O. It was the first server side JavaScript runtime that took off. It was an opportunity to start over with some low level problems that few people have the opportunity to work on. That was his nerd moment that helped this framework take off.

The JS runtimes got so much attention and investment they were already fast enough to have a mature platform for doing fast async I/O.

Coffeescript is a language on top of JavaScript that gives it more OO features. It might not be a big enough jump to be useful.

Working with Ruby or Python and event-driven programming is a nightmare. Node.js makes this simple because the whole stack is built with the assumption that this is how you will use the framework.

Async I/O is something that is a popular pattern in other areas of programming whereas web programmers don't have as much experience with things like callbacks. The field is maturing and web programming is going through a paradigm shift while more people learn these patterns.

PHP while not cool is fast and is directly tied to MySQL. If you want to build database driven web applications PHP is the fastest choice. PHP is also tied to the web directly so it has a good environment for doing web stuff.

Rails has a lot of “Magic” and a lot of people hate it from the magical aspects. Rails 3 attempted to deal with this.

Twitter used Rails but it isn't fair to say it was affected only by that framework for it's scale problems. Sites at large scale frequently grow out of smaller frameworks and must change technology.

Rich Hickey has a talk called Simple Made Easy. Search for it.