I'm not being able to integrate
my mongoDB database to tabris-js.
I've tried to solve the problem but what seems to be a
major issue is that how to import npm modules to the tabris-js online
scratchpad.
Asked
Active
Viewed 48 times
0

Avijoy Haldar
- 1
- 1
-
IMHO, that's a good thing. Mobile clients have no business connecting directly to databases in the first place. First and foremost is "security", and next comes the issue of "stateless connections", which databases just do not do, nor should. What you need is an intermediary API between the client and the database actions. Something like a RESTful service, which does the actual database interaction from the "stateless" requests it receives from your client application. Lot's of people ask the same thing, and we give them all the same response. Do not connect to a database from a mobile client. – Neil Lunn Jun 29 '17 at 03:37
-
Ok that's cool about security. So I take it that you CANNOT in any way connect your tabris-js code to any mongoDB cluster? Or is there another way around? – Avijoy Haldar Jun 29 '17 at 03:51
-
IMHO The only things that "connect to a database" are actually other "server based processes" themselves. Client applications simply have no business doing so. If you look at firebase ( which is it's own thing ) or meteor ( which talks to mongodb on the back end ) both of these essentially implement WebSockets to communicate with server based services, which in turn communicate with their own "database back ends". This is how the world does it. So you should get used to understanding the pattern. No wire protocol driver exists in "pure JavaScript" anyway. – Neil Lunn Jun 29 '17 at 03:55