I am really confused on how to get data in and out of an android app from the internet.
I imagined that I would store information in the mysql db on the server I already have set up. But from what I have read, I would need some type of in-between web service to make queries with data sent from the app.
Can anybody toss me some tips on how to get something like this started.
Or, if you know of a better way, let me know about it.
This question has been asked several times, for example here: How to get from a MySql server to an Android app?.
Bottom line - you don't connect directly. You have something on your server (like RESTful) that you connect with via HTTP.
Try this method out. I will be using this method for the current project i am working on.
You basically create a php script on a server and use http posts to send the data to the script, read the tutorial linked below for better explanation.
mysql/android tutorial
Related
Alright I know you might find this as a silly question, but I'd like to ask you if there's a way to have a listener to MySQL like Firebase can do?
"...Firebase only sends updates to our app when data changes." - from learnhowtoprogram article
To make my question clear, I'm using nodejs, express & socket.io and I really wanted to make a simple web app which will automatically update its data once the database(MySQL) changes.
I've made a prototype using socket.io which listens to the client and emit new data from MySQL and vice versa. Yes, it works but in the long run it's horrible.
I hope you could help me with the concepts.
Thanks!
yes you can do that if you are using nodejs and socket
try this lib : mysql-events
Is it possible to build a realtime app using AngularJs with a mysql database?
I've been reading thousands of tutorials, but they are all focused on express, nodejs, etc.. didn't found any documentation on wheter it's possible or not. I tried to take a look at the socket.io docs, but still didn't found anything relevant to this question.
I didn't tried anything yet because of this. I use a webApp based on AngularJs on a apache server (local).
Where should i start to be able to build a real time app using these tools i have?
Do i really need to use a node/express server?
What are the main consideration i need to do before taking this step?
Is there any documentation i should read?
I need to do this real time because it involves product orders, call center, ticket system, etc.. So everytime there is a new ticket is opened/changed, new order arrives, etc.. I need to make the user aware of this, without the need to refresh the page.
Or if someone could give me a further explanation of this concept and how to get started, it will be great.
You can run angular on top of any backend, although most examples push towards REST. If you want your app to feel like a real time application, using WebSockets is a likely improvement.
WebSockets play nice with Angular, look at https://github.com/wilk/ng-websocket for example. A back-end in Node will work, but many other backend techs will do equally well.
Here is a decent tutorial using MySQL, NodeJS, and Angular: https://codeforgeek.com/2015/03/real-time-app-socket-io/
I recommend that you keep using a webserver like Apache (my personal preference is Nginx). You can proxy API and socket requests to Node, and serve static resources for the app from a folder.
Check out https://httpd.apache.org/docs/2.4/mod/mod_proxy_wstunnel.html if you stay with Apache. Check out http://nginx.org/en/docs/http/websocket.html is you go for nginx.
Without a webserver, you'll have to either:
serve your static resources with Node (polluting your server project with client code), or
work with different ports, risking the app becomes unusable in client environments, or
work with different domains, giving you a CORS head-ache.
Although I don't have much experience with Node, MySQL with Node.js should help you out a bit.
You'll want to move away from Apache if you want to do websocket stuff with Socket.io
Yes, it is possible to create a software with AngularJS in the front end and any other server side language that speaks to MySQL. Few months back I worked on a software with Java Spring Framework in the backend with MySQL database and AngularJS with bootstrap in the front end. You could start by following the MVC pattern, where your views can be served as AngularJS and your Controller can be in any server side code, with MySQL database.
We are very struggled about getting and posting table data for Navistion Database.We need getting data for Navistion DB to our local(sqlLit) DataBase and posting data SqlLit Db to Navistion DB.In PHoneGap
We are goggled.But no luck.So Please give any documentation and link .Please help me.
PhoneGap/Cordova can work with other databases when you use middleware on your server to respond to it. So for example, your server (with the Navistion DB) could use PHP or ColdFusion to respond to Ajax requests from your app. It would handle taking the request, querying the db, and converting the response to JSON. There is no documentation link for this as it is too abstract of a question really.
Agree with Raymond - the question is too general to give any kind of recommendation. Maybe if you could elaborate it a bit - at least outline the task you need to solve, it would be easier to suggest something.
Anyway, I presume, you don't want to insert data into the Navision DB directly, but need an interface to Nav functionality. My first idea would be to look at Web services. Some documentation is available on msdn: Web services in Nav. You can expose Nav objects (Codeunits, Pages and Queries) through a web service and call it from PhoneGap.
I am working on an app in visual c++ which requires data to be accessed from a database which can be edited so that every time there is a modification to the data I do not have to resend the app as it will automatically update, it is also required that this is a desktop app.
I am currently using MySql however for this to run constantly I will be needing a server which for a single simple app wont really be worth purchasing, so I started thinking of alternative methods and thought to myself there must be some method of reading directly from a website or online database, am I correct in thinking this? If so could someone please explain how I would achieve this?
Also, I have purchased phpmyadmin in the past so if there is any way I could connect my visual c++ app to a database from this then that would be great.
EDIT: Note, this app relies almost entirely on the database as it is just 3 combo box's and one text field all of that values for which come from the database.
The following response is assuming that by online you mean on the web.
You cannot exactly 'connect' to an online database with C++ (or anything outside of that server hosting the database).
What I would do is create some PHP API's that you can POST to with libcurl via C++. You can both send and receive data this way.
I'm trying to create a real time web application with NodeJS with an MVC layout using the Express framework and MySQL as my back end data store.
The problem that I've run into is that I can't find any good examples or tutorials on how to use Socket.io (or any other web socket platform to pass information in real time from the database to the web application. The specific problem is getting any new update to MySQL on a specific table to pass that information to, so that if new information is added to the database by a second client connection it will update on the first client connection as soon as the information is added.
Does anyone have any ideas on how to get socket.io(or another websocket connection protocol) and mysql to work together to achieve this? Any code example's or pointing me to some websites that have documentation on this topic would be appreciated.
Thank you!