I am still trying to figure out, how I could package the blueprints in a way to make them maintainable and testable.
I asked around on the Sails IRC channel and it might be possible to turn the blueprints into a Sails generator, but I am not sure how to do that yet.
Arenāt blueprints only good for prototyping? Eventually, youāre going to need custom logic in your controller actions and therefore end up overwriting the blueprint implementations. Iām curious how you will move passed this hurdle? It almost sounds like there needs to be a custom adapter / serializer on the Ember side of the fence and not at Sails.
Or perhaps a Sails service that serializes incoming / outgoing JSON communications?
@marcus Thank you for putting the repo together, now that I have actually got to work with sails and you have already done most of the heavy-lifting I could start much quicker.
Based on the project I worked on and your blueprints I created an ember-sails starter kit: https://github.com/artificialio/sails-ember-starter-kit Check it out.
Also I think it would be great to see this merged into sailsjs as an --ember option or something similar. Could I just use your code to get started writing a PR?
@GlobeCoder The starter kit looks interesting. When Iām back from holidays, Iām going to give it a spin. An `āemberā option in Sails is something I would highly appreciate, but apart from putting together the blueprints, Iām not sure how much time I have to invest into that, so go ahead ā I would be happy if you can make use of some of my stuff.
As a Rails developer Iāve been watching Sails and am impressed with their architectural choices, in particular Policy Objects which are implemented by the underrated Pundit gem in Rails. This pattern handles arbitrary complexity in permissions by injecting all you need to know into the object for you (user, subject, attempted action) and then you implement the logic to determine whether the action should be allowed.
It also handles multiple data stores, an example where they are attempting to leapfrog Rails.