Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ember-Data best practices #8

Closed
hglattergotz opened this issue Dec 8, 2015 · 4 comments
Closed

Ember-Data best practices #8

hglattergotz opened this issue Dec 8, 2015 · 4 comments

Comments

@hglattergotz
Copy link

Hello,

Thanks for putting this addon together!

When writing an ember app with ember-data it would normally access a JSON-API compliant REST backend. When building this as an electron app, would I build that "backend" as an express server in electron (in electron.js)?
Or would I somehow write an ember-data adapter that accesses either the filesystem or a database directly?

I would prefer to keep the REST model, but am not sure if that is the right thing to do since there does not seem to be any information about packaging a REST backend inside of electron.

@felixrieseberg
Copy link
Collaborator

Sky's the limit 🚀. Nothing keeps you from running a server, but the network overhead seems unnecessary. I'd personally use localstorage or indexdb, depending on the use case. Ember Data Adapters exist for both.

I'm closing this for now (because it's not really an ember-electron issue).

@hglattergotz
Copy link
Author

Agreed, this is certainly not an issue. Just wanted to ask you a question 😄
The internal REST api does seem strange, I guess that is why I was not able to find any information on it.

Thank you!

@hugoruscitti
Copy link

nw.js wiki site has some thoughts about separation of concerns in desktops applications, i think its usefull to electron applications too:

https://github.com/nwjs/nw.js/wiki/About-Node.js-server-side-script-in-nw.js
https://github.com/nwjs/nw.js/wiki/Save-persistent-data-in-app

@hglattergotz
Copy link
Author

@hugoruscitti 👍 thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants