General question: Connecting apps to databases


Last Updated:

  1. IMJustCurious

    IMJustCurious New Member This Topic's Starter

    Joined:
    Aug 8, 2010
    Messages:
    3
    Likes Received:
    0
    I have a general question about Droid apps connecting to databases. Here's the background of why I want to know:

    There is an app called Foursquare. It let's friends coordinate their calendars and list restaurants they'd like to visit. On any evening, it figures out when all the friends are available for dinner, picks a restaurant they want to try, AND NOTES WHEN A TABLE IS AVAILABLE AT THAT RESTAURANT.

    Where would a programmer find such database information about restaurants? Does it have to be created and maintained by the app programmer or is there just a list of databases out there that maintain restaurant seating charts, sport team schedules, concert venues in any given town, etc. that app developers can tie into for their apps.

    Thanks in advance...
     

    Advertisement
  2. cmh0114

    cmh0114 Well-Known Member

    Joined:
    Jan 10, 2010
    Messages:
    116
    Likes Received:
    7
    I don't know the answer to this, but my guess would be that there is a website (or some service) that keeps track of whatever the programmer needs, and then the programmer just accesses that service and formats the information to display. If the service that the programmer needs doesn't exist, they can just create it (although maybe just is not the best word to use, lol) and then access it and parse it.
     
    IMJustCurious likes this.
  3. hiasad

    hiasad New Member

    Joined:
    Jul 27, 2010
    Messages:
    4
    Likes Received:
    1
    There is something called a webservice. Android SDK supports REST Style web services where an app can exchange data with a web server by doing http request and parsing the response. I can tell you 110% that a local database cannot handle this. If there is no restaurant tracking well know web service available you can create your own by parsing the websites that display such information (this would be a hack). Hope this makes sense :)
     
    IMJustCurious likes this.
  4. cp1

    cp1 Well-Known Member

    Joined:
    Apr 30, 2010
    Messages:
    375
    Likes Received:
    35
    IMJustCurious likes this.
  5. IMJustCurious

    IMJustCurious New Member This Topic's Starter

    Joined:
    Aug 8, 2010
    Messages:
    3
    Likes Received:
    0
    So let's say there is a site NiteLifeBoston.com and they list all the dance clubs, with hours, dress code, cover charge, specials... you're saying a programmer of an app can hack into that database and reformat the information to use in the app? If so, my fear would be that they website goes down or changes things and my "parasite" app stops working. Am I getting this right?
     
  6. IMJustCurious

    IMJustCurious New Member This Topic's Starter

    Joined:
    Aug 8, 2010
    Messages:
    3
    Likes Received:
    0
    Wow, great site! I notice that site already has downloadable free apps to use its website. I wonder if there is the same thing for bars...?
     
  7. cp1

    cp1 Well-Known Member

    Joined:
    Apr 30, 2010
    Messages:
    375
    Likes Received:
    35
    Yes, if you're "leeching" off of a website that you don't control and the website stops existing then your app will stop working. I think I read something in the latest Google Market terms that said your customers will all get a refund if something like that happens within 1 year, but I can't remember exactly. (assuming it's a paid app, of course)
     
  8. hiasad

    hiasad New Member

    Joined:
    Jul 27, 2010
    Messages:
    4
    Likes Received:
    1
    Yes Sir. From your app code you can simply make "HTTP REQUEST" to the website. You will get HTML in response. Figure out what are the tags you are looking for and you can get the data you are looking for without any database. The bad part is if they change their design , you will have to update how your system works. I have libraries in .Net and Java that does this using regular expressions :D If you want email me and I can share those.
     

Share This Page

Loading...