Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

MVC in Swing

Name: Anonymous 2009-06-11 2:25

I don't get how MVC1 works in Swing2. Technically it's probably more MVP3, but it's the model that I'm confused about.

Let's say I have the typical Person object with various properties such as name, age, height, eye color, etc. Now if I want to present the Person object properties on a GUI, I can't just have the Person be the model. I have to use the models specific to the GUI elements (Document model, ComboBoxModel, ListModel, ButtonModel, etc), and then somehow tie my Person in with these 'models'.

Does this mean I have two models? Like, yo dawg I heard you like models inside models? Or is this just a case of Adapter pattern4?

_____________
1. http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller
2. This probably applies to frameworks beyond just Swing
3. http://en.wikipedia.org/wiki/Model_View_Presenter
4. http://en.wikipedia.org/wiki/Adapter_pattern

Name: Anonymous 2009-06-11 4:47

Just ignore all the ENTERPRISE BULLSHITE and do what makes sense.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List