They're both good, in both cases.
588 karma · joined February 17, 2012
They're both good, in both cases.
1. It turns out the reactor pattern is a good way to build network servers that scale reasonably well with minimal developer effort. In my experience developers tend to avoid writing threaded code in synchronous languages, and threads don't show up very often in run-of-the-mill solutions. To be sure, JavaScript's lack of threads is a blemish, but oddly it forced the community to focus heavily on distributed architectures, and as a result most of the tooling encourages distributed systems, which is a win for some common use cases.
2. Type safety is a hotly debated topic and I don't think you can find resolution on this one. For some people, "weakest of weak typing" is a benefit.
3. Static vs. dynamic, see #2.
4. Do you mean that everything must be enforced by convention instead of static code analysis, compile-time checks and type safety? If so, I think you're making the same point three times.
Erlang is a beautiful language and may be the most correct in some sense, but doesn't look nearly as attractive to the kinds of teams I work on when you start to consider developer availability, library ecosystem, tooling, ISP support, documentation and community.
As said earlier, the core Node.js framework has great documentation, as do other frameworks such as Mongoose and Express.
Node has a very beginner-friendly primitive for doing this.
I think things like that will make people want their own self driving car. You want the one that fits your wife and two kids and your dog. Or you're rich and you want to be driven around in a really nice one that hasn't been used by other people.
The more I think about it, the more I imagine rich people increasing their car ownership due to self driving cars. Take your fleet with you to the cottage or across the country, why not?
Break the web.
I'm not interested in arguing about technical superiority, I'm sure node is no where close to ideal. But, like javascript itself, it's popular, interesting, useful, and here to stay. From my perspective, for better or worse, javascript is the most important programming language of the decade.
ES6 standard promises have landed in v8 (https://code.google.com/p/v8/source/browse/trunk/src/promise...) so it's only a short matter of time until the "batteries included" solution is available.
But that doesn't mean people will be forced to use them.
a) A small core API instead of a sprawling standard class library
b) A highly composable export and require mechanism, better in some interesting ways than what exists in other systems (1)
c) The fastest growing and soon to be largest community repository of packages (2)
d) asynchronous by default stack and ecosystem.
With those things in hand, "bolting on" is a virtue and not a disadvantage. That Node is general-purpose - you can build cross-platform desktop applications, streaming servers, web applications, console utilities, etc - and does not impose its package opinions are major factors in its success.
1) http://blog.izs.me/post/1675072029/10-cool-things-you-probab...
Nice work.
Here's his statement again, rewritten without the Fox News-style editorialization:
"Test-first units lead to a graph of intermediary objects in order to avoid doing things that are outside the scope of your test. This practice isolates the piece of code you are testing, but as a side-effect means that you don't do unnecessarily slow work like hitting a database, filesystem or web browser. It has given rise to new patterns of application architecture such as a service and command layers."
Oops, I wrote all the same facts but stated them neutrally, and now it doesn't sound like a horror movie! How am I supposed to bully Rails devs into following my style?
This is DHH's central argument, he is once again defending his "there are only three places to put code" application design and the monolithic Rails architecture. We see him, time and time again, sniping at people who outgrow those patterns but still want to use Rails. People who do want fast and isolated unit tests, who want encapsulated, reusable service objects and people who are perhaps building something more complicated than a TODO list.
He goes as far as to subtly deprecate unit testing, something which is incredibly vital in a dynamic, loosely typed language such as Ruby, where monkey-patching other's code is more of a rule than an exception. In Ruby, unit tests stand in place of static compiler checks. I haven't heard a strong argument against them nor a replacement for them. The binary notion of "the whole application works" or "the whole application does not work" does nothing to quell the critics who say that Ruby and indeed Rails projects are brittle and difficult to refactor.
I love Rails and think it's a fine product, but I don't understand its leadership strategy, doggedly preserving web application design as it existed in 2004.
> "Rails 5 will be renamed to Basecamp. This will help to end confusion over which types of apps to build using Rails." @markbates