cocoa paradigm

Apr032010

A design pattern is a template for a design that solves a general, recurring problem in a particular context.
Cocoa is an object-oriented library of tools that contains many of the objects and methods needed to develop great applications for Mac.
An object consists of both data and methods for manipulating that data. An object is a instance of a class, which means that there is memory allocated for that specific instance of the class. Other objects or external code cannot access the object's data directly, but they request data from the object by sending messages to it.


An Single Object

An simple object

Model-View-Controller (MVC) is a design pattern that was derived from Smalltalk. It proposes there types of objects in an application, separated by abstract boundaries and communicating with each other across those boundaries

Object relationships in the Model-View-Controller paradigm

An simple object
Model objects hold data and define the logic that manipulates that data.
A view object represents something visible on the user interface (a window or a button, for example)
Controller Objects Acting as mediators between model objects and view objects in an application are controller objects. Controller objects communicate data back and forth between the model and view objects.
An outlet is an instance variable that identifies an object

Relationships in the target-action paradigm

Relationships in the target-action paradigm


Create the connection from the object that sends the message to the object that receives the message:

  • To make an action connection, create the connection from an element in the user interface, such as a button or a text field, to the custom object you want to send the message to.

  • To make an outlet connection, create the connection from the custom object to another object (another custom object or a user interface element) in the application.