Very Simple Class Category browser

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Very Simple Class Category browser

Syver Enstad-6
Hi!

I've attached a .pac file for a simplistic Class Category
browser. Unfortunately it is for Dolphin 4, (I've not been able to
shell out the money for version 5 yet).  I mostly made this to learn
more about Dolpin, I find ClassCategory browsing to be a good way to
get an overview of the image, and learn MVP at the same time (by
programming the browser). I am beginning to feel that I am making some
progress because the views synchronize with each other by mostly
listening to the model + some mediating from the top presenter (which
is what MVC/MVP is about). Criticism from someone more adept at
MVP'ing, Smalltalk and Dolphin is very welcome.

Someone asked for input on what newbies found difficult about MVP. I
can only speak for myself, but I've been (am) quite confused about
where messages are coming from, who sends what messages and so on. Add
trigger: and when:send:to: to that and it will make a poor soul (me)
very confused as to what happens and where one should hook in. What
happens automatically and what does not. I found that it started to
click when I read MVP night school (a most excellent tutorial) some
days ago after having fiddled around with Dolphin on and off (mostly
off) since about 2000.

I think I needed to understand separately:

The event framework

The concept of a presenter as an abstract GUI. You mostly don't care about
the views. They are just eyecandy and configuration.

The value model framework and the way the various component presenters
depend on this.

I still don't understand how the views and presenters really work
together but have sort of accepted that it just works if I do the
right thing with my model and use the ViewComposer.

Comments about the code:
The ChoicePresenter is fabulous, switching from ListPresenter to
ChoicePresenter made an awful lot of code go away.

I've made a little ChoicePresenter subclass
TreeChoicePresenter to be able to display with a TreeView and use a TreeModel
for the choices.


ClassCategoryBrowser.pac (23K) Download Attachment