LoopBack, a new Node.js framework by StrongLoop
loopback.io
loopback.io
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?)
Especially exposing some of the things like intervals, the geographic features, and a lot of their other cool things.
Yeah, I could live with that.
I haven't done much work with a relational DB from nodejs (I've just used nosql databases that offered relational functionality -- i.e. rethinkdb), but this seems like as good a thing as any for ORM-y stuff with Postgres
I'm actually considering using this in a new project right now - it is very very tempting to think that I could just use this, and have a middle-layer that I don't have to muck with... this would greatly speed up development, I do applaud the team for trying something so ambitious, could be huge
But for some reason I'm still worried about using it as the backbone for an enterprise scale application; it almost does too much. Perhaps I'm just too averse to this amount of "magic" in any piece of infrastructure due to my Django days.
The code is open, but you're not just buying into a single module with a single purpose -- this is an entire architecture. I guess in such cases, worry is warranted before accepted it as the backbone of your company/application.
Nice to know it's a good idea that a lot of people will find useful. :) Granted in it's current vision Paprika won't handle authentication.
It's basically an API server in-a-can. Defined your structs, set up your .toml database configuration and paprika.Start("3000") on a port.
What interests me a lot at the moment are HTTP proxies that provide features like these. I like the encapsulation and scalability that true REST makes easy.
I would say writing the "expose DB as REST-API" can be easy for small projects, but a lot of work can go into making something that is RESTful, scalable, and a joy to build with.
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.
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.
Also does it support dbdriver level SQL query execution?
I have custom aggregation query across a self join, and that's not easily represented with static methods on a model.
Today I use node-orm2, with a custom SQL script that updates the identity columns to be bigints, and it supports executing raw sql queries (with some basic parameter sanitizing).
These libraries fail because they are not designed around a logical expression language (unlike Ruby's ARel, a very nice SQL building library that forms the underpinnings of ActiveRecord). You need to be able to programmatically build expressions as an AST which still preserving SQL language rules and avoid exposing yourself to injection.
Agreed. We dropped an ORM completely and use SQL in functions (aka stored procedures). For models we use plain JS objects and for validation we use Joi (https://github.com/spumko/joi) from Walmart Labs.
Eliminating an ORM has been freeing. We did have to invest in upgrading our team's SQL skills, but we no longer run into limitations of an abstraction layer. Our queries are faster as there are fewer layers. Now that we're up to speed on SQL we find it to be expressive for our data access needs.
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.
I've been particularly happy with Sails.js as the backend framework for my single-page web apps. I get rid of the Sails view system and use it solely as an API backend. The current 0.10 beta, which adds support for associations in data models, is really nice.
Any thoughts/gotchas from your experience with it?
* There are also subtle differences in behavior that emerge when you use Waterline with different database adapters, so you really need to develop against the same DB adapter that you intend to use in production.
* When you need to customize the behavior of the CRUD methods that Sails gives you by default (like if you need to transform some parameters passed in by the user in the create method), it is often cleaner and easier to do it by applying custom policy methods rather than overriding the actual CRUD method in the controller.
* For a new Sails project, you probably want to start with the new version 0.10 even though it hasn't been officially released yet.
Those are the points that first come to mind. Despite the limitations, I've found it to be a pretty compelling framework. And it's very actively developed, so a lot of the deficiencies are being corrected.
Edit: Whey! http://docs.strongloop.com/display/DOC/Synchronization
I did look at loopback a while ago, it was appeared like a parse.com kind of API you host on your own infrastructures. I will reread the documentation again to see if any more clarity on mongodb side.
Then it occurred to me the iOS rewind service is looKback.io, so close :)
Any plans for using Express > 4.x? More and more stuff is targeting Express 4.x these days.
Putting that conversation aside, I'd be very interested to know what advantages there are for you in having ACL built-in vs. using one of the ACL middleware modules that are available through npm.
William Riley-Land (Author of baucis)
That been said, there are a lot of node.js modules out there and I could simply miss right one. If you could point to a couple you think might play very well with baucis - I would really love it.
In general most of rest/mvc frameworks our there miss this part entirely. I am ok with acl being not part of particular framework as long as there is at least one 'blessed' combination to use.
= pavel karoukin - author of baucis-access plugin :)
What're your "killer features" that are lacking for ACL in Node in your experience?
I'm becoming severely intrigued by the idea of using specialized proxy servers for applications like this…
http://emberjs.com/guides/models/the-rest-adapter/ http://emberjs.com/api/data/classes/DS.RESTAdapter.html
Awesome work.
Case in point:
https://github.com/mbostock/d3/blob/c247e1626118de41b3d40e2a...
But we still need a nodejs framework for good old html apps with a strong view layer (e.g. forms...).It definetly doesnt exist in nodejs space.