Pergunta

I'm creating a college dining menu app, in which I need to send push notifications based on the daily menus.

I only know objective-c, so I'm inexperienced with concepts such as databases that are needed for this task.

What I understand:

  • I need to parse the data from the online dining menu and store it in some database
  • I check daily if the current menu has what I'm looking for, and alert the Apple Push Notification service if it does
  • Above two points must be done without independently of my app, since the app won't be open at all times.

Resources I found:

  • Heroku -- a cloud platform where I can store the data

  • Helios -- "provides backend services" like push notifications and can be implemented w/ Heroku (not entirely sure what it does)

  • Ruby on Rails

What I'm confused about:

  • How do I store the data in the database? Do I have to write a program with ruby on rails that scrapes the web data and then somehow add this to Heroku?

  • What exactly does Helios help me with?

  • What is my actual objective-c app code responsible for doing?

  • Are there any other parts/better resources I left out?

Any pointers would help. Also, I'm trying to avoid using any paid services for server/database tools.

Foi útil?

Solução

Let me explain it for you:

  • Heroku is just a way to host on the Amazon AWS cloud infrastructure. It doesn't store your DB - it provides access to db infrastructure, but doesn't host the DB itself

  • If you want to store cross-platform data in your iOS application, you need to connect to a third-party db (this is how FB works)

  • This means if you want to keep up with menu updates on your phone, you'll need to firstly have a central db (hosted on Heroku's recommended db infrastructure), and then use the iOS app to connect to it

The trick will be to take any updates from the database & display them using a push notification. I don't know about this, but the Rails part I can tell you about:

  1. If you want to store a menu in a db, you'll need a db. You can get one either at AWS or Heroku (notice how the db != rails)

  2. Next, you need data in that db. This is where rails comes in - you'll be best using an infrastructure such as Rails or CakePHP to manage the data

  3. If you create a simple Rails app with admin backend, you'll be able to upload as much data as required to your db. If you need to "scrape" the data, you can create a simple script & cronjob to get it & put into the db

  4. Finally, each time the db updates, you need to send the update to your iOS app. I don't have much experience with this, but it seems you need to use the pub/sub programming pattern to send the updates to your device (displaying them on screen as a result)


Answers

To answer your questions directly:

  1. You store data in a db through Rails or another framework

  2. Helios looks like it will connect your iOS app to your backend db infrastructure. Don't know how it works, but it looks pretty good

  3. Your objective-C code gets the iOS app running natively on iPhone / iPad

  4. I think you'll be okay with what you have here

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top