Building Intel XDK with SQLite - html

This might be a often repeated question. I am a newcomer to the world of mobile and programming in general. I am trying to build an app that uses the native database capabilities within android (sqlite) with Intel XDK (HTML5) as the rendering framework. I don't want it to a web based app, but a complete on the device app.
Can i code server side on XDK (server side code and database connections)
If not what should be my way of creating the server side component - build it seperately and somehow package it?
thanks in advance!

Yes, As per my knowledge Intel XDK is just your front end, to make a communication with your Master DB (MySQL, MsSQL, etc..) you need to have server side language. You can make use of PHP and it is a light weight server side scripting language, you can run it on XAMPP server.
Here is useful link.
To make connection with local (device) DB you don't need server side language and server also. Intel XDK itself providing feature to build the app for android (.apk) and IOS (.ipa) format.
So far I gone through and got, Intel XDK is providing list of four local database connectivity in client end. Which are
Local Storage
Web SQL Storage
Session Storage
Indexed DB
For more detail refer this link.
I'm not sure about Intel XDK with SQLite.

Yes,
You can work with SQLite in phone gap application.Please use the link to the Intel XDK third party plugin. Before that please download the project dependency jar file from GitHub and create the directory with cordova plugin SQLite name and place the file in it, include the jar file. Then try to add the plugin using URL.By this you can easily work with the SQLite in phone gap.
Also you can work with the server-side storage using Phone gap application. please see the link for sample.
Hope all helpful

Related

MySQL “Connector/J 5.1.48” platform-independent on MacOS Mojave issues

How do I download MySQL “Connector/J 5.1.48” platform-independent on macOS Mojave? There is a project I’m working on and I need this specific connector to work on my computer because there’s a specific Android Studio related project I need it for. When I try downloading it, I get an error message. Just in case it’s not possible, are there any other database replacement options that work well with Android Studio that are simple to implement on macOS?
Link to Connector/J 5.1.48: https://dev.mysql.com/downloads/connector/j/5.1.html
Thanks.
JAR files already are platform independent... They are not executable
I'm not sure how your error is specific to Android Studio, but mobile apps should not be directly querying a Mysql database, but rather reaching a web API that exposes database results over HTTP
And even if you did want to use mysql drivers in an Android app, you'd add those with Gradle, not JARs
That being said, MacOS isn't the issue either, and there's plenty of database replacements for Mysql

Webserver on windows 10 IOT?

Can I create a webapplication on my windows 10 IOT running device (R-PI 3)?
On other PI's I've got Debian running with LightHttpd, but I can't seem to find anything on a webserver on Win10 IOT device.
I did see some examples on self creating a -very simple- webserver (ie listening on a port) but there should be more than that?
PS
I added 2 tages: Windows IOT and Windows-10-IOT-Core.... are these the same?
Can I create a webapplication on my windows 10 IOT running device
(R-PI 3)?
Yes, you can start with Hello blinky official sample. There are also Python and Node.js supported.
Using ASP.NET, you can publish Web Application on Windows IoT core. (Note the version of ASP.NET, more detailed information is here.)
And, restup is a HTTP server for universal windows platform (UWP) apps that can run on Raspberry Pi with Windows IoT core.
PS I added 2 tages: Windows IOT and Windows-10-IOT-Core.... are these
the same?
Windows IoT core is an edition of Windows 10 differs from desktop and mobile editions. It is optimized for smaller devices with limited resources, such as Raspberry Pi 2 and 3.
Window IoT is something about Internet of Things you can create with Windows.
For tags in SO, "Windows IoT core" and "Window IoT" have identical function.
There are a couple of ways to do this that I've come across which might interest you:
1) As you suggest, it is very simple as you suggest to write you're own server app or app service that listens on a port and responds. Here is a decent example which was easy to follow and implement:
https://sandervandevelde.wordpress.com/2016/04/08/building-a-windows-10-iot-core-background-webserver/
2) Also, it is possible to develop a plugin for Windows Device Portal (WDP) by following the instructions here:
https://learn.microsoft.com/en-us/archive/msdn-magazine/2017/october/windows-device-portal-write-a-windows-device-portal-packaged-plug-in
I have tried this and it works very nicely. It demonstrates how to serve static content and dynamic content either from the foreground or a background task.

Windows phone 8.1 app connect with a database

I'm totally new to the windows phone 8.1 app development.
I'm trying to develop a simple app with a database using visual studio 2013. It is not a silverlight app.
my app just have a text field and a button.And i have a MySQL database in a local server(WAMP).
I need to get a input from the text field and store it in the database.
First thing that I want to know is it possible to do?
If it is possible I would be very grateful if you could provide a step by step guide or a link where i can learn about this.
If it is not possible what are the other ways that I can try to store my input in a database?
Local storage
I'm guessing you're looking for a way to store structured data locally on the phone. AFAIK, MySQL is not supported on Windows Phone (MySQL is big, runs as a server, and it wouldn't be possible or practical to "install" it onto a phone). Instead what Microsoft endorses is to use SQLite. You'll first need to download the SQLite library as a Visual Studio extension. Then you'll need to install something like SQLitePCL (from NuGet) which essentially wraps the native SQLite library so that it is accessible from .NET languages. Make sure you add both references to your project. SQLite stores a database as a file that you can put in the local storage for your app.
Remote storage
I'm not sure if it's directly possible to connect to a remove MySQL server from a WP app. Usually you'd access a remote database through a webserver that exposes an API for you to use (e.g. a REST API). You can then send data to the webserver via a HTTP POST request, and then your webserver will store the data in the database. This is a big topic, and involves knowledge of server-side programming such as ASP.NET, Ruby on Rails, Django, PHP, etc. This topic is too broad for me to give you specifics on how to do this. See this answer.

SQL adapter in Worlight?

I am new to IBM Worklight,and i found a way to connect to the MySQL using the SQL adapter.
the configuration as below:
<dataSourceDefinition>
<driverClass>com.mysql.jdbc.Driver</driverClass>
<url>jdbc:mysql://localhost:3306/worklight_training</url>
<user>Worklight</user>
<password>Worklight</password>
</dataSourceDefinition>
Since the adapter are compile together with the app, just wondering, is it safe? is there a possibility of someone decompiling my apk or ipa to view the adapter connection thus acquire the user and password to my mysql database.
A hacker decompiling your .apk or .ipa file will not find the database username/password there, for the simple reason that the adapter is not compiled "together with the app" and is not part of any artifacts that you install in a device.
An adapter is a server-side entity, not client-side.
The adapter is an object stored in the memory of the running application server.
Adapters are Server side code andare not part of the apk or ipa files.
You can check/confirm this information in Worklight documentation. The details about adapters, under "Developing the server side of a Worklight Application" are at:
http://www-01.ibm.com/support/knowledgecenter/SSZH4A_6.2.0/com.ibm.worklight.dev.doc/devref/c_overview_of_ibm_worklight_adap.html
You can also check the Server Side Development of MobileFirst Platform Getting Started Modules
https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-6-3/server-side-development/
(MobileFirst Platform is the new name of Worklight)
In worklight, you usually have the application (apk/ipa) communicating with a server side component (the adapters) running in a worklight server. The adapters are used to communicate with backend systems (like a mysql server). There are a few different types of adapters to communicate with different types of backends (like sql, http and SAP)
Please, let us know what documentation/guide caused you the understanding that adapters are part of the client apk/ipa. If that is really stated in any documentation, it is wrong and must be corrected.
Edit:
To connect to a MySQL DB (no matter if it is a standalone MySQL or in XAMP, LAMP or whatever package) you can follow this geting started tutorial
https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-6-3/server-side-development/sql-adapter-communicating-sql-database/
Also note that, if you are using MobileFirst Studio (previously Worklight Studio) downloaded for free from Developer Works you have a developer version of the WOrklight Server running inside Studio so that you can create and deploy adapters and use it during development as your server. But when you go to production you are required to purchase licenses of Worklight because you don't have the worklight server available for free.
So if you have Studio, you have the server available but only for development purposes.

Flash Application with local database (not sqlite, not air)

I would like to have a Flash Application (not air) to connect to a local database.
Air is not only getting unsupported by Adobe in LINUX but besides, it has serious problems and miss implementation with SQLite.
So we want to connect to a local MySQL database.
This application should be simple, so we do not want to also have an unnecessary web server (also local) to make a middle communication between the flash app and the MySQL server.
There is this driver that allow to communicate Flash with MySQL
http://code.google.com/p/assql/
Question is:
Is this the best approach?
Would it be any problem using this approach when installing the whole application to each client? (because we also in the installation should install a MySQL server).
A MySQL SERVER is called a SERVER for a reason: It is meant to be installed on servers, not on clients. So the answer to your question is:
1) No, this is not the best approach. Not even close. You would be better off using a SQLite database (however shitty you may think it is)
2) Yes. Nobody would like installing a MySQL server on their computers just for the sake of running your application. Think of casual (non-expert) users who would need to install and configure the server just for running your app. That is the very REASON why they developed SQLite and so many languages support it.
You should check out http://code.google.com/p/air-sqlite/ for sqlite access in AIR (I don't know if this is the same as the inbuilt code or not, so just check that out)