

Express: A Node.js web development framework - adamhowell
http://expressjs.com/

======
frankus
I guess I'm about the last person in the world to recognize this ( _cough_
Steve Yegge _cough_ ), but it really is starting to look like the next big
server-side language is going to be JavaScript.

It's got a non-intimidating C-like syntax, has some powerful features (e.g.
being able to use anonymous functions as closures), is garbage collected, and
can run client side. And you've got three or four well-funded organizations
full of smart people duking it out over who can make the fastest
implementation.

The syntax is a bit ugly if you're used to something like Ruby. Comparing
Express to Sinatra, I miss the block syntax and the implicit returns (although
JS handles passing in multiple blocks quite elegantly).

Maybe what we'll see are a number of languages that compile down to
JavaScript, sort of RJS on steroids.

~~~
olsonjeffery
Yeah coffee-script has both implicit returns and block syntax, amongst many
other marvelous things. The Express examples in the GitHub README would look a
lot nicer in coffee-script.

~~~
tjholowaychuk
I will be adding some coffee-script examples soon. The source of coffee is
very nasty though :S, and I am not a huge fan of source to source compilation
for anything besides being a toy language

------
toisanji
I wonder if any startups are using this tchnology. What kinds of advantages
could a js stack like this have over something like ruby on rails?

~~~
smanek
writing the same language server and client is obviously easier (fewer context
shifts, smaller code base, etc).

It's also asynchronous (non-blocking) so you can run thousands of connections
out of a single thread (instead of RoR's silly 1-connection per process
model).

~~~
donw
You can multithread RoR on JRuby, but you still won't get anywhere near the
performance of event-driven I/O. But, you need to think differently about how
you build your app, right from the get-go.

~~~
dualogy
Does anyone know of a good write-up outlining how your thinking and building
needs to change?

------
olsonjeffery
This would look a lot nicer in coffee-script, oh wait...

<http://twitter.com/tjholowaychuk/status/9314981876>

Seriously though: JavaScript is a great language, but I'd prefer a sub-dialect
to smooth the syntax over a bit. It is not-at-all DSL friendly and, frankly,
Express' route syntax looks like shit when stacked up against Sinatra or even
bottle.py

------
adamhowell
For anyone in the Charlotte, NC area who's interested, Aaron Heckmann (one of
the contributors) will be giving a presentation on Express April 15th:

<http://www.meetup.com/CharlotteJS/calendar/12929151/>

------
rbranson
I think this proves that our notion of "ultra high performance" is severely
distorted.

~~~
thibaut_barrere
why ?

It's obviously relative to other commonly used web frameworks (like django,
rails, asp.net, etc) - in that perspective it's indeed ultra high performance.

Compared to raw assembler dsp, sure, it totally sucks :)

~~~
rbranson
Let me preface this with the fact that I am a huge Node.js/V8 fan and have
actually written an FFI interface for Node.js (that shamefully needs some
updating). I am also a huge Ruby on Rails fan, so I'm not some kind of
performance-obsessed VLIW-assembly-coding uber-nerd.

I had a feeling I'd get down-moded for questioning "de jour" on HN. Let's
deconstruct this hyperbole. Ultra is a prefix from Latin that means "beyond."
Is it really BEYOND high performance?

Frameworks like Django and Rails focus on features and ease of use over
performance. They are not high performance, they are high productivity. I
truly believe that the developers of this new framework are focused on high
performance, but they are still relying on an VM environment that is still
1/3rd to 1/5th the performance of C. How is this going beyond high
performance?

I suppose all of this is nitpicking someone's marketing speak, but let's get
real about what performance is. It would be nice to be spoken to by other
engineers like an adult with a brain, instead of bullshit like "ultra high
performance." This is the irrational kind of stuff that causes framework and
language holy wars.

"SQL is slow." "Rails can't scale." "Dynamic languages can never be fast."
"Java uses up all your memory."

~~~
jasongullickson
Bravo, this type of hyperbole has made non-expert comparisons impossible in so
many other industries, let's try and prevent it from completely encompassing
computer science.

