We have an angular js application application developed on Sails framework and uses mysql for persistence. The website is authenticated using Active Directory credentials.
Now we would like to enhance the app to work offline as well. So the following questions arise.
How should we accomplish Active Directory authentication while accessing the app offline?
As I can understand that Indexeddb or Pouchdb can be considered for offline persistence, which one between the two would be better or is there any other better alternative and how can we sync data from offline storage to online persistence which is on mysql?
Any thoughts are appreciated.
offline web application may not contain all online applicability.
for example; authenticating a user in a large system, need an online connection to server and its not possible and very stupidly idea to save hash of all password in client offline storage.
so you can show a message in offline stat to unknown user that say: you must Login in online stat first!
for making better angularjs offline web application, i recommend to you this article: Offline apps using Ionic Framework, PouchDB and AngularJS
Related
Me and my team are working on a product deployed in Azure, all of our backend services will be deployed by using k8s service in Azure and it seems like the most pragmatic and right choice for us.
We also have ReactJS frontend for some of backend services. We deploy them by using Docker and k8s at this moment. We started thinking about scaling of our web apps and found that everything can be done by Azure Web Apps.
I would like to know what is best practice of web app deployment in Cloud(Azure in my case):
Should I use Azure Web App service for this purpose?
Or it is better to keep everything in my k8s cluster
Any link or a book as source of true might be even better :)
Update 1:
I also found out that web apps can be deployed by using Blob Storage and Azure functions to access the static content from the Blob Storage. What do you think?
Azure WebApp is a perfect option for your requirement check this link for more details and guide
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?
I am building a mobile application targeting iOS, Android and WP with Ionic/Cordova. And using ASP.NET Web API 2 REST APIs backend.
I have the requirement that the mobile application can collect data and synchronise it with the APIs and if the mobile is offline, the sync will happen when it is online. The data size is small and any light DB would do including the localStorage one. The required sync is only needed one way, mobile to APIs. Also, once a record is synchronised, it can be deleted from the mobile.
I was looking at Couchbase mobile, but I found it is a Mobile DB to DB sort of a solution.
Can you recommend a mobile DB to REST/Web API sync solution?
With the native Couchbase Mobile solution for Android/iOS coupled with the REST APIs you are able to get data from Mobile device to your backend. Then delete any documents off your device once you get back a 200 status.
For Windows Phone, you can explore using PouchDB or going with the javascript browser based solution across all platforms since WP is not currently supported.
For the replication or sync to occur when your device is online again, you would require your backend to use Couchbase Server and implement the replication class methods in your native mobile app to have the push feature. Or you can use the REST API with logic detection when you are online again to POST to your backend.
I am developing a web app (HTML/CSS/JS) destined to be used as is and also compiled with phonegap for iOS/Android/and others. I am loging my users using OpenId Connect.
I am looking for a database hosting service. It should be NoSQL, readable/writable by jquery and scalable.
I need to store the user's contact info and other user choices from my app.
I am thinking about using Cloudant with a CouchDb database, but I am really new to this.
Can you help me ?
Thanks
If you would like to use Amazon Web Services, take a look at Dynamo DB. It is infinitely scalable. You can start for almost free and pay more as and when your data-size and request load increases. It can guarantee you the same low response time even with huge data.
You can use this from JS as well
I have discussed some other options in this other SO thread - Parse, Firebase, Dropbox DataStore etc. Have a look: Storing and retrieving data in the cloud and retrieving via webservices:
I have a phonegap app that uses jquery to post to a remote server, running on Google App Engine.
What's the best way to ensure that only my phonegap app can post to this remote server? I've been scouring the web for an answer but can't find anything concrete.
Normally I believe you'd check the referrer to ensure that the request is coming from a whitelisted domain but in this scenario there is no domain because it's a phonegap app.
This question is similar but it's gone unanswered:
Security issues with phonegap remote server access
You can't. Any request that your app can make - including whatever authentication credentials you care to embed in the app - can be generated by a third-party. The most you can do is obfuscate, by embedding secrets in your app, but a clever user can extract these.
A better option would be to authenticate the user, rather than the application.