Questions about HTML5

rtert ertertert's picture

hi,
Me and my team have a few questions.

Q1) Can we create an application using HTML5 that works on mobiles as a Service (Back-end) at the same time connected to MySQL database?

Q2) Can we use HTML5 to access mobile resources like messages, contact list, memory card and ... ?

Thanks in advance.

Taxonomy upgrade extras: 
Ivan Chichkov's picture

Q1 Answer:
There are at least two ways to approach this problem:
1. Create a Web application. Application itself is on the server, configured to run even if the mobile device is offline.
2. Create an application that is packaged as native, files are in the application package and run in the native Browser component. Browser component launches the application from local files.
Now, the questions are:
a. Where the DB is? HTML5 supports WebSQL and IndexedDB. However, depending on the mobile platform (Android uses Chrome, iOS uses Safari, WP uses IE9), there are levels of support for this databases. In addition, if DB is on the server, why would you want to have the service running on the mobile? If the DB is on the mobile (keep in mind the DB runs in sandboxed application related file system with size limitations), and the platform used supportd DB APIs, there is still need to have support on the server. The mobile IP address is not guaranteed and access rules are governed by operators. In this case Web Socket API is the solution, but again, support is not guaranteed on all mobile platforms and you will still need a server applicaton to handle the data transfer between different mobiles, which sounds like why we need the service to be on the mobile? We will discuss this and methods to check for support in the training.
b. If application is packaged as native, all your questions answers are yes, it is possible, however, the application will not be 100% cross platform, as you will need to write a lot of native code to access contacts and mails. A some kind of solution maybe PhoneGap framework and again there is no full independence and cross platform functionality as the framework has no equal support for all mobile platforms.
Summary:
The fastest implementors of all access means to local machine resources, including microphone and camera, are Google Chrome guys. However, all these APIs are in development state and no stable support is yet available, not to even think about other browsers offering it.
If you want more detailed ideas of how and what, please be specific and explain your idea in more details.

rtert ertertert's picture

We want to create an app:-
-about the app:-
1)Register Form
2)Login Form

(The data will be saved in Mysql DB, because we want to use it for the website.)

-main use-case
1)The user login to the app, after signing-in successfully our app should work on the mobile as a service
incase any new message arrives to inbox it should be saved to DB.
2)The app should stay waiting for any updates for messages (incase the user has any new SMS it should be saved in DB automatically)

-Mysql DB
it will be used for php website, when any user login he can check all his saved messages
(ONLINE BACKUP)

Ivan Chichkov's picture

We want to create an app:-
-about the app:-
1)Register Form
2)Login Form
ICH: Both well supported by HTML5 forms. Once you register and/or sign in the functionality goes to native side... below
 
(The data will be saved in Mysql DB, because we want to use it for the website.)
-main use-case
1)The user login to the app, after signing-in successfully our app should work on the mobile as a service
ICH: Here things become more complicated. Need to implement it on native side.
See, http://developer.android.com/guide/webapps/webview.html