New To Dolphin (and MVP)

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

New To Dolphin (and MVP)

Tim Krieg-2
Hello,
I've downloaded Dolphin and installed it today to start looking at it.  I've
been using VSE with WindowBuilder for the past 6 years.  I wanted to get my
feet wet with Dolphin by creating a simple UI that would capture text then
add it to a list box.  I want to simply have this test window app just be
able to have a user enter text in a text entry widget, click an 'Add'
button, then move that text to a list box.

I did manage to get to the View Composer.  I then created a new instance(?)
of ShellView that I named 'Test Window'.  On my test window I added a
TextEntry widget(presenter?), a button, and a list box.  I then saved my
TestWindow.  I guess I'm not sure where it's saved.  It didn't create a
class called TestWindow like I was expecting, but it created another
instance of ShellView?

I executed "ShellView allInstances" and found my new window.  I guess I'm
not sure where to write my methods.  I really think my problem is my lack of
understanding of the MVP.  For instance, with WindowBuilder I would plop out
a new instance of ViewManager then start dragging out widgets.  I then would
save my new window as a subclass of ViewManager.  I would then register the
widget events and the methods they would call (button when: #clicked send:
#addItem to: self).  I could then go to my browser and find the #addItem
method in my new window class and start coding the behavior.

I'm not sure how all of that works in Dolphin.  Where do I register events
for the widgets?  Where do I write methods for the windows that get created?

If someone out there could kindly point me in the right direction, that
would be great.  Dolphin looks like a great product, and I can hardly wait
until I feel more comfortable with it.  Any help speeding up this process
would be very much appreciated.

Thanks in advance!

Tim Krieg


Reply | Threaded
Open this post in threaded view
|

Re: New To Dolphin (and MVP)

Steve Zara
"Tim Krieg" <[hidden email]> writes:

>Hello,
>I've downloaded Dolphin and installed it today to start looking at it.  I've
>been using VSE with WindowBuilder for the past 6 years.  I wanted to get my
>feet wet with Dolphin by creating a simple UI that would capture text then
>add it to a list box.  I want to simply have this test window app just be
>able to have a user enter text in a text entry widget, click an 'Add'
>button, then move that text to a list box.
>
>I did manage to get to the View Composer.  I then created a new instance(?)
>of ShellView that I named 'Test Window'.  On my test window I added a
>TextEntry widget(presenter?), a button, and a list box.  I then saved my
>TestWindow.  I guess I'm not sure where it's saved.  It didn't create a
>class called TestWindow like I was expecting, but it created another
>instance of ShellView?
>
>I executed "ShellView allInstances" and found my new window.  I guess I'm
>not sure where to write my methods.  I really think my problem is my lack of
>understanding of the MVP.  For instance, with WindowBuilder I would plop out
>a new instance of ViewManager then start dragging out widgets.  I then would
>save my new window as a subclass of ViewManager.  I would then register the
>widget events and the methods they would call (button when: #clicked send:
>#addItem to: self).  I could then go to my browser and find the #addItem
>method in my new window class and start coding the behavior.
>
>I'm not sure how all of that works in Dolphin.  Where do I register events
>for the widgets?  Where do I write methods for the windows that get created?
>
>If someone out there could kindly point me in the right direction, that
>would be great.  Dolphin looks like a great product, and I can hardly wait
>until I feel more comfortable with it.  Any help speeding up this process
>would be very much appreciated.
>
>Thanks in advance!
>
>Tim Krieg
>

I'm now seriously into Dolphin coding, but I miss the simplicity of the
old Smalltalk/V 286 stuff I used years ago.  I am not really happy with
the way that views and presenters are combined in Dolphin using resources.  I
much preferred explicit code to define and place views.  In Smalltalk/V,
when you created a sub-view, you specifed all of its properties, its
events, and its placing on the parent view in one section of code; there
was note of this separate 'createComponents' and 'createSchematicWiring'
stuff as in Dolphin.  The Smalltalk/V technique was verbose, but very
easy to code and understand, and made dynamic addition of views very
easy (this seems to be a frequent question about Dolphin).

Steve Zara
>


Reply | Threaded
Open this post in threaded view
|

Re: New To Dolphin (and MVP)

Jeffrey Odell-2
In reply to this post by Tim Krieg-2
I would suggest you stick with it.  I still code Smalltalk today, coming
from Smalltalk/V 286, Digitalk VSE/WindowBuilder and now with IBM Smalltalk.
I found it a bit of a curve as none of these environments do the explicit
MVC that VW does, or a (somewhat?) derivative MVP that Dolphin does.  I
suspect users coming over from VW would feel more confident with Dolphin
initially.

When I first ported SUnit browser (http://www.odellsoft.com/sunitbrowser) I
took a bit to get going.  Once I fell in to the design patterns used in MVP,
I really liked it.

I would suggest:

http://www.object-arts.com/EducationCentre/Tutorials/CreatingAnApplication.h
tm

or the expanded tutorial in:

http://www.sirius.com/~lsumberg/PersonalMoney/

as good starting places.

jlo

"Tim Krieg" <[hidden email]> wrote in message
news:Gyt_6.497$[hidden email]...
> Hello,
> I've downloaded Dolphin and installed it today to start looking at it.
I've
> been using VSE with WindowBuilder for the past 6 years.  I wanted to get
my
> feet wet with Dolphin by creating a simple UI that would capture text then
> add it to a list box.  I want to simply have this test window app just be
> able to have a user enter text in a text entry widget, click an 'Add'
> button, then move that text to a list box.
>
> I did manage to get to the View Composer.  I then created a new
instance(?)
> of ShellView that I named 'Test Window'.  On my test window I added a
> TextEntry widget(presenter?), a button, and a list box.  I then saved my
> TestWindow.  I guess I'm not sure where it's saved.  It didn't create a
> class called TestWindow like I was expecting, but it created another
> instance of ShellView?
>
> I executed "ShellView allInstances" and found my new window.  I guess I'm
> not sure where to write my methods.  I really think my problem is my lack
of
> understanding of the MVP.  For instance, with WindowBuilder I would plop
out
> a new instance of ViewManager then start dragging out widgets.  I then
would
> save my new window as a subclass of ViewManager.  I would then register
the
> widget events and the methods they would call (button when: #clicked send:
> #addItem to: self).  I could then go to my browser and find the #addItem
> method in my new window class and start coding the behavior.
>
> I'm not sure how all of that works in Dolphin.  Where do I register events
> for the widgets?  Where do I write methods for the windows that get
created?

>
> If someone out there could kindly point me in the right direction, that
> would be great.  Dolphin looks like a great product, and I can hardly wait
> until I feel more comfortable with it.  Any help speeding up this process
> would be very much appreciated.
>
> Thanks in advance!
>
> Tim Krieg
>
>


Reply | Threaded
Open this post in threaded view
|

Re: New To Dolphin (and MVP)

Ian Bartholomew-4
In reply to this post by Tim Krieg-2
Tim,

I am someone else who started out with ST/V back in the late eighties and
used it for 10 years or so. It's a bit hazy now but I certainly don't recall
WindowBuilder being that much easier than Dolphin, once I got used to it at
least. Like you I recall being very confused about the location of the code
that builds the Windows but, now I have got used to (and like) the
ViewComposer, it's not something I think about.

Perhaps Dolphins UI creation should be called "PresenterBuilder" or "MVP
Builder"- it might cause a bit less confusion <g>

> If someone out there could kindly point me in the right direction, that
> would be great.  Dolphin looks like a great product, and I can hardly wait
> until I feel more comfortable with it.  Any help speeding up this process
> would be very much appreciated.

If the two links that Jeffrey suggested aren't enough then I can do a
step-by-step for the application you describe but I'll need to know the
version of Dolphin that you have. The procedure in D4 is different to D2
(the freely downloadable version).

Ian


Reply | Threaded
Open this post in threaded view
|

Re: New To Dolphin (and MVP)

Tim Krieg-2
In reply to this post by Jeffrey Odell-2
Thanks, Jeffrey.  I just briefly browsed these links, but I think they're
going to help me get a better understanding.  I'm going to start playing
some more, but this time I'm going to try to use the MVP - not ignore it!

Thanks again,
Tim Krieg

"Jeffrey Odell" <[hidden email]> wrote in message
news:3b3ad94b$[hidden email]...
> I would suggest you stick with it.  I still code Smalltalk today, coming
> from Smalltalk/V 286, Digitalk VSE/WindowBuilder and now with IBM
Smalltalk.
> I found it a bit of a curve as none of these environments do the explicit
> MVC that VW does, or a (somewhat?) derivative MVP that Dolphin does.  I
> suspect users coming over from VW would feel more confident with Dolphin
> initially.
>
> When I first ported SUnit browser (http://www.odellsoft.com/sunitbrowser)
I
> took a bit to get going.  Once I fell in to the design patterns used in
MVP,
> I really liked it.
>
> I would suggest:
>
>
http://www.object-arts.com/EducationCentre/Tutorials/CreatingAnApplication.h

> tm
>
> or the expanded tutorial in:
>
> http://www.sirius.com/~lsumberg/PersonalMoney/
>
> as good starting places.
>
> jlo
>
> "Tim Krieg" <[hidden email]> wrote in message
> news:Gyt_6.497$[hidden email]...
> > Hello,
> > I've downloaded Dolphin and installed it today to start looking at it.
> I've
> > been using VSE with WindowBuilder for the past 6 years.  I wanted to get
> my
> > feet wet with Dolphin by creating a simple UI that would capture text
then
> > add it to a list box.  I want to simply have this test window app just
be

> > able to have a user enter text in a text entry widget, click an 'Add'
> > button, then move that text to a list box.
> >
> > I did manage to get to the View Composer.  I then created a new
> instance(?)
> > of ShellView that I named 'Test Window'.  On my test window I added a
> > TextEntry widget(presenter?), a button, and a list box.  I then saved my
> > TestWindow.  I guess I'm not sure where it's saved.  It didn't create a
> > class called TestWindow like I was expecting, but it created another
> > instance of ShellView?
> >
> > I executed "ShellView allInstances" and found my new window.  I guess
I'm
> > not sure where to write my methods.  I really think my problem is my
lack
> of
> > understanding of the MVP.  For instance, with WindowBuilder I would plop
> out
> > a new instance of ViewManager then start dragging out widgets.  I then
> would
> > save my new window as a subclass of ViewManager.  I would then register
> the
> > widget events and the methods they would call (button when: #clicked
send:
> > #addItem to: self).  I could then go to my browser and find the #addItem
> > method in my new window class and start coding the behavior.
> >
> > I'm not sure how all of that works in Dolphin.  Where do I register
events
> > for the widgets?  Where do I write methods for the windows that get
> created?
> >
> > If someone out there could kindly point me in the right direction, that
> > would be great.  Dolphin looks like a great product, and I can hardly
wait
> > until I feel more comfortable with it.  Any help speeding up this
process
> > would be very much appreciated.
> >
> > Thanks in advance!
> >
> > Tim Krieg
> >
> >
>
>


Reply | Threaded
Open this post in threaded view
|

Re: New To Dolphin (and MVP)

Jeffrey Odell-2
You can sort of think of the presenter subclass as the class WB generates
when you create a form (can't think of the name of it anymore! It is
WbApplication in IBM Smalltalk).  However, the actual form design is encoded
in view(s) attached to that class, and you can have several, rather that
just one method on the class that generates one view.   An the views are
instances, not code that create instances (I think... I'm not sure here).
This is disconcerting if you are used to the WB way.

That might help get you started -

jlo

"Tim Krieg" <[hidden email]> wrote in message
news:PgI_6.47$[hidden email]...

> Thanks, Jeffrey.  I just briefly browsed these links, but I think they're
> going to help me get a better understanding.  I'm going to start playing
> some more, but this time I'm going to try to use the MVP - not ignore it!
>
> Thanks again,
> Tim Krieg
>
> "Jeffrey Odell" <[hidden email]> wrote in message
> news:3b3ad94b$[hidden email]...
> > I would suggest you stick with it.  I still code Smalltalk today, coming
> > from Smalltalk/V 286, Digitalk VSE/WindowBuilder and now with IBM
> Smalltalk.
> > I found it a bit of a curve as none of these environments do the
explicit
> > MVC that VW does, or a (somewhat?) derivative MVP that Dolphin does.  I
> > suspect users coming over from VW would feel more confident with Dolphin
> > initially.
> >
> > When I first ported SUnit browser
(http://www.odellsoft.com/sunitbrowser)
> I
> > took a bit to get going.  Once I fell in to the design patterns used in
> MVP,
> > I really liked it.
> >
> > I would suggest:
> >
> >
>
http://www.object-arts.com/EducationCentre/Tutorials/CreatingAnApplication.h

> > tm
> >
> > or the expanded tutorial in:
> >
> > http://www.sirius.com/~lsumberg/PersonalMoney/
> >
> > as good starting places.
> >
> > jlo
> >
> > "Tim Krieg" <[hidden email]> wrote in message
> > news:Gyt_6.497$[hidden email]...
> > > Hello,
> > > I've downloaded Dolphin and installed it today to start looking at it.
> > I've
> > > been using VSE with WindowBuilder for the past 6 years.  I wanted to
get

> > my
> > > feet wet with Dolphin by creating a simple UI that would capture text
> then
> > > add it to a list box.  I want to simply have this test window app just
> be
> > > able to have a user enter text in a text entry widget, click an 'Add'
> > > button, then move that text to a list box.
> > >
> > > I did manage to get to the View Composer.  I then created a new
> > instance(?)
> > > of ShellView that I named 'Test Window'.  On my test window I added a
> > > TextEntry widget(presenter?), a button, and a list box.  I then saved
my
> > > TestWindow.  I guess I'm not sure where it's saved.  It didn't create
a
> > > class called TestWindow like I was expecting, but it created another
> > > instance of ShellView?
> > >
> > > I executed "ShellView allInstances" and found my new window.  I guess
> I'm
> > > not sure where to write my methods.  I really think my problem is my
> lack
> > of
> > > understanding of the MVP.  For instance, with WindowBuilder I would
plop
> > out
> > > a new instance of ViewManager then start dragging out widgets.  I then
> > would
> > > save my new window as a subclass of ViewManager.  I would then
register
> > the
> > > widget events and the methods they would call (button when: #clicked
> send:
> > > #addItem to: self).  I could then go to my browser and find the
#addItem
> > > method in my new window class and start coding the behavior.
> > >
> > > I'm not sure how all of that works in Dolphin.  Where do I register
> events
> > > for the widgets?  Where do I write methods for the windows that get
> > created?
> > >
> > > If someone out there could kindly point me in the right direction,
that

> > > would be great.  Dolphin looks like a great product, and I can hardly
> wait
> > > until I feel more comfortable with it.  Any help speeding up this
> process
> > > would be very much appreciated.
> > >
> > > Thanks in advance!
> > >
> > > Tim Krieg
> > >
> > >
> >
> >
>
>