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 (service for web and mobile app) project. I understand that a lot of things depends on what sort of application you're writing, but there is always some kind of base in it.
At this point I would like to know:
All these questions are rather broad, but the answers will be very helpfull for all beginners
Thanks )
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.
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.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With