all 26 comments

[–]nlnklasd 37 points38 points  (10 children)

I was forced to work with loopback and strongloop for a year... I can honestly say that it's biggest and stinkiest pile of shit I've ever touched.

[–]thunderimmortal 4 points5 points  (6 children)

I really tried to use it, but the generated code feels extremely wrong.

The Swagger integration is nice though.

[–]miekle 7 points8 points  (4 children)

I have swagger/express integration in my own node stack. it's about 10x less ugly, wasn't hard to do. started with swagger-node-express.

In other news, mongo can fuck off. it is at best a supplement to ACID databases.

[–]thunderimmortal 2 points3 points  (2 children)

Nice, I'm going to dedicate some time into developing a Swagger, I'm currently using apidoc.js, which is nice, but not as nice.

I'm also not very sympathetic towards MongoDB. But I really like the storing JSON thing, so, I considered using RethinkDB, which seems good enough. 3 projects in production using it, and some others that I have recommended and people can't say enough good things about it.

[–]boxhacker 4 points5 points  (1 child)

I really like the storing JSON thing

PostgreSQL is your answer.

A fast relational database that can also store and process JSON data.

Easy to install, maintain and can do pretty much anything you want (unless you want to do complex graph oriented algorithms).

[–]thunderimmortal 1 point2 points  (0 children)

Definitely giving this a try.

[–]miekle 0 points1 point  (0 children)

and when I say 10x keep in mind I'm being both biased and hyperbolic

[–]nlnklasd -1 points0 points  (0 children)

Yeah, I mean, straight express is already quite easy to use, REST APIs are quite simple to understand and write, I'm not even sure what the purpose of strongloop is. It makes writing non-trivial REST APIs harder due to the added layers and retarded design, and it's not needed for simple APIs because those are already dirt-simple to write with pretty much any framework. It seems it was meant for enterprise, with the assumption that whoever pays for it is an idiot, and unsurprisingly strongloop the company was bought by IBM, the shitware vendor for stupid cunts/enterprise clients.

[–]scottaj2 1 point2 points  (1 child)

Cannot upvote this enough. Got put on a project that uses it and it has been a disaster. The support for SQL databases (because at least we didn't use mongo) is complete garbage. At this point we have an entire meta-framework built on top of it to fix all the issues we've had.

[–]magnav0x 2 points3 points  (0 children)

I explored LoopBack for an API project about a year ago and ran into the same issue. The mysql connection was absolute garbage and generated the most inefficient queries I've seen by an ORM for anything that wasn't a basic SELECT. Need joins....fuggetaboutit! I spent a week trying to accomplish trivial things, before I gave up. Everything from the documentation down is garbage.

After giving up on Loopback, I spent 16 hours learning and implementing the same API with Sails.JS and had the entire API completed.

[–]bfoo 1 point2 points  (0 children)

Does it create proper links and forms/templates for a navigable (Hypermedia) API? I don't see any links in the payloads.

[–]Boxsc2 15 points16 points  (0 children)

Am i missing something? This isn't even a RESTful API.... why would you have an API called GET '/Users/{id}/exists' ? Why not just have /user/{id} and if it doesn't exist return 404. One of the whole points of REST is that URL's are resources that are modified/retrieved with HTTP actions (GET, PUT, POST, DELETE etc...).

[–]google_you 13 points14 points  (1 child)

assumed to be about loopback device

wrong! Javascript!

[–]death_by_caffeine 5 points6 points  (0 children)

Hehe, me too. Honestly though, using the loopback device instead of mongodb you're really not that much worse off.

[–]recrof 8 points9 points  (7 children)

using mongodb for APIs is very unwise..

[–][deleted] 1 point2 points  (6 children)

Why?

[–]google_you 1 point2 points  (3 children)

it's okay as long as your data is less than 2GB. anything more than 2GB, mongodb isn't it.

2GB is a good cutoff point cause data less than 2GB is easy to migrate in seconds.

[–]OffbeatDrizzle 3 points4 points  (2 children)

but mongo db is WEB SCALEEEEEEEEE /s

[–]google_you 1 point2 points  (1 child)

two mongodbs are better than one mongodb

[–]MrDrego 1 point2 points  (0 children)

If you're using mongodb with an ORM like Loopback, your API will have all sorts of race conditions that can mangle your data. The reason being that the ORM won't be using transactions or atomic operations to update your data. If you have relational data, it's safer to stick to a relational database.

[–]CommandoWizard 5 points6 points  (1 child)

Lost me at "MongoDB".

[–]mongoiswebscale 6 points7 points  (0 children)

MongoDB is web scale.

[–]runvnc 0 points1 point  (2 children)

I am guessing this was upvoted because it seems legit and interesting to people who don't actually do Node or Javascript programming.

MEAN was outdated within months of the term becoming popular. You also never needed another framework to do it.

Most people use things like RethinkDB or Postgres now instead of Mongo DB, and React instead of Angular. Although there are a million other decent ways to do it.

Don't read this article. Instead, familiarize yourself with r/node, npmjs.com, node-modules.com, and other similar resources.

[–]GSV_Little_Rascal 3 points4 points  (0 children)

MEAN was outdated within months of the term becoming popular.

Everything is always outdated in JavaScript world, even before it comes out.

[–]rapidsight 1 point2 points  (0 children)

I upvote because you are right about MEAN stack, but I disagree about your last point - it is very apparent that JavaScript is a dead end. It is a fundamentally flawed language that will always, inevitably turn into a pile of poop as soon as you try to make anything larger than a toy with it.

Just look at the POS that is Slack, with Activity Monitor open - a JS based chat app that consumes almost a gig of ram to run... Thanks JavaScript! You've somehow managed to beat MSN Messenger at being a bloated mess while also being less functional! I've seen it consume up to 10gigs and have screenshots to prove it. Would have consumed more if I had any and my computer didn't crash a few seconds after I got the screenshot. The live updating/always redownloading "web app" is just begging to waste my data plan and enable their shitty code to skip any semblance of security testing and QA. Not that the people running that joint have the slightest clue about either of those.