Please join us at the new JavaWorld Q&A Forums. Your existing login will work there. The discussions here are now read-only.


JavaWorld Talkback >> 958783

Pages: 1
M.Olsen
Unregistered




Another futile attempt at separating data from GUI
      #10887 - 08/20/04 04:01 AM

I enjoyed the "Why [foo] is evil" articles for provoking my thoughts, although I did not agree with every conclusion. I does seem obvious to me that one should not create get/set methods unless they are really needed, that one should expose all methods through interfaces, and that code should reside as close as possible to the data it relies upon.

However, this article seems to describe yet another futile attempt at separating GUI from the data it describes. I think the bottom line is that, in general, GUI and data _are_ closely related, even if you tend to put it in different places. In particular, I dislike the passing of numeric data as strings. Assuming that the string represents a number, as the name implies, why not use the Java language to define that as a contract?

The flexibility of creating GUIs is no better than in a getter/setter-heavy approach. The extra interface seems to be little more than a complication.

I've seen several ways to try to separate GUI (view and control) from data (model). All are clean and nice in theory but in practice there is always a lot of nasty wiring between GUI and model. This approach does not solve that problem.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 1 anonymous users are browsing this forum.

Moderator:   

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 4434

Rate this topic

Jump to

Contact us JavaWorld

Powered by UBB.threads™ 6.5.5