[Mono-docs-list] Re: [Gtk-sharp-list] MonkeyGuide?: Hello World in GNOME.NET - Second Draft

Charles Iliya Krempeaux charles@reptile.ca
16 Feb 2003 11:11:01 -0800


Hello,

On Sat, 2003-02-15 at 23:10, Mike Kestner wrote:

[...]


> Now for the comments. First a general comment.  If you try to do a "this
> is how to write object-oriented programs by splitting things up into
> classes and separate files" type of document, you're going to end up
> with a monstrously long document that anyone who's read a C# or Java
> book is going to find redundant.
> 
> That said, here's my back-seat driver, "this is how I would structure
> this document if I were writing it" feedback. :)
> 
> First Pass:  just like your first try.  Focus on Programs and App
> windows.  That's a nice high level overview of the main loop and the
> toplevel window for a GNOME.Net app.
> 
> Second pass:  I would combine your second and third try apps into one,
> but restructure it as displayed in the attached file.

Ya... that sounds like a good idea.


> Things to highlight would be the subclassing of Gnome.App, which is a
> more meaningful example in that it implements the DeleteEvent handler on
> the Object that exposes DeleteEvent. Obviously, the implementation of
> DeleteEventHandler, and the handling of the RetVal in delete_event are
> other points of focus.  
> 
> I don't think anything is really gained by subclassing Gnome.Program.
> The only reason I can think of to subclass Program in an application
> would be to add complex or lengthy argument handling.

I disagree.  IMO, this is the way a GNOME application should be created.
(I.e., all GNOME applications should subclass Gnome.Program.)

The reason I think this is the case is so that you can use polymorphism,
and have your Main() procedure, or whatever, be untouched by any
change in your GNOME UI.

*cough* *cough*  That's why I created that patch for 
"gnome/Program.custom".  That way I could "override" the Run()
method, and do even more polymorphism.  (It seems stupid that
I have to create a new method called run() to take the place
of Run().)

I know it probably comes down to a matter of style.  But I think
the reader should get exposed to this style too.  (And then they
can choose.)

What I could probably do is put the "fourth try" and "fifth try"
in a separate tutorial.  (That's actually what I was thinking
originally.)

That way the reader could still learn about this.  While the first
tutorial would only contain the very basics.

What do you think??


> 4th and 5th tries as I indicated above would go away, since they aren't
> really specific to programming in GNOME.Net. If you wanted to go beyond
> the second pass example, I would suggest doing something like packing an
> Entry, Label, and Button into an App window such that when the button is
> clicked, the Label is updated to: "Hello <contents of Entry>, welcome to
> GNOME.Net.  That's not really GNOME specific though, and is probably
> better suited for an extended Gtk# example.

Putting stuff inside the GNOME Application Window is something I'm 
planning for a future separate tutorial.  (I wanted a separate tutorial
that would focus on the .Contents attribute.)

I want each tutorial to take very simple steps.  That way a beginner
programmer could get started with GNOME.NET.  (And not just someone
who is simply a beginner at Gtk#.)


See ya

-- 
     Charles Iliya Krempeaux, BSc
     charles@reptile.ca

________________________________________________________________________
 Reptile Consulting & Services    604-REPTILE    http://www.reptile.ca/