Results 1 to 3 of 3

Thread: Data to populate website and iPhone

  1. #1
    Join Date
    Apr 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Data to populate website and iPhone

    Okay so I am posting here because I know not where else to post!

    I already run a website for an engineering society that details things like when the next chapter meeting is, history of the chapter, various things. The site is mainly html with some JavaScript and some SSI. I do this using Dreamweaver.

    I have decided to learn how to write an iPhone app to make finding the monthly pertinent details easy. Surfing the website using Safari on the iPhone is possible but tedious. The Apple SDK is downloading as I type (I had to go out and buy a MacBook!).

    I need to establish what those pertinent details are, arrange it so I just add the updates to a file of some sort on the server, which is read by both the website and the iPhone app to populate their pages. This way I will only have to update the one file each month. I do not know how to make my html page read from a file and populate - I will have to learn both that and how to do it for the iPhone app.

    There must be a correct way to do this, and I am hoping that one or more of your brilliant members might point me in the right direction.

    thanks

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Unfortunately I don't think anyone here will know much about making iPhone apps. In fact, few members have iPhones (though I happen to be one of them). Regardless, we can probably help with the conceptual aspects.

    The best idea for this would be to use a database. This allows central storage of information then you can retrieve it in many ways: via HTML pages (that is-- using PHP or something like that), connecting from an iPhone app, etc.

    But if you don't want to do that, then what you will need to do is create a standard format that can be read by both systems. The idea is that you won't want messy HTML in there if it's going to be in the iPhone app.

    Actually, before I get into the details of that, there is one option: iPhone apps can actually embed a web browser. So you could just use the app to bring up the HTML page. Simple, but probably also not that much more helpful than a bookmark (instead of an app).

    So there are a few options for a standard format. One is a database, which would be the most work to setup but most control as well. Short of that, you could use a text file with the information in a plain format. Maybe it could be a Javascript file that would be accessible to the HTML and (if this works) the iPhone app. Just populate data in Javascript and display as you'd like. That's one option. Another option is to use a serverside language like PHP to store the data (could be in a database as well, but could also be stored in .php files or read from .txt files, whatever) and then use PHP to organize the data in different ways depending on the request. Essentially it could be like a mini database or maybe just a data-presenting page, but with several different viewing options. Finally, a "text-only" version of a database is XML. You could store this information in XML and I'm sure there's a way to read that using an iPhone app, and of course there is using PHP or Javascript (I think JS, at least).

    At the moment this is just a description of various ideas. Once you know a bit more about how you'd like to approach this, let us know and we can give more specific advice (but maybe not the details of how to do it in an iPhone app). Generally, I'd always recommend a database for this sort of thing if you can do it. It's a bit hard to learn, but useful and gives you complete control.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Apr 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hey thanks Daniel, just noticed your reply. I will need to think about this a bit and then reply with my thoughts.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •