Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Again about MVC

 
Olena Golub
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, it's me again with the same boring question about MVC

sorry! But I have some ideas and i want to ask your to comment it.



I took some recomendation from peter Link

And implement MVC in this way showed above.

The itialization of DataModel and Controller i decided to make in View. In Data i will define the Constructor with the startup mode of the Applikation(standalone, remote). And in Data i will called all remote methods from the server.
Do i missed something? Is it correct interpretation of MVC? Do you see some inaccuracy?

Regards,
Olena
 
peter wooster
Ranch Hand
Posts: 1033
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Olena Golub:
Hi, it's me again with the same boring question about MVC

sorry! But I have some ideas and i want to ask your to comment it.



I took some recomendation from peter Link

And implement MVC in this way showed above.

The itialization of DataModel and Controller i decided to make in View. In Data i will define the Constructor with the startup mode of the Applikation(standalone, remote). And in Data i will called all remote methods from the server.
Do i missed something? Is it correct interpretation of MVC? Do you see some inaccuracy?

Regards,
Olena


You're getting there, here's some code from my model, that fires a dataAvailable back to any registered listeners.


And here's the dataAvailable method in the View:


Analysing this code should give you a few hints on ways to enhance you code.


Good luck,
/peter
 
Olena Golub
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Peter,
Thank you very much for your precious answer,

I got it!
But I will not implement in the Controller the ModelListener.

I added in View something like this to notify the Controller that the view was changed:


in Controller:


I think it should be also correct.
Olena
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic