background and foreground proces in one app


I’m trying to create an application that contains a background process for monitoring network changes and a foreground process for the gui. The background application should be without a dock icon and without a menu (NSUIElement or LSUIElement at 1) but the foreground process should have both. I’m struggling with how to achieve this (unfortunately my AS books have very little info on ASS, recomendations?). Should I create an app for both and then put the background app inside the foreground app’s bundle? If so, what’s the best way for the foreground app to address the background app?

Any suggestions?

Before someone asks why you’re doing it with two separate applications, here’s the relevant thread:

What you need to ask yourself before you can decide how to architect your system is what you want the background monitoring process to do:

  1. What is the monitoring process’s purpose?
  2. Is it monitoring for condition X? If so, when condition X occurs, what should happen?
  3. What level of interaction does the monitoring process require?

ad 1) As laid out in this discussion, I’m trying to have the background proces monitor changes in SSID and / WAN IP. If a change occurs the app will signal a warning, resulting first in a password check and if not ok in an email being sent through Unix mail.

ad 2) see 1)

ad 3) The background/monitoring proces should be started or initiated after a period of idle activity as set by the GUI proces. It takes settings from the GUI such as the SSID and WAN IP to be checked against. If a change is detected by the monitoring proces it should either deliver the warnings itself or let the GUI process do that (I guess the first is easier). The GUI process should also be able to halt the background/monitoring process.

I’m currently thinking that I should have the background/monitoring process as a script app which can be scripted from the GUI app (using ASS to be built). The monitoring script app will then be placed within the GUI bundle.