aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Again about MVC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Again about MVC" Watch "Again about MVC" New topic
Author

Again about MVC

Olena Golub
Ranch Hand

Joined: Jan 17, 2005
Posts: 113
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


SCJP 1.4<br />SCJD 1.4 (in progress)
peter wooster
Ranch Hand

Joined: Jun 13, 2004
Posts: 1033
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

Joined: Jan 17, 2005
Posts: 113
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Again about MVC