Skip to content Skip to sidebar Skip to footer

Which Technology Stack (modules, Frameworks) Is Better For The First Node.js Project In Order To Study Node And Make A Good Product?

A year ago I made few small steps in node. Even then there was a great number of modules and frameworks. Now I want to learn the node environment more deeply and start a web based

Solution 1:

I will try answering your question from the view of someone who has tried getting into Node.js through concurrent development of an identical project with different combinations of 'state of the art' modules.

  1. The complexity of your project dictates the approach, as usual. If you want to learn the whole range of the intricacies of Node, you can build from scratch and just use relevant libraries (such as connect and database layer abstraction such as cradle or mongoose, more in Answer 2.) when you have the need for them.

    If you want to have a codebase from which you can find workable solutions, you should go for the Express framework (built upon connect), since it seems to be the most widespread among node developers. Many tutorial sites supply easy-to-follow examples that include this framework. The Bogart module will do the same, but it is not as publically known.

  2. Apart from Express, you might want to look into a Templating System for your HTML output. I would suggest Jade for that. I will explain why in Answer 4. An alternative would be Moustache or EJS.

    Then you should check out cradle or mongoose, since these modules will be needed for convenient DB access. Now that core functionality and DB are covered, you might want to look into LESS or SASS modules for CSS magic.

    Authentication can be handled by everyauth, it supplies twitter, facebook and many more oauth functions.

  3. I think i have covered the modules in 2. already, so now onto the DB question. I did enjoy working with MongoDB, and you can easily go with that and find alot of documentation and best-practices on the Internet. I myself have found CouchDB much more interesting, since it provides a fantastic API-based access and it's catchphrase is "Relax." - but it is not really that important. As long as you understand the NoSQL-approach that drives mongo and couch, you can use any of them. I strongly suggest to avoid traditional SQL-based databases since the JSON-formatted output of the NoSQL database systems integrates seamlessly into the JavaScript-environment that is Node.js.

  4. I developed with JS and Coffee and i can tell you one thing: with a cup of the latter, you will have a much easier time getting your projects up and running. Indentation-based programming plays hand in hand with Jade Templating system, which is also indentation-sensitive. Having the same mindset for server code and view code (and CSS, even thou indentation there is just for your own convenience) makes developing both at the same time much easier. I have yet to find a problem from JS that could not be solved with a much more beautiful CoffeeScript expression.

  5. Follow the node project on github, follow the Express/Connect/cradle/Jade/mongoose/..-project on github, google for "blog node express tutorial" and try joining the IRC community on irc.freenode.net. The interesting channels there would be #node.js and maybe ##javascript. From there on, people will show you to more specialized rooms. I strongly suggest you go there, it is a very helpful bunch.

    The O'Reilly publisher has some very good books, but they are outdated the moment they are shipped to the bookstore. Since the community is developing new features and versions on a daily basis, you should try to get as close to the developers of the core functionality as possible. On IRC, you can even ask them with your (probably mildly interesting) problems - you will get answers and hints nonetheless.

    In short: stay in touch with the community.

Solution 2:

  1. Connect is a powerful and flexible mini-framework. With the right set of modules it is the best solution, I think.
  2. node-mongodb-native for MongoDB, db-mysql for MySQL, just for templating. Use The node toolbox to find more.
  3. I use MongoDB and MySQL. It depends on the project.
  4. I use plain JavaScript but it's a matter of taste. I love native.
  5. Source code. Realy. Node.JS ecosystem is evolving very quickly. Most of the documentation out of date at the time of its writing. Use GitHub to watch for projects. This is really helpful.

Solution 3:

  1. Use libraries and not framework, except maybe expressjs. Most frameworks tends to make a problem more complex than it's already is. Do use libraries that's on good licensing terms. If they're not maintained anymore, you can at least take over the project.
  2. ExpressJS, Jade, Stylus, SocketIO, underscore, jsdom
  3. Mongo is definitely the most popular these days. I think the reason is because it's console interface uses JavaScript. It creates more of a 'language synergy' with the developer.
  4. CoffeeScript has its own quirks, but still it's a hell lot better than plain JavaScript. Note, this is an opinion.
  5. Can't help you there; I went through the learn process from just reading online stuff.

Solution 4:

  1. It depends on your knowledge base .. i started by using a bunch of frameworks and worked my way backwards into understanding core concepts, but I'd recommend start small first
  2. There are more than enough Express guides, and is a great way to get rolling with node, but it does require a templating engine such as Jade or EJS .. (i prefer ejs to render basic .html files). As an asside, node has a ton of base modules eg: require('http'); that are good starting points to understanding request flow.
  3. Mongo and Redis are some of the most forgiving db's IMO, and have tons of abstraction. although you could go with something more commercial like Parse.com
  4. If you already know JS .. stick with it. otherwise, go with CS as a way to rapidly write Javascript, not to replace it's foundations. There are also more JS examples online for beginners, but way more rock solid coffee script implementations on Git
  5. Not really sure abou this either .. Look at Brad Dayley's "NodeJS, MongoDB, and AngularJS" book and google MEAN stack development

Post a Comment for "Which Technology Stack (modules, Frameworks) Is Better For The First Node.js Project In Order To Study Node And Make A Good Product?"