I'm looking for the simplest system for communicating with a MySQL database and an app being developed for iOS.
All the data is on the online database and I'm looking for the user to be able to retrieve and submit information to the tables just as a normal desktop browser would.
I'm developing with Dreamweaver and packaging it for mobile release using the jQuery Mobile templates (which are in HTML), is there a way to do this?
JSON is the way forward! I created a web-service and used Javascript and jQuery to retrieve the values from the MySQL database.
Related
Here i have no idea, what to exactly use to get the real-time information on the web page on my already developed application. The real-time feature will be based on online Auction feature, as a bidder bids low/high amount all the concerned user should reflect the newer price on their window immediately without refreshing the web page.
Please suggest me the best way possible, my application based on:
PHP 5 frontend with yii 1.1.15 framework
Python django-rest framework for the rest api to fetch data from mysql database.
for this i have heard about the node js, but will it be possible using only node js without using mongodb/rethinkdb angular or express js or socket.io.
Why do you need bout Yii and Python? DRF is very easy to use and will provide the backend to provide a rest API and the front end can be something as simple as HTML/CSS/js to fetch data from the REST API. Yii will not add any value to this system.
You need to read up on how an API based system works works (which is what you are trying to do.
I'm creating this Cordova (Phonegap) app where I store users personal data (username and scores) every 60 seconds after which I want to display all users data to everybody (like scoreboard). For this I obviously need something to first gather all the data from users and then showing it to everybody.
I tried sending data with ajax to php for database storage. Then I tried sending data with ajax to php file to write the data in file, and finally realized that ajax won't work locally(?) (yes, I'm a novice). How do I create this kind of "global memory" that is accessible by all the users? How this is normally achieved in apps? I'm open for ideas.
Thanks.
You need a backend service, and call it from your application with webservices. You should send the data to your server (via webservice), store it in a database, and generate another call to send the scoreboard to every user.
Google about Rest APIS, choose the one you like.
For storing into the app, using localstorage is OK if the data is not too big. If it is, maybe you need to use SQLite, accesible from the cordova API.
Hey guys im faced with a challenge of linking my localhost mysql/php when adding something in a form that form should also be linked with my android application.
ex. I have made a form for the admin whereby they could add a new bus route and it will be stored into their database using php mysql in localhost server now that new route should also be linked to my android application it should display the new route (My android application uses sqlite database so two different database here) so when users use the application when they search for new route it should also display as well
How can i go with that? any ideas please im really stuck in this
thank you
Well there are generally 2 approaches to follow when you want to 'Sync' your web database to your mobile database
Push Notifications: You could send a push notification to all your users, whenever a new route is added to the mysql db. When the notification is received by your app, (it's not necessary you show the notification to the user) you could just ping the server for the new route, or you can send the 'route' in the message part of the push notification if you can, and then add this new route to your sqlite database.
AccountManager: Using the AccountManager is the preferred method when you want to Sync your data. The AccountManager uses the SyncAdapter to Sync your apps data with it's cloud. When Android pings the servers of other apps for syncing, it pings your app's server too, and syncs your data. This method also takes care of issues like, if the internet connection was not working when it was intended to sync, so android will schedule the next sync soon.
To provide a good service, you should take a look at a client-agnostic API architecture.
In this architecture, you have a PHP/go/whatever-written API, that can or can not be REST (but it's reccomended), that will provide, given a HTTP petition, the desired result.
Using PHP in the simplest way, you should create different .php files, one for each action ( www.myserver.com/getRoutes.php, www.myserver.com/getRouteDetail?routeId=3), and make those PHP files query the MYSQL database and return (echo) XML / JSON / Raw text.
this should then be parsed by your mobile application, and added/updated to your SQLite database.
I'm designing a website using html5,css and JavaScript mainly for client-side validation. Also I'm designing an app which will request the data entered in the website from a database. i.e if user searches for a contact, it should display the info entered in the form from the website. i don't know which route to take in terms of d/base connectivity. I'm new to html5 storage(local Storage) and php for server-side scripting. I understand that local storage is browser dependent and data is stored in the users browser.Also if you want to have registered users(premium members) is it better to have database in the server connected via php scripts or localStorage works pretty much the same?
I can't answer everything but since you asked I can answer a few.
Q: User registration while also using a membership service PHP or localstorage?
A: PHP connected trough a Database never use localstorage for this.
Q: Search trough a site, LocalDB or Database?
A: Database.
Pretty much everything you mention there should use a database.
I wonder how to send only "update" data to mobile device. Assume that I build mobile app for iOS and Android that uses PHP webservices to get data. When we start application first time it get all data form mysql database using json. But when we start it second time I don't want to delete old data on my mobile device and fetch all data one more time. I would prefer only to download "update" using php webservices from my database. Any ideas how to achieve this?