Академический Документы
Профессиональный Документы
Культура Документы
Pemrograman Berorientasi
Objek
Tipe1 Tipe2
Declare the View Class
The code is still same as previous
example, but we will make some
adjustment [later]
Step-By-Step [3]
Defined M-V-C class
3. Controller Class
The controller (along with its attending logic) acts as
the mediator between the view and the model. The
controller talks to the model and delivers model objects
to the view to display
Consider our previous controller => MyHandlerClass
does it match with above definition??
In our previous controller, it has functionality to do
some business logic process => we already build model
class for the business logic process [let’s make
adjustment to the code]
Declare the Controller Class [1]
Interaction between class
VIEW
[Tipe1]
MODEL
CONTROL
[ModelCalc]
[Event-
Handler]
VIEW
[Tipe2]
Declare the Controller Class [2]
From the figure that depict the
interaction between MVC, we know
that the controller class must handle
2 View
It mean there are a collection of view in
controller class
Declare the Controller Class [3]