MVC Architecture
 The Model-View-Controller (MVC) design pattern assigns objects in
an application one of three roles.
   Model Object.
   View Object.
   Control Object.


   The pattern defines not only the roles objects play in the
   application, it defines the way objects communicate with each
   other.

   MVC is central to a good design for a Cocoa application.
Advantages
MVC is central to a good design for a Cocoa application.

The benefits of adopting this pattern are numerous.
  Many Objects are reusable.
  Reusability of the code.
  Applications which implemented MVC design are more
  extensible than the other applications.
  Many Cocoa technologies and architectures are based on
  MVC.
Model Objects
Model Objects define the logic and computation that
manipulate and process the data.

For example, a model object might represent a character
in a game or a contact in an address book.
View objects
A view object is an object in an application that users can
see.

A view object knows how to draw itself and can respond to
user actions.

A major purpose of view objects is to display data from the
application’s model objects and to enable the editing of
that data.
Controller Objects
A controller object acts as an intermediary between one or
more of an application’s view objects and one or more of
its model objects.
Example
Data Types
Char --character

Int ---- Integer no decimals

Float--- Single precision floating point number

Double--Double precision floating point number

Long--- for long integers

BOOL---YES Or NO.
Operatrors
What is an operator?
  In a Math program an operator indicates the action
  performed in a equation
    For Example 4+5 = 9 here + and = is called the operation.
Arithmetic More Operators
+ -- Addition

-  Subtraction

* -- multipication

/ ---Division

% -- Modulo
Relational and Equality
              Operators
==  equals

!= -- > not equals

> --- > greater

< -- less than

>=  Greater than or equal to

<= Less than or equal to
Logical Operators
! - NOT

&&  Logical AND

||  Logical OR
Control Statements and Loops
If condition

If else condition

For loop

While loop

Do while

Jump statements

MVC Architecture

  • 1.
    MVC Architecture  TheModel-View-Controller (MVC) design pattern assigns objects in an application one of three roles. Model Object. View Object. Control Object. The pattern defines not only the roles objects play in the application, it defines the way objects communicate with each other. MVC is central to a good design for a Cocoa application.
  • 2.
    Advantages MVC is centralto a good design for a Cocoa application. The benefits of adopting this pattern are numerous. Many Objects are reusable. Reusability of the code. Applications which implemented MVC design are more extensible than the other applications. Many Cocoa technologies and architectures are based on MVC.
  • 3.
    Model Objects Model Objectsdefine the logic and computation that manipulate and process the data. For example, a model object might represent a character in a game or a contact in an address book.
  • 4.
    View objects A viewobject is an object in an application that users can see. A view object knows how to draw itself and can respond to user actions. A major purpose of view objects is to display data from the application’s model objects and to enable the editing of that data.
  • 5.
    Controller Objects A controllerobject acts as an intermediary between one or more of an application’s view objects and one or more of its model objects.
  • 6.
  • 7.
    Data Types Char --character Int---- Integer no decimals Float--- Single precision floating point number Double--Double precision floating point number Long--- for long integers BOOL---YES Or NO.
  • 8.
    Operatrors What is anoperator? In a Math program an operator indicates the action performed in a equation For Example 4+5 = 9 here + and = is called the operation.
  • 9.
    Arithmetic More Operators +-- Addition -  Subtraction * -- multipication / ---Division % -- Modulo
  • 10.
    Relational and Equality Operators ==  equals != -- > not equals > --- > greater < -- less than >=  Greater than or equal to <= Less than or equal to
  • 11.
    Logical Operators ! -NOT &&  Logical AND ||  Logical OR
  • 12.
    Control Statements andLoops If condition If else condition For loop While loop Do while Jump statements