Is it possible to connect local database using reactjs - reactjs

We have a hybrid offline mobile application using sqlite db and reactJS frontend. The app container(App Shell) is Xamarin. Have downloaded the db within the app boundary.Looking to connect to the db and execute queries from our reactJS application.Is it Possible to do it?(Note: It is a reactJs application and not react Native)
Is it possible to connect local database from create react app when loaded inside xamarin app shell container?

It is possible to connect to a SQLite database from a ReactJS application that is running in a Xamarin app shell container, but there are a few considerations to keep in mind.
First, since the database is local to the mobile device, you will need to use a plugin or library to access it from the ReactJS code. One popular option is the react-native-sqlite-storage library, but since you're not using React Native, you'll need to find an alternative library or plugin that works with Xamarin and ReactJS.
Second, you will need to ensure that your Xamarin app shell container is set up to allow communication between the ReactJS code and the SQLite database. This may involve configuring the container to expose the database to the ReactJS code and handling any security or permission issues that may arise.
Finally, it's worth noting that using a local database can introduce additional complexity and potential issues, such as the risk of data corruption or conflicts if multiple users are accessing the same database. Be sure to carefully consider these factors before deciding to use a local database in your app.

Related

Problem with running maintenance mode in my Django and React apps that are stored on Azure Web App for Containers?

I have deployed Django and React application on Azure. I am using Web Application for Containers. One Web App is for Django and second one is for React (CORS headers are properly confiured, both apps are connected to each other). Docker images are stored on Azure Container Registry.
I am looking for an option to switch both apps to Maintenance mode when doing some maitenance things or deploying. I was thinking abouting creating extra env variable called MAITENANCE_MODE in Application settings where I can switch manually from false to true and then it switches the mode on websites automatically. Another idea would be to create some webjobs but I am not familiar with these topics and I am asking for an advice on how to do it or at least where to look for such solution.

How can I access a Heroku Postgres database from a React Native application?

I have a web application hosted on Heroku that uses PostgreSQL. I want to make a React Native application that can access that database.
How can I do that?
A typical architecture would be to add an API to your web application and have your React Native application talk to the API. I'm not sure how much obfuscation is provided by React Native, but generally speaking client-side code shouldn't contain sensitive information like database credentials.
I wouldn't recommend having multiple applications talk directly to the database, regardless of technology.
Having said that, Heroku does have some guidelines about how to access your database from outside of Heroku. Briefly,
don't hard-code your database credentials since they could change at any time
instead, use heroku config:get DATABASE_URL to retrieve the credentials from your Heroku application
This is commonly used with graphical database clients, for example.

Where do I keep the application logic in an offline-first web app?

I'm trying to build an offline first web application using couchdb and pouchdb as the backend/frontend databases, AngularJS as the frontend framework and expressjs/nodejs as the backend server. The problem is that what I'm used to is the backend-MVC mindset of building web apps, and not to SPAs, offline-first design, or having only json apis on the application server.
The problem I see with the design I'm considering is that I don't see any role of the nodejs server except serving static files. The frontend would get data from the pouchdb database which would sync with the couchdb database backend. I need an offline-first application capable of working locally when there's no connectivity and syncing when connectivity is available, so this is important.
But where do I implement the important bits of application logic that I need in the backend, like form input validation or user access control? I found some ways to embed logic in couchdb databases (like using filters as shown here) but somehow writing application logic in the database doesn't feel right.
What part of the big picture am I missing here?

Difference between Using Java Cookies and Using Database

I am new to web Application development. I have a task of making a JSP persistent. What are the methods to do so? Do I need to Write cookies or created a database to continuously fetch data from Webpage. What are the advantages of one over another.
Any kind of tutorial or resources will be helpful. I am using Eclipse as a development tool. I have deployed the app on AWS, HERE

Deploy and connect build application into Bluemix PaaS?

I already deploy my application with eclipse and built in database (generated from AssestDB of the application). I want now to manage the application and deploy it with IBM bluemix PaaS, to manage Mobile Data.
What is the best DB I must use when coding before deploy into Bluemix?
If you want to configure your local test environment in order to minimize migration problems when deploying your application on Bluemix, you should replicate the target environment on your local one, as much as possible.
If you are planning to use the Mobile Data service on Bluemix please consider that it is built on Cloudant NOSQL Database, and it offers a further layer of abstraction that allows you to directly persist objects (if you are familiar with the concepts of class, object etc..).
You could also directly connect from a local application to a DB service instance running on Bluemix.

Resources