I developed a stupid game in eclipse (not using any particular library such as libgdx, only with "normal code").
I have some doubts about the multiplayer and databases online. In my game I haven't developed yet a database. So i thought I should have create a database online with mysql and connect to my android app. If so i would create users stored in my mysql online and the parse them with a json parser connecting to mysql trough some php based bridges.
Then i searched for android multiplayer and i found out that a more efficient way to create login user is using google+ login offered by google.
Gived the fact that my database isn't only a way to let user log in but it is also a way to store tha stats about their matches, If i wanted to use g+ login, should I have a mysql database connecting to my app to store other data, or in a way that i actually ignore google provides these things?
The other doubt is about multiplayer: what i should do to implement it?
Once the g+ login is implemented, then what should I implement?
Matches between users are managed and stored completely by google or not?
Should I have to add these informations in my DB online (if at the point one the DB is needed).
Sorry for my bad english.
Hope you can help me.
Thank you.
Related
I'm relatively new to mysql and I'm having trouble creating a website where a user registers and has access only to their private information. So far I have created a login/registration page that's linked to my mysql database using php and it works just fine. Every time a user registers, their userid, username, email, and password is inserted into my database.
The only problem is I don't know how to make each user have their own private info such a contact list filled with names, numbers, and emails that they can change on the frontend once they have made an account.
I was thinking about making a mysql table each time a user makes a new account, but from other stackoverflow posts, I learned that it was a bad idea. It stated that I should just have one giant table with all the users instead of separate tables. But I don't know how to do this and have each user have their own separate data. I have researched this for weeks and couldn't find anything online so I made this stackoverflow account to ask.
I also want to mention that I'm using the mysql command line in cloud9 ide so I can't use wordpress and I also plan on using Django.
Thanks a lot in advance.
I think you need to step back from this a bit, especially because using Django means that your easiest approach will be to use its Object-Relational Mapping api to handle the database.
Django is a Python web framework that gives you both database management and provides views to make things like login pages and user management easier. There would be no particular reason to use PHP (and it would be confusing to do so) in concert with it.
I'd suggest taking the tutorial for a spin first.
I am trying to implement "passive-waiting" in an iOS app, connected to a MySQL database. The app needs to get information from the database, which is no problem, but what I can't figure out, is how i can get the MySQL database to somehow notify the app when a change occurs.
It could be implemented, by simple having the app constantly check the database asking for new entries, but that is not very efficient. Would be smarter if the app would only connect and ask the DB for data, when it KNOWS there is newly submitted data to fetch.
How can this be implemented?
Thank you
The concept you are looking for is called "Push notifications". Here is one of the tutorials I've found with a quick search: https://parse.com/tutorials/ios-push-notifications
I have a situation here, I want data passed from application developed with PHP and MySQL to my ASP.Net Application. There is this application developed in PHP with MySQL database which was developed by another developer. I have a application or rather I am developing an application in ASP.net and I dont have access source of this application or the database. I want some data from that PHP application to passed to my ASP.net application. What I can do Is colaborate or ask that PHP developer to supply the data in the format I want (XML or Json or any other technology) but I dont think that is secured way to do so. So I want to ask here what is my option here. What should I ask the PHP developer so that I get data into my application using best and secured way.
If my question is not clear
Option 1: Create API to share the needed data across the 2 system
Option 2: Create Link servers to query from mySQL to MS SQL
You don't say how collaboratively you both work, but it sounds like the other developer will provide the data if you have a solution.
So, ask her to create a mySQL user that has read-only access to the database, then you can query it directly.
Im developing a very simple native Android App containing a simple Main Menu with the Today, Yesterday, This Week, This Month and Search by Date options.
(I bought the lynda course: "Building Android and iOS Apps with Dreamweaver" with HTML5 and with the design and functionality of the app im not having too much trouble.)
What i entend with this app is this: i will write famous people profiles every day (between 1 and 5). So when people click (for example) in the Today option they will access to the profiles list that i have created for today (Yesterday and others is a check on the past written profiles from database).
So imagine that some android user clicked on today and will be presented with 3 profiles options ("Brad Pitt", "Shakira" and "Cristiano Ronaldo"), that i need the app to access my server database to update it (the "Today" profiles).
and finally...
Before the questions i want to say that i have searched on stackoverflow and found very similar answers, but im a novice on programming and when i'm reading the answers they can differ so much that i got confused going link on link documentation.
The Questions:
I want to create somekind of method that i could have a template with different profiles (Singer, Politician, Soccer Player) and click on somekind of button to start a new profile/article with Born Date, Occupation, Nationality, Biography and etc. Its this possible? How can i do it and in wich programming language?
What kind of server and what kind of database do i have to create and how to configure it to send the info to my app?
There is any server specifications that i must have for this to work the smoother and easiest possible? For this issue price is not a problem.
What kind of code should i write on my app so that it could get the "3 profiles update for today" from my website?
Its possible to show me some code example that would work with this simple step in my app of selectiong "Today" button on main menu and the app check for new profiles for today and present the user as an option? Because if i had this bit of code i could understand better how to do the rest with the profile details on the "Brad Pitt" option for example.
Hope you understood my questions. Thanks in advance. Have a nice day
Assuming that you're using the Phonegap Framework to develop your application, I would do it like so:
First of all get a Server/Webspace capable of running PHP Scripts and a MySQL Database.
You also have to rethink the way these applications work, for example you can't
configure it to send the info to my app
You need a Server Side Script (i would choose PHP for this, it's easy to learn and available on almost every Server). This PHP Script then queries your MySQL Database where all the information about the people is stored. On thing to remember is that your Clients will poll the server and request the content, you're not actively sending anything to Clients unless requested, that's just the way how HTTP works. The interface your Script is providing there is called a REST Interface.
Have a look at the link, it explains everything pretty good. Your output format should be JSON this makes it really nice to work with in the Client App later on. To do things like "what was posted today?" Have a look at how SQL Queries work and implement it in your Script.
Now for the client you can access this data by using JavaScript, most likely jQuery to simplify everything a bit. Use the jQuery $.getJSON function to access the data provided by your REST Interface. Now you can use basic jQuery to wrap this data up with HTML to present it to the user. I know that this is not "example code" or anything you requested, but it should point you into the right direction on how to achieve something like you want to do. Just do a google search for all the keywords listed above and keep reading about it, then you should be able to build a app like that.
I am trying to create a web application which have a similar functionality with Google Alerts. (by similar I mean, the user can provide their email address for the alert to be sent to, daily or hourly) The only limitation is that it only gives alerts to user based on a certain keyword or hashtag. I think that I have found the fundamental API needed for this web application.
https://dev.twitter.com/docs/api/1/get/search
The problem is I still don't know all the web technologies needed for this application to work properly. For example, Do I have to store all of the searched keywords in database? Do I have to keep pooling ajax request all the time in order to keep my database updated? What if the keyword the user provided is very popular right now that might have thousands of tweets just in an hour (not to mention, there might be several emails that request several trending topics)?
By the way, I am trying to build this application using PHP. So please let me know, what kind of techniques I need to learn for such web app (and some references maybe)? Any kind of help will be appreciated. Thanks in advance :)
Regards,
Felix Perdana
I guess you should store user's e-mails and search keywords (or whatever) in the database.
Then your app should make API queries (so it should be run by a server) to get some relevant data. Then you have to send data to the all users.
To understand here is the algorithm:
User adds his request to the page like http://www.google.ru/alerts
You store his e-mail and keyword in the database.
Then your server runs script (you can loop it or use cron) which makes queries to the Twitter to get some data.
Your script process all the data and send it to the user's e-mails.