Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6529571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:39:06+00:00 2026-05-25T09:39:06+00:00

I have created my first complex OS X application. While working on it, I’ve

  • 0

I have created my first complex OS X application. While working on it, I’ve had some doubts about how I use the class that implements the NSApplicationDelegate protocol (the class Xcode creates by default for Cocoa applications, i.e. MyApplicationAppDelegate.m/h).

In many tutorials (and books), I see that people create an AppController class to manage main or generic application tasks. I prefer to add my generic tasks directly into MyApplicationAppDelegate and create specific controllers depending on the modules I need to manage.

For example, I add into MyApplicationAppDelegate every IBAction used to open other windows (i.e. opening a preference panel), every function that isn’t strictly connected with a specific module/controller and IBOutlets for the main interface. In MyApplicationAppDelegate I also add every reference to controllers used in my application. That’s essentially about it.

I’m really confused because I’m not sure whether or note this is good design. Has MyApplicationAppDelegate been designed for some other purpose?

I would like any suggestions and if possible any articles you might know of about design patterns for Cocoa.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T09:39:07+00:00Added an answer on May 25, 2026 at 9:39 am

    Xcode used not to create an application delegate class in the Cocoa Application template by default.

    I believe Apple only introduced the automatic creation of an <AppName>_AppDelegate class with their project template fairly recently, maybe in version 3.2 or so.

    This is why many older books and tutorials have you create an AppController class, because the old project template did not create one for you.

    You are free to use the <AppName>_AppDelegate as your main controller class, and the reason Apple adds it to their template is that so many developers use the NSApplicationDelegate object as their main application controller.

    An excellent resource to learn more about design patterns in Cocoa is the book appropriately called Cocoa Design Patterns.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Greetings, I'm working on a JS-based application that does some complex work and logs
I have a big project that was first created in Borland C++ 6. We're
First, a little background. I have two ASP.NET web applications that use SQLServer session
Let me first describe my goal: I have created an object with 3 properties:
I have created a file argument.pl which takes several arguments first of which should
I have a folder with these files: alongfilename1.txt <--- created first alongfilename3.txt <--- created
I am trying to write my first WCF project. I have created a project
I'm new to NHibernate and trying to create my first mapping. I have created
I have a create action for a form that potentially generates errors (i.e. first
In my Swing application I have the problem that when creating a new instance

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.