Re: [linux-audio-dev] MVC again

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] MVC again
From: Lukas Degener (AFBLukas_AT_gmx.de)
Date: Tue Jun 03 2003 - 22:16:31 EEST


>
>
>
>MVC sure is a great thing, but I would like to see a concrete
>toolkit or a hint list which helps me in making perfect MVC
>code immediately. Is it even possible to write a MVC toolkit?
>
(...)

>What would be in such a toolkit?
>
Depends on what the toolkit is ment to do. The most consequent use of
mvc patterns that i saw so far is found within the JFC/Swing classes.
(Although there "View" and "Controller" are often(or always?) the same
object iirc. )
It's been a long time since i last did something in java, so i can't
come up with concrete class names, but i think that for instance there
was this Table/TableModel etc. Actualy almost any gui component within
swing is designed as a specific "view" on a certain data "model", even
for simple things: You could consider the JButton as "View" on a JAction
"model".

So if you want concrete examples of this and other design patterns,
this might be interesting to have a look on. Its nicely API-documented
at java.sun.com and i think there was also a very good tutorial on Swing
in particular.
Many of these patterns could easily be ported to c++, others might be a
bit more tricky to port, since they depend on garbage collection, which
is a luxury c++ can not effort/offer.

Hope this is usefull to you.
Lukas


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Tue Jun 03 2003 - 22:24:51 EEST