As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
What modules are you using to connect to your CouchDB server, in your Node.js applications? And why would you recommend whatever module you are using?
When getting started, do not use CouchDB libraries in NodeJS!
There several, however they are largely thin layers wrapping the HTTP API. But Node has very strong HTTP support. It's no more trouble to make simple HTTP queries. It's simpler. It's less prone to errors. When CouchDB adds a feature, you won't need to wait for library support. You will learn and understand CouchDB better. It's well worth avoiding a library at first.
I use the built-in querystring module, and also Mikeal Rogers's request library, which is a super thin HTTP convenience library.
Try to look at nano which offers simple and minimalistic API for CouchDB or high-level client cradle.
I am the author of nano. When starting with CouchDB I did exactly as Jason Smith advised using Mikeals request library. Nano was born out of using that code in production and realizing I had some coded that could be improved and abstracted.
The end result is minimalistic and you still have a way to go down to the request level and do a request (which many users do).
Nano was really well accepted by the CouchBase team, mostly cause it's soo\ simple and maps well to the API.
If you are interested in checking out more check out this blog post:
http://writings.nunojob.com/2011/08/nano-minimalistic-couchdb-client-for-nodejs.html
I've written a very clean and simple HTTP API wrapper, called node-couchdb-api. It doesn't add any bloat features like an ORM, and it follows typical Node.js conventions for callbacks and async code.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I'm starting to build a small ERP web application. Im currently a bit in-between choices for the system that i should use. What i have in mind is that i would do a REST api to pass data from backend to frontend and probably use Angular.js to handle all the frontend stuff (views and such).
Would it be an overkill to use a PHP framework, lets say Codeigniter just to build an REST service like that?
Im also very inclined to use Node.js / Express / Angular combination. But since that would be harder to maintain in the future (since pretty much everything here runs on PHP and the knowledge is better in that) i would really need some good pointers why that would suit better such need? I have some experience with Node / Angular / Express and PHP but i haven't really used Codeigniter.
TL;DR is Codeigniter an overkill to use only to build an REST service and use Angular for the rest & is there any really good advantages why I could lean towards Node.js / Express combination rather than PHP framework?
Depends on what your data will be, and how you will manipulate that data. Think of it as when you do PUT request, what you will do after that. If developers are familiar with PHP i would go with CI, if you are certain that developers will pick it up easy (in case you know, you went missing) and you wish to learn new stack, go with Node.js / Express / Angular.
I personally have build CI rest (it's not a brainier with CI REST library) with backbone.js as front end. Not much of an overkill, CI is fast and I used Doctrine 2 as my ORM (as database was relational).
Advatages /Disadvatages as said, are depending on (1) what your app is intended to do, (2) development time/deadlines , and as you said (3) maintenance.
Edit, if on another hand you want very light PHP REST framwework http://www.slimframework.com/
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
So it's my first time actually making a website and hosting it online--most of what I've done has been tutorials and class work. Now a friend and I want to make something professional and maybe evolve into a business.
1.) I want to be planning long-run but am kind of afraid of being committed to something I have rudimentary knowledge of. What do you think about starting with these technologies (CouchDB, Node.js)? The long-run goal is that it will be social networky and use search, hence noSQL. Will be using Linux + RoR. Node.js is still a bit elusive to me though I've read a lot about it.
2.) Do most web hosting services support these technologies or do I have to find specialized hosting services or host them myself?
3.) What about Cloudant and Nodejitsu/CloudOne--should I consider using these? Other suggestions much appreciated.
I would most certainly recommend a well established PAAS provider. Like maybe Heroku or AppFog. They will make sure you only have to worry about developing your next cool app rather than being a sysadmin.
Heroku also supports deployment by git which is nice. Another big advantage is If your application actually kicks off and you need to scale, scaling with these PAAS providers is often as simple as playing with a few sliders!
1 . There are a lot of noSQL databases available MongoDB and CouchDB are pretty good. They have good documentation. But make sure they fit your exact need before choosing either. RoR is again a great framework. Notably used by twitter. And of course leave the actual server administration to PAAS providers!
2. Checkout Heroku or AppFog. Both of them support RoR and are well reputable with good documentation and community available.
3. I would recommend using Node.js if you plan to build an app which handles a lot of concurrent connections. Like a chat app for example this is basically where Node.js shines.
And finally, Don't think too much into what the hip technologies are. Choose what you are familiar and comfortable with. And most importantly choose what fits your exact need.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I know node.js can build web apps that run super fast, but I just can't find enough info about how it would perform in a magazine or news style website. I know some CMS's like Joomla or Drupal (or even wordpress) are very good at it, but as the number of users grow, I'm seeing some performance issues. Naturally, the web server count but as I want to host it in the cloud, I guess working with node and just create a simple CMS based on it would suit the needs for a better user experience once many users can log in and do their social stuff parallel to the main side of the site that is just a news and reviews site. Does any node.js coder knows about it?
Agree that this is rather subjective, but that said having some experience with node I don't know that there is any particular advantage to using it in this instance. I think frameworks like Django (Python) and Rails (Ruby) are more or less built to accomodate this type of use-case and assuming you have PHP experience but not a lot of node experience, would likely be easier for you to build and deploy a working CMS with very quickly.
Based on what you've described I don't know that any of the advantages of using node will be particularly relevant, and it's unlikely that using node instead of any other modern framework and web server will have a huge impact on your site's performance.
I think this question is quite subjective, as the performance of any application written using modern and maintained languages will depend mostly on the skills of the developer(s), and if your website reaches a certain scale it will not depend only on the language but also on the architecture of your distributed system.
Some of the usual strengths of node are that it is event driven, single language for front-end, back-end thus developer integration should be easier. It's event-driven model gives it a nice and easy(subjective!) way to write and understand (for new devs) applications that make heavy use of concurrent operations such as data-intensive operation across distributed systems.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I want to make it clear that I have no prior experience programming, I only have experience in HTML and SQL, everyone seems to be like "Look like the documentation" well yes that sure helps me! sniff *sniff* is there a book that could be recommendable or a series of webcasts?
Welcome to the wonderful world of node.js!
I myself have also just started learning Node.js and often asked myself "what is express?" "Why use express over node?" etc.
Express is a fantastic web framework so you can develop robust applications with having a lot of the hard stuff done for you :)
I highly recommend reading through his examples to have a feel how it all gets put together: https://github.com/visionmedia/express/tree/master/examples
I found this screen cast very helpful in myself learning the basics: http://vimeo.com/38136668
Proloser goes through explaining how to start a new express application, how to connect it to mongodb and explains how and why everything works :) He's created it for new noders.
Us noders hang out on irc.freenode.net in the #node.js channel. Come and ask any questions you have and we will help set you on track :)
I want to make it clear that I have no prior experience programming,
I only have experience in HTML and SQL
Based on these two points, first you should learn programming. You want to learn NodeJS+Express+MongoDB which 3 of them are completely different things from what you already know.
First start with Javascript. This is more than enough: http://www.w3schools.com/js/
Write your scripts to a file named try.js and execute them with node try.js and see the results!
Then try to learn how a web application is built. Two basics for you:
You request something from server via HTTP, http://myapp.com/users/all
Server processes requests, and sends you a result in HTML
Your browser displays it.
More information at: http://www.slideshare.net/nbrier/how-to-build-a-web-app-for-nonprogrammers
Look the ExpressJS web site, and go step by step, and TRY EVERYTHING there
Then learn MongoDB, this is not SQL database, it's a NoSQL database, I do not know why you want to learn it, however, experimenting with http://www.mongodb.org/display/DOCS/Tutorial will definetely help. But all you have to do is looking in to examples. To use MongoDB from Node, you can use Mongoose.
I think you should learn the basics of a programming language before getting deep into the frameworks.
Code Year has a series of interactive programming lessons to learn JavaScript. You learn the language step by step from the ground up.
When you have grasped JavaScript you can start using express and mongo and other frameworks.
You have a long way to go, if you only know HTML/CSS.
Take a look at http://howtonode.org/express-mongodb
You have to have an advanced understanding of how to code modular JavaScript, JSON,
Databases (especially NoSQL databases ).
Cheers!
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
Today is 9/17/2011. As of today, what are the biggest reasons why Node.js is unstable, or not ready to use for everyone as a public facing server by itself.
A few things that I've come up with are:
Apps will shut down if unhandled exceptions occur
Libraries are still young and change a lot
Right now I plan on creating an e-commerce site using Node.js, Mongoose, Express, and forever -- and I need some solid reasons to consider so that I can be prepared for whatever comes along. I'd also like to look into how easy it would be to hack, but I'm not too concerned about that yet because it seems like it's quite improbable if I follow standard practices like sanitizing inputs.
Why is node.js unstable?
There are a few
node.js does not work stably on windows
node.js is simply not as tried and tested as say, nginx.
the core API hasn't frozen yet (although it's unlikely to change).
The reasons you mentioned are falicies.
Apps will shut down if unhandled exceptions occur
Yes of course they do. Unhandled exceptions (remember that exceptions are exceptional) crash and burn the server. This is why in production we have strong guards against this. We use clusters of nodes that restart any instances of your application if one crashes.
Libraries are still young and change a lot
Not really. Most of the libraries out there that are stable are indeed stable. There are plenty of libraries which carefully warn you that they are in development / unstable / not production-ready. The only difference is that in the open source community you get exposed to a lot more libraries that aren't ready. Where as in closed source communities you only see libraries when they are ready.
Honestly though 0.4.x is stable on linux and I would use it. I'd still probably also use node.js as a load balancer in front of other node's rather then use nginx but that might be considered risky.