Sunday, August 28, 2011

Do you know Objective-c?: What is Cocoa?(II)

As we saw in the last post, then shows a video as a practical example, showing the structure that must follow to the design pattern MVC.


Because even I do not have audio on videos, as a clarification, the video content is summarized in the following diagram, where the project subdivide the three logical divisions that we saw in the MVC pattern.


-Belonging to the Model, Class CalculadoraBrain, will be declared the ivariables* and methods of operation (pulsed operation store, store digit, etc...).
-Belonging to Controller, CalculadoraViewController class, vriables are declared IB (Outlet and Action), which correspond to actions that may be given in the View, Model and methods that correspond performed at each time.
- Belonging to the View will generate the elements of the GUI of our application, linking these elements to events and actions to be taken for control

*ivariables: instance variables.


Thus, as we see, bind our three logical parts of our calculator, achieving independence and stability.

No comments: