Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Doctor Q

Administrator
Original poster
Staff member
Sep 19, 2002
40,482
9,431
Los Angeles
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?
 
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.
 
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.
 
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.

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.
 
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?
 
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.