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

Browser support #1

Open
ybian opened this issue Oct 28, 2015 · 4 comments
Open

Browser support #1

ybian opened this issue Oct 28, 2015 · 4 comments

Comments

@ybian
Copy link

ybian commented Oct 28, 2015

Hi,

It says in README that:

... Right now it is built for Node.js, but browser support is coming soon.

How soon do we expect to have that? ;-)

@colinskow
Copy link
Owner

It needs to be integrated with Browserify, but I am not very familiar with how that works yet. If you want to take that challenge on, you are very welcome to create a pull request!

@ybian
Copy link
Author

ybian commented Oct 29, 2015

@colinskow I'm still investigating whether sofa-model is a good fit for my current project. If we finally decide to use it I will probably help on this. I'm uncertain whether we should put the validation logic separately like in sofa-model or make it into couchdb validate_doc_update function in design doc.

@colinskow
Copy link
Owner

@ybian Since a browser client cannot be trusted, it is important to validate your data on the sever. SofaModel is designed for a NodeJS backend. If you want your client to post updates directly to CouchDB, then validate_doc_update is the best strategy.

On the front-end I mostly use AngularJS which has very good built-in validation, so I haven't found a personal need for SofaModel in the browser.

@ybian
Copy link
Author

ybian commented Oct 29, 2015

@colinskow Thanks a lot for your comments. Yes, my case will probably don't need SofaModel in the browser either. You can close this issue or leave it open for someone who has a use case to pick it up.

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

2 participants