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

Pages: 1-

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 2:45

Wow, that sounds apalling.

Name: Anonymous 2009-06-11 3:01

You want the MVVM pattern

Name: Anonymous 2009-06-11 3:06

This is a case of NobodyUnderstandsMVC pattern.

Name: Anonymous 2009-06-11 4:47

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

Name: Anonymous 2009-06-11 4:48

I like Mr.Satori because he is a programmer like me, except he reached Satori. Oh god, I wish I could reach Satori too ;_;
 Mr.Satori also dislikes ENTERPRISE BULLSHIT and he is kawaii. And there are EXPERT PROGRAMMERS in /prog/ and that's good because I like EXPERT PROGRAMMING and I will never be one. Why am I such a looser ?!
 
Mr.Satori is like my dream programmer he has a HAVE YOU READ YOUR SICP TODAY face I love that. He is also nice why aren't real programmers nice?! I got my core dumped a lot of times but I love Mr.Satori and he wouldn't let my pointers go segfault because he's so nice and cool.
 
We would tune fishes all day and watch SICP lectues and other cool programming material on TV, and we would code in LISP because LISP is good. I wish I could code in LISP.

Name: Anonymous 2009-06-11 5:30

>>5
=================================================== AGREED ============================

Name: Anonymous 2009-06-11 5:44

So Jabba‘s controller protocols are named *Model, and the standard implementations actually contain data rather than binding to it?  How silly.
Still, you should be able to implement them in a proper controller class without much trouble.

Name: Anonymous 2009-06-11 7:54

You need the FYAD pattern

Name: Anonymous 2009-06-11 11:22

>>3
Aaah, yes, that's exactly what it is. Thanks.

Name: Anonymous 2009-06-11 11:44

Gentlemen, we witness some autists homework, who incidentally enjoys talking to himself on web forums.

Name: Anonymous 2009-06-11 12:58

>>7
This actually looks right, if you view /prog/ in w3m

Name: Anonymous 2009-06-12 5:09

>>12
Name something that doesn't look "right" if you look at it from a certain POV.

Name: Anonymous 2009-06-12 9:00

stop saging faggots

Name: Anonymous 2009-06-12 9:20

>>13
You're mother.

Name: Anonymous 2009-06-12 9:47

>>15
What about I am mother?

Name: Anonymous 2009-06-12 13:48

SAGE GOES IN THE COMMENT FIELD

Name: sage 2009-06-12 16:28

>>17
SAGE GOES IN EVERY FIELD

Name: Anonymous 2009-06-14 15:04

               /    //  /‐───- 、  \
              /x-─‐ァヘf/    /-────-、 \\ヽ
               /∧-―ン´7    /  / /      ヽ、厶. ヽヘ
.              /  \/_,〃   〃 ,{ l  | 、     ヘ ヘ Vハ
            /  _//〉‐/.   `八、/ | l  ! 丶    |  l ト、 ',
           ,'  f⌒∨ /    /ハ {\!. |l {   \   |  | トく l
            / ハ.  V   ,ィfテ女 ヽ八 ヽ   ヽ_ !  l |/ |  
             l l 〈_∧   {   lハ{_f::j:リヾ ` ヽ{`> 爪 l  ! |_  |
             | l   _ム _ゝへ | V;之_        _ ヽハ ,' /  | \|
             | l  > '´    ヽ            ィ=气 ル /  l\/!
             | l  { ー- ―― ヘ   , 、   ヽ   〃/i  ∧. |
          j八 1 、    __}  {  ¨ア    ,ムイ /  ,イ_」 |
         ,r≦三ヘ   ̄    ト、 ` ー   ,. イ   lV  / | l リ
        /  /  ハ   _... --‐〈. >‐r<  /  | j/,/' / j!〃
          // /   | ハ     , イl    f  ヽ   ∧/〃 / /'
.        〆 /    い \ -<  }}/ ̄ ̄`ヽ>‐メイ、 /
      〈  /     ∨ 弋ヽ   ハ、  -―‐-丶 //丁fヽ
      ∧/      ∨  `-~ '彡' \′  __ ∨´  |│ l
      l |        \==彳│  \/  ` |   |│ l
      l |          `ー‐ ´ |    \.    |   |│ ヽ

Name: Anonymous 2009-06-14 15:05


               /    //  /‐───- 、  \
              /x-─‐ァヘf/    /-────-、 \\ヽ
               /∧-―ン´7    /  / /      ヽ、厶. ヽヘ
.              /  \/_,〃   〃 ,{ l  | 、     ヘ ヘ Vハ
            /  _//〉‐/.   `八、/ | l  ! 丶    |  l ト、 ',
           ,'  f⌒∨ /    /ハ {\!. |l {   \   |  | トく l
            / ハ.  V   ,ィfテ女 ヽ八 ヽ   ヽ_ !  l |/ |  
             l l 〈_∧   {   lハ{_f::j:リヾ ` ヽ{`> 爪 l  ! |_  |
             | l   _ム _ゝへ | V;之_        _ ヽハ ,' /  | \|
             | l  > '´    ヽ            ィ=气 ル /  l\/!
             | l  { ー- ―― ヘ   , 、   ヽ   〃/i  ∧. |
          j八 1 、    __}  {  ¨ア    ,ムイ /  ,イ_」 |
         ,r≦三ヘ   ̄    ト、 ` ー   ,. イ   lV  / | l リ
        /  /  ハ   _... --‐〈. >‐r<  /  | j/,/' / j!〃
          // /   | ハ     , イl    f  ヽ   ∧/〃 / /'
.        〆 /    い \ -<  }}/ ̄ ̄`ヽ>‐メイ、 /
      〈  /     ∨ 弋ヽ   ハ、  -―‐-丶 //丁fヽ
      ∧/      ∨  `-~ '彡' \′  __ ∨´  |│ l
      l |        \==彳│  \/  ` |   |│ l
      l |          `ー‐ ´ |    \.    |   |│ ヽ

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