We have build and Android app with sqlite db and a Windows program with JavaFX that can use either Derby db or sqlite db. Synchronization does not want to use a server yes old fashion wire form one device to another. So my question is has anyone found an open source API to accomplish this task? As a novice developer I might add that the perhaps the other fly in the soup is we would like to encrypt the data on both databases. This fly can be optional. The desktop development is using NetBeans and the Android development is the obvious Android Studio.
If anyone has a book or web site suggestion that would be great.
We can consider a NON FREE API with cost as a factor.
Related
I am new to multi-device development in Delphi and I have a basic VCL background. I have worked with multiple projects that use locally stored databases for their functions etc.
Coding is a hobby and I want to learn more about mobile app development for personal usage. I am busy writing a simple application that serves as a scoring system for a card game that we invented. I am currently using SQLite local database to store data.
I am now looking for a way to have a single database that multiple devices can access so that any one of our android smartphones can run the application and interact with the data in that database.
At this stage, I don't really have extensive knowledge about what I am talking about and I want some advice regarding this problem. Is a single database the best solution? Is there perhaps a different approach?
I am familiar with basic FireDac syntax (TFDConnection, TFDQuery, and TFDTable), so I would prefer maybe keeping a FireDac infrastructure if possible.
I would prefer the solution to not be too complicated :)
I do hope that I presented the problem clearly. Please ask if something sounds unclear - I will try my best to elaborate.
I am using Delphi 10.3 (Community Edition)
There are many solutions to this problem. I won't expose all possibles but only the one I think is best:
You need a server somewhere in the cloud to keep data from different devices and you have to make your application communicate with that server. You can build server side with Delphi, or other tool.
I recommend a REST architecture over HTTPS using JSON format to send/receive data to/from devices.
Delphi has everything required to build both client (Your devices) and server side. Not sure for Community Edition. If not included in CE, you may use third party libraries to accomplish the same task.
You next step is to think about that solution, do some research by yourself, write some code and when you are stuck, ask another question on StackOverflow.
I developed an offline dictionary application in android that has local db built in sqlite shipped with it during installation. But the problem is that how to can I update, delete, add new record in the local db of application whenever it connects to the internet?
Is there any specific protocol, technique, pattern or model?
Android Apps will typically use ReST architecture.
A good library to help you with this is Retrofit.
There isn't really a "universal" solution to your problem.
I am creating mobile application using HTML5 (AngularJS, PhoneGap). For local data storage I am using PhoneGap. My application is kind of account management software which required to store lot of relational data on local db. I deployed the application on mobile using command.
cordova run android
I am using following script to data store
http://docs.phonegap.com/en/3.0.0/cordova_storage_storage.md.html#Storage
This is working properly but performance is really bad (I having Moto G, Quad Core processor, 1 GB RAM). I fired 3 different select query on local database, and it took almost 2-3 second to process. each 3 table has only 1 rows.
I have seen performance matrices provided here. But to reduce my overall effort I am thinking of using PhoneGap.
So here are my questions
How to improve performance with phoneGap on mobile database?
I checked the db file application creating in emulator. Found that it's sqlite db file. The same database gives very good performance on native android application. How?
Since I am creating mobile application with local database. How suggestive it is to use phonegap database interface?
Use the Cordova SQLite-Plugin. It should perform much better for your purposes. Native Android also uses SQLite as database.
I have a question about which database I should use for my android and iOS apps. I have not messed with servers before so please excuse my ignorance.
Anyways, I am developing apps for a website that doesn't have a mobile version. The website has a MySQL database and uses phpMyAdmin as a control panel.
I need to figure out how to hook into the server. I know that java provides full support for SQLite databases and I know that they server hosters can install SQLite on the server for me.
What do you all think? MySQL or SQLite?
You should be using SQLite for any local databases to the Android app (CoreData for iOS).
Any interaction with your websites MySQL database should be handled through API calls.
There is a good PHP framework called Slim PHP that will make building your API extremely simple. It's documented very well. Slim PHP doesn't offer any form of ORM so I'd also recommend integrating with Idiorm/Paris, again their documentation is rather good so you shouldn't have a problem piecing this all together.
Of course you can opt for a larger PHP framework that has all of this in one place, such as Symfony.
Local DB always sync to remote server sounds a great idea, because you get the responsiveness for using local DB, but also get sync crossing devices.
But can anybody talk about their experiences with couchbase on Android?
https://github.com/couchbase/Android-Couchbase/
What are other options out there? Cloudant?
Look at Touch-DB Android. It's more compact than Android-Couchbase and is still regularly updated and maintained (I believe the main contributor is working on a big release, which is why the last update we two months ago). The framework is built on top of Ektorp and emulates a CouchDB database on your Android device.
Replication to and from a remote database is fairly intuitive and easy to set-up.
I use CloudAnt as my remote back end for my Android game.
I can tell you that in general, it works. e.g. I have an android app that syncs with iriscouch.com. But you might want to ask a more specific question.
iBoxDB is another option. It is a lightweight database for java. You can customize replication.
https://github.com/iboxdb/forjava