Multiple ASObjC scripts in Xcode Project? What's correct "Structure"

So in developing my app I being working on separate sections of it as separate scripts
and packaging some of them into libraries.

I have already built an Xcode project with one of my ASObjC scripts/script libraries
and I want to now use some of these new scripts/script libraries and further develop the app.
I’m wondering about using multiple ASObjC scripts in the Xcode projects
as I believe I’ve seen this in other projects.

Few questions

  1. do I still need to add the regular AppDelegate methods to the scripts.
  • AppWillFinishLaunching etc?
  1. A) would I want to make the added scripts Delegates of the Main Script?
    B) if I do make them Delegates do I really need to have the -App Will Finish Launch stuff
  2. am I not approaching this correctly and should I be doing the following:

Other Design Approach:

  • Should I be considering the AppDelegate Applescript as the front end connection between
    Cocoa and the rest of my applescript? IE it is my controller and view controller between the AppleScript world and Cocoa world?

  • Should I design the AppDelegate so that has the properties and functions for VIEW CONTROLLING

  • and also the AppDelegate would be my DATA/MODEL CONTROLLER and utilize the other scripts as libraries?

  • Take advantage of as many Xcode Controllers that I can to reduce the code in the AppDelegate?

If I can use multiple AppDelegate should I use the above MVC design approach
and have each AppDelegate Script handle separate “sections” of my code?
IE

  • one for handling Data importing, managing, moving
  • one for processing, manipulating, searching
  • one for receiving external data
  • one for viewing

thanks

If you need code run then, yes.

No. (and by definition, any object can have only one delegate.)

That’s usually the most straight-forward approach.

IMO, it doesn’t make sense to overthink things. You can put stuff that might be called into other class that you init when needed, for example. But by and large, if you come up with a structure of any complexity, chances are you will hit the limitations of AppleScriptObjC.

AppleScriptObjC in Xcode is a good way to put a bit of interface on scripts. It’s generally not a good way to try to build full-blown apps.