Configuration between MongoDB,Cordova and Node.JS - node.js

How to integrate mongodb, nodejs and cordova in eclipse. As i am building hybrid mobile application.Basically i am looking for configuration between these three.

I am using similar technologies and discovered that MongoDB cannot be integrated directly on Android/Eclipse.
MongoDB is designed to run on a server with more resources than mobile typically offers, eg a lot of RAM with specialized memory mapping etc. I would not expect Cordova integration in the near future.
If the design is already set on Mongo/Node, you'll have to create your own persistent data layer. Check out this blog post and sample project (GIT):
http://coenraets.org/blog/2013/04/sample-application-with-backbone-js-and-twitter-bootstrap-updated-and-improved/
An earlier post specifically for PhoneGap / Cordova:
http://coenraets.org/blog/2013/06/building-modular-mobile-phonegap-apps-with-backbone-js-requirejs-and-topcoat/
If you are flexible on technologies, consider using CouchBase:
http://developer.telerik.com/featured/powering-hybrid-mobile-apps-couchbase/
Basically, it takes care of much of developer plumbing and allows you
to focus on building your amazing app. There are three components to
it:
Couchbase Lite – A standalone on-device lightweight embedded JSON database; you will use this to stow away data locally on the mobile
device with full CRUD (Create | Read | Update | Delete) features.
Sync Gateway – The bridge that allows you to securely synchronize on-device Couchbase Lite data with Couchbase Server backend.
Couchbase Server – A high performance scalable JSON database that serves as your backend in the cloud.
CouchBase is also compatible with NodeJS:
http://docs.couchbase.com/developer/node-2.0/introduction.html
The Couchbase Node.js SDK allows you to connect to a Couchbase cluster
from Node.js. It is a native Node.js modules and uses Couchbase's high
performance C library to handle communicating to the cluster over
Couchbase’s binary protocols.

Related

Electron Desktop Application communicating with remote NoSql server

I've begun to dive into developing a desktop application with electron. I have been interested in pairing this application with a NoSQL database to create users, display data, and do CRUD operations. I've considered databases such as MongoDB and CouchDB, and I'm curious if creating a desktop application that communicates with a database hosted elsewhere is a feasible goal.
I'm hoping that someone here can help direct me to great resources on creating a desktop application that works with a remote NoSQL database. Any advice here would be greatly appreciated!
I recommend the use of CouchDB, which uses a JSON based document format. CouchDB bundles the server and data storage functionality in a single product, providing a REST-like HTTP interface for document insertion, updates, retrieval and deletion.
Therefore, you'll be able to interact with CouchDB directly from within the Electron desktop application. Apache CouchDB Nano is the official Node.js library for accessing CouchDB.
The following additional factors speach for CouchDB:
It is open source.
It has comprehensive documentation.
It is available for Linux, macOS and Windows.
It's easily installed and quickly set up.
It can be installed on your local computer (for development), on your own servers, or in the cloud.
It supports Mango querying language (inspired from MongoDB).
It is highly scalable.
It is shipped with Fauxton web interface that lets you create, update, delete, view and query documents on the fly.
etc.

What Is the most popular combination of technologies used to building Reactjs web apps

I'm mid PHP/Laravel developer with some exp in jQuery and Vue.js
I want to start self-learning in reactive JS frameworks (for example ReactJS), because I see is the near future in web development.
I checked the [React + redux] is the most popular technology working on browser side, but what about back-end ?
Secured API to PHP/MySQL? or maybe run apps directly on NodeJS server ? if nodejs env. then where will be storing the data ? SQL? NoSQL?
Tell me please what back-end stack is the most popular? or what stack is the near future ?
What about PWA with ReactJS ?
Thank You!
In my experience node.js is more popular for startups and makes it easy to work with since its all javascript.
Java and C# tend to be popular in large enterprise companies
SQL systems, such as MYSQL and PSQL are by and far the most popular options for both small and large companies.
SQL systems such as, Oracle and Microsoft SQL server, are the most popular in extremely large companies.
MongoDB is the most popular NoSQL db but its not used as often in production.
PHP as a server side language is used in about 80% of websites, but that is mostly because of wordpress, I have personally never seen a React frontend being implemented with a PHP backend.
Django and flask are popular python server frameworks but I find them to be popular with AngularJS( the original angular not angular 2+) not React.
The most common stack Ive seen is React, Redux, Express, PSQL, AWS.
https://w3techs.com/technologies/overview/programming_language/all
https://db-engines.com/en/ranking
Hi with my previous experience
ReactJs + Redux + fire base
this is very good technical combination you can use
reactJs , redux , meterilaUI,Sementic UI,ant design for front end.
and fire base can easily connected with your application.
advantage of this architecture the app will real time data application , no end point integration , quickly development , easy to authenticate
sample project
ReactJs + Redux + REST + Spring-boot in this project back end service developed using java spring-boot and it possible for connect any relational data bases such as Oracle , MYSql, NoSql , even any kind of Data bases using Spting-Data-JPA or Hibernate , JPA.
But authentication and state management not much easy. need to implement JWT to any state management method because REST is stateless.
advantage is good for micro services architecture , easy to build react app inside spring boot (packaging as .jar .war) and deployee j2EE server.
sample project
i have already developed project based on these 2 technologies stacks both are worked as my different requirements.

PouchDB with CouchDB with Node Web Api Server Layer?

Just trying to spec out a new system. We want to build a mobile app with offline storage using react-native.
We were originally going to use node and create a web api layer that worked with a MongoDB. However after looking into offline storage we found PouchDB. But pouch has to use CouchDB. So we are considering using CouchDb and having a flat db layer with all our business and data logic modelled in the apps.
However there may be some server side things that we need to do (for example pulling other records from somewhere else in the organisation).
So can we deploy a web api using node alongside CouchDb? How would this work? Totally separate or in the same node process?
So can we deploy a web api using node alongside CouchDb?
Yes, of course.
How would this work?
I'm not sure about what solution suites your needs, but one solution is to develop a web app with this tech-stack: NodeJS/Express, CouchDB/PouchDB and ReactJS/MobX. One important point about CouchDB is that, you shouldn't think about it like any other database . Basically, you don't need any server-side code to talk to CouchDB, it can all be done on the client-side with PouchDB. The live sync of PouchDB is extremely convenient at handling offline/online storage. If you're considering ReactJS, take a look at MobX.

Port Node.js/Express.js + MongoDB Application to Desktop

I have recently started the development of an App that was intended for the web, using Express.js + MongoDB to define a RESTFull Interface, all this is coupled with an HTML5 frontend that uses AJAX to receive and write data.
The first couple of beta-testers reported that they'd not be ok with the app being a web-application and would much rather have everything on their own computer for security reasons (personal data is handled).
Now, I know that there are a couple of ways to make a Node.js application appear like a native app see Packaging a node.js webapp as a normal desktop app [closed]. I already tried NW.js but I can't seem to find an option to actually run the express.js part of the application within the limits of NW.js.
To my questions:
Is there a way to run a restful api programmed with node & express
within NW.js?
Is it possible to run MongoDB inside that container?
If both or either one are not true, is there a framework that supports
running express & mongodb as a desktop application with my app?
I would focus the effort you would put into porting your app into making those same customers feel comfortable with your security measures for protection their data in the existing web-application format.
But if you really want them to run it locally then they probably need their own Mongo installed. Instead of a full blown mongo install I found NeDB. It implements the same Mongo api's so you should be able to port easily.
https://github.com/louischatriot/nedb
Embedded persistent or in memory database for Node.js, nw.js, Electron
and browsers, 100% Javascript, no binary dependency.

How to write to Meteor database from external application?

I'm trying to figure out how to insert data into a Meteor mongodb database from an external native mobile application that I'm writing (specifically for iOS using Cinder, right now). I'd like events that happen on the mobile device application to be written to my Meteor app's database, so that it can be immediately displayed on a browser elsewhere.
Importantly, I need to stay in my native application on the mobile device - I can't launch into a browser. I'm a bit new to Meteor, so apologies if I'm overlooking something obvious.
Any ideas on how to do this?
Thanks!
Your best bet is to use an iOS DDP client like this one. You can use this client natively in your existing iOS app and subscribe and write back to data in your Meteor ecosystem.
DDP stands for Distributed Data Protocol and is authored by the Meteor group as an external standard for real-time app frameworks to adopt. It's a much preferred method than communicating directly with the database because you can leverage the publish and subscribe methods within the Meteor ecosystem.
The protocol is under rapid development.
I believe there will be a release shortly that will expound on the current state of DDP and the evolution of its official specification. An official spec is slated for the 1.0 release.
Note: Here is a great video overview of DDP in its present form.
Another option is to have your iOS app write directly to the MongoDB instance used by your Meteor app. You can use any MongoDB driver such as NuMongoDB. Meteor polls the MongoDB database every ten seconds so web based users will automatically see updates, albeit with a short lag.
DDP is evolving quickly, as Tim mentioned, so this option might be a little more stable.
In terms of hosting, for scalability I recommend separating your MongoDB instance from the free meteor.com site, by using a Mongo host such as MongoHQ.
And what about other cases ?
I mean browser applications ?

Resources