

A Simple MVC Setup in Node.js - travisglines
http://www.travisglines.com/web-coding/a-simple-mvc-setup-in-node-js

======
Detrus
Article is pretty weak on the details.

This guy <http://nodetuts.com/> has video tuts on using Express, Jade and
Mongoose to make a simple web service.

~~~
travisglines
I wanted to gauge interest. I think its pretty clear that people want a way
more in depth tutorial/article and I'll put one together.

I'll try and make it chock full of details this time around.

The tutorials on nodetuts are solid.

~~~
schwabacher
This, along with the JSONloops stuff, inspired me to finally download and play
around with node. I would definitely be interested in a more in depth
tutorial, specifically more on setting up mongodb and connecting mongoose and
on how to break controllers out from the main app.js file.

------
eaxitect
I don't think node.js is a replacement for fully-fledged framework. Rather, i
believe, it's a backend for high-performance parts like real-time streaming
API or something. Although the setup is neat, and obvious, I believe it's way
worse to develop at this stack.

~~~
travisglines
I keep hearing this and am curious:

Why don't you think node.js is a fit for a fully fledged dynamic website? What
things is it missing?

I know its been used as a high performance tool historically but whats holding
it back from becoming more?

~~~
eaxitect
actually, I agree with you, but for now, node.js has to has more features like
templating, UI flow, etc. injected into the way node.js handle requests. I've
asked the same question for Sinatra earlier today, and got my answers.

~~~
travisglines
This is what the add on modules do such as jade. Check out jade-lang.com ...
basically why I wrote the blog post was to show that with the use of a
libraries node can compete with the best web frameworks.

------
lwat
Tell me again why we want to use Javascript server side?

~~~
dstein
The JavaScript language isn't what's nice. What's nice is using one
programming language to write an HTTP server, your server application, server
templates, client-side application, client-side templates, communication code,
database code, and be able to share your libraries and models between all
contexts _simultaneously_. You fix one bug in one place, and you've fixed the
bug in 7 or 8 different contexts immediately. In other words, your
productivity skyrockets.

~~~
Klonoar
You know, I'll just throw this out there: as someone who's written a lot of
code with Node backing it, I've run into maybe _one_ scenario where I've
brought client and server side logic together.

They are two separate models, and will most likely remain as such for the
foreseeable future. While I can only speak for myself, I'd advocate using it
because the language is indeed nice, and much more flexible overall than some
of the alternatives. On top of that, it's got several large companies with a
vested interest in its development, which is far more than can be said for
some of its competition.

Really, the point I'd like to counter here is this: your productivity does
_not_ skyrocket, and it's not necessarily the reason to want to use JS server
side. For example, the JS syntax works incredibly well for event based
programming, and is largely tried and true with its use client side. _That's_
a reason to want JS on the server, and I really wish people would quit
throwing around the reusability claim like they do.

~~~
travisglines
I really just enjoy not having to change languages. Whenever I want to do some
basic syntactic stuff like substring for example, its the same everywhere.

That alone makes it enough for me without its other benefits.

