Live data from Hacker News

LoopBack, a new Node.js framework by StrongLoop

loopback.io

31–40 of 67 posts

Re: LoopBack, a new Node.js framework by StrongLoop

#31
As someone that is in the middle of writing a nodejs thin API layer, working with express-resource, this looks really amazing to me. It looks like I can stop worrying about writing middle thin-API code, and focus on front-end manipulation of a stable middle/backend

However, the scale of this really worries me. I really like small tools (flask over django, knockoutjs over angular sometimes,etc) -- and this seems like a LOT to take in to a project, sort of hoping it all just works...

Also, why is Postgres support not more prominently stated? It's there, but I had to search for it. And on that note, why is JSON stored in postgres as a varchar? why not use the postgres JSON type (compatibility reasons, maybe?)

Re: LoopBack, a new Node.js framework by StrongLoop

#32

Hehe, I owned that domain, loopback.io, a year or two ago. I didn't renew it obviously.

OTOH I still have monospace.io which is a pretty nice domain. Anyone interested?

Stop squatting. You're making the Internet a worse place.

Re: LoopBack, a new Node.js framework by StrongLoop

#33

This is slick, especially the API explorer, but my biggest gripe about these orm's is that once you get past the very basic CRUD, you need to execute custom sql. Does it support custom DB types? For example, I want my primary keys to be bigint on Mysql, and not have to override the underlying dbdriver to do the mapping. I'd prefer to set the appropriate dbtype in the model, and have the driver pass it along directly.…

1. We support custom type mappings between JS and DB, see:

http://docs.strongloop.com/display/DOC/Model+definition+refe...

http://docs.strongloop.com/display/DOC/Model+definition+refe...

2. We allow you to execute native query using dataSource.connector.query(query, params, cb). We're considering to promote it to dataSource level and fully document it.

Re: LoopBack, a new Node.js framework by StrongLoop

#35

As someone that is in the middle of writing a nodejs thin API layer, working with express-resource, this looks really amazing to me. It looks like I can stop worrying about writing middle thin-API code, and focus on front-end manipulation of a stable middle/backend However, the scale of this really worries me. I really like small tools (flask over django, knockoutjs over angular sometimes,etc) -- and this seems like…

Postgres almost warrants its own non-generic ORM. That would actually be kinda cool.

Re: LoopBack, a new Node.js framework by StrongLoop

#36
post #30

Earlier quoted context omitted.

Actually the resource should typically 404 to indicate it doesn't exists (generally speaking for http apis).

Yeah, the HEAD or GET should return a 404 on not existence; however, the HEAD also won't return data which is the point. GET implies that you have need of the returned data (presumably all the properties of that person). GET is for "it exists AND I want to know about it". HEAD really is more appropriate here.

HEAD is a good fit. We'll add support for that. Please open github issues to help us track the feature requests or bug fixes at https://github.com/strongloop/loopback/issues.

Re: LoopBack, a new Node.js framework by StrongLoop

#37

As someone that is in the middle of writing a nodejs thin API layer, working with express-resource, this looks really amazing to me. It looks like I can stop worrying about writing middle thin-API code, and focus on front-end manipulation of a stable middle/backend However, the scale of this really worries me. I really like small tools (flask over django, knockoutjs over angular sometimes,etc) -- and this seems like…

Good catch. We support Postgresql, MS SQL Server, and SOAP too.

Re: LoopBack, a new Node.js framework by StrongLoop

#38
post #11

Nice landing page, I'll give them credit for that. But why would I want to use this instead of Express or Restler?

LoopBack is built on top of express. You can use express routing and middleware with LoopBack as is.

Express allows you to expose HTTP endpoints as APIs but it doesn't facilitate the quest to build/aggregate/protect/document APIs that interacts with various backend systems, such as DBs, Cloud services, and internal REST/SOAP APIs. LoopBack is positioned to be a fully-fledged API server with SDKs for JS, iOS, and Android.

Re: LoopBack, a new Node.js framework by StrongLoop

#39
post #13

Earlier quoted context omitted.

I've seen ton of "expose DB as REST-like API" libraries in various languages, and even tried (unsuccessfully) to write one myself. I'd say just exposing model is trivial, even when coupled with content-type negotiation. Subjectively, the hardest part is permissions (operation, row and field-level ones) and making them play nice with REST and HTTP concepts (like ETags).

etags , hateoas,hypermedia... definetly the hard part,along with security. Getting an API right is hard work.Still search for the holy grail...

Agree. We try to solve the problems progressively. The connected model support is a foundation to those features. See http://strongloop.com/strongblog/defining-and-mapping-data-r.... Basically, we build models that relate to each other, partition the data graph with links, and expose them as REST APIs that can be used to navigate and aggregate the information from various data sources.

Re: LoopBack, a new Node.js framework by StrongLoop

#40

I really like the Angular sdk. I find it really speeds up the process of spinning up a new project

Thanks! Please also check out http://strongloop.com/strongblog/full-stack-javascript-isomo.... LoopBack model APIs can be run inside the browsers too and they are backed by local storage and/or remote data sources. Isomorphic model!
Post reply on HN