Can I create a web app for iPads with a local web server?

Discussion in 'Web Design and Development' started by Doctor Q, Mar 9, 2011.

  1. Doctor Q Administrator

    Doctor Q

    Staff Member

    Joined:
    Sep 19, 2002
    Location:
    Los Angeles
    #1
    I'm imagining a scenario like this and wonder if it's technically doable and if it's a reasonable approach. Note that I'm a web programmer but not an iOS programmer.

    A 12-person team is out in the woods on a scientific scavenger hunt for bugs. They stay in wifi range of a Mac that's running a web server with a web app I'll write. Each person has an iPad or iPhone running mobile Safari.

    When one scavenger spots a gromphadorhina portentosa, he/she types its name in a web form and submits it. (Maybe we'll use abbreviations for the names!) The web app checks if a gromphadorhina portentosa has already been spotted and recorded, letting that person know. If it hasn't been spotted before, the scavenger takes a photo and collects other scientific information about the bug, which can stay on the local device until later. The purpose of the central web server is to prevent two scavengers from taking the time to record details about the same bug.

    Optimizations could include using AJAX to check for matches as the user types.

    Is this a practical way to do approach this problem? Are there smarter approaches I should also consider?
     
  2. needlnerdz macrumors regular

    needlnerdz

    Joined:
    Jun 10, 2006
    Location:
    switzerland
    #2
    what you described is very seemingly possible. look into PhoneGap - you can develop apps in CSS/HTML/JAVASCRIPT that are compiled as normal apps. Nevertheless - it could probably also be done simply by making a normal website that utilizes the iOS Webkit - run the Mac with a local wifi network [not sure if there is a limit to how many people can be connected at once?] - then with MAMP running the server.. just have all of the ipads loading the server page.. using PHP/mySQL to keep track of who finds what. PhoneGap is the slick way to do it.. but might be overkill.
     
  3. Doctor Q thread starter Administrator

    Doctor Q

    Staff Member

    Joined:
    Sep 19, 2002
    Location:
    Los Angeles
    #3
    Thanks for the tip about PhoneGap.

    The part I'm least confident about is the networking (mobile devices connecting to the Mac without any of them having Internet access). I'm not a networking expert so I'm unclear what I need to do.
     
  4. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #4
    If they are in wifi range of the Mac then it is just like any other LAN to the devices. They would use the local IP address of the Mac to connect to it and then they can just access web pages as normal.

    So they might connect to:

    http://192.168.1.1/web_app/

    for instance and then it just behaves exactly the same as any other website. Remember if you are just making a website you do not need to worry about the network except to make sure they have WiFi access or a wired connect at all times. Obviously if one of those requirements is not met then they would not be able to get access to the Mac and therefore the web app.
     
  5. Doctor Q thread starter Administrator

    Doctor Q

    Staff Member

    Joined:
    Sep 19, 2002
    Location:
    Los Angeles
    #5
    Thanks. That explanation is very cromulent. :) (In other words, I understand.)

    Sounds like I should give this setup a try. Anybody have a gromphadorhina portentosa they aren't using?
     
  6. Laird Knox macrumors 68000

    Joined:
    Jun 18, 2010
  7. Doctor Q thread starter Administrator

    Doctor Q

    Staff Member

    Joined:
    Sep 19, 2002
    Location:
    Los Angeles
    #7
    I guess you're not on a diet. They're rather large. :cool:
     
  8. blaster_boy macrumors 6502

    blaster_boy

    Joined:
    Jan 31, 2004
    Location:
    Belgium
    #8
    Stating that you are the least confident about networking, I would suggest that you try it out before going into the woods - you can disconnect your mac from the Internet for a while or shut down your router / Internet box.

    Don't forget to enable web sharing to start your local web server and write a simple test page.

    Then try reaching that with your iPhone/iPad.
     

Share This Page