4 ms·
Ask HN: Sails.js or Loopback?
Which one is better for creating an Angular app with Android and iOS clients? Both claim to offer some level of automatic websocket support. Do one of these frameworks do a better job at that? Is one more 'production ready' than the other?
- smt88 12y agoI used Sails.js for about an hour one time. It was completely broken. The docs were just plain wrong, the code was a mess, and the core developers were clearly swamped. Lots of unanswered issues. It was a nightmare. I haven't used Loopback, but I can emphatically say "no" to Sails. If you need websockets, check out http://socket.io http://socket.io
- mithras 12y agoDid you try version 0.9.x? 0.10.x has been a lot better, the docs have also gotten a complete revamp. I'm building my SAAS product in it and haven't found any dealbreakers. Still quite some gotcha's, I'll give you that.
- smt88 12y agoI gave up for reasons above, but the reason I've never looked back is that Node wasn't the right tool and the Sails developers didn't have a philosophy I could agree with. My problem with Node is that it's really hard to learn a code base and really hard to debug. In other languages, I can CTRL+click to get to definitions of classes and methods. I never realized how important that was to me until I was trying to read the Sails code. It was like following a maze. I now use Node as a very simple API layer when performance is absolutely a necessity, but I don't start with it. There's a reason there's a new [x language]-to-JavaScript transpiler announced on HN every day. As for the developers, I was just disappointed that they would ship something so broken. It would be better not to publish it at all, or to keep it on the dev branch, than to publish it in that state. I also like to use libraries with lots of third-party activity, and it seemed like only 2 people were committing to the Sails code base.
- bribri 12y agoUpdate: I wound up building a sample project in both this weekend. For what I was trying to build (a robust, scalable API) loopback was much better. I wasn't as interested in generating server side rendered pages, although you can do it in loopback since its just built on express. Loopback seemed much better for making a serious project with monitoring, devops, debugging, deployments and less 'magic'. Sails definitely wasnt bad; it is more popular and its docs were a little better, but ultimately I had to dive into the code in both frameworks, and loopback's codebase was easier to understand. If you're developing primarily an API in node.js I would definitely recommend it.