Re: Forms and UserControls, New to C#

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Tom Dacon (tdacon_at_community.nospam)
Date: 07/30/04


Date: Thu, 29 Jul 2004 21:21:59 -0700

You might look around for a good text on the principles of object-oriented
design. This isn't really a language issue - the principles apply to VB just
as firmly as they apply to C# or C++ or SmallTalk or any other
object-oriented language. In fact, if you were to do a search for such a
book, I'd look for something that didn't concentrate on a single language so
much as it emphasized the language-independent principles.

Sorry I don't have a specific recommendation. I've been doing this for so
long that the primary references I used when I was integrating these
principles are kind of dated now.

I will say, however, that Microsoft's MSDN library and the sample code that
you find there are not necessarily the best examples of good object-oriented
design that you'll come across. So don't take what you find there as gospel.

Best of luck,
Tom Dacon
Dacon Software Consulting

"Johnny Fugazzi" <abillmeier@ldmkusa.com> wrote in message
news:OQCuC9adEHA.720@TK2MSFTNGP11.phx.gbl...
> Sounds like it makes sense.
> Do you have a good reference or place for information to look into this?
> Like I mentioned, I am new to using C# in a windowsForms environment. I
> have mostly worked with vb.net in asp.net environments in the past.
>
>
> "Tom Dacon" <tdacon@community.nospam> wrote in message
> news:%230JhZ4adEHA.3616@TK2MSFTNGP10.phx.gbl...
> > A good principle for questions like this is that of loose-coupling. It's
> > generally a good idea for a user control to know little or nothing about
> > where it's sited. Better, I think, to raise custom events to the owner
> when
> > something interesting happens, and let the owner take whatever action is
> > appropriate, such as updating the contents of other controls on the
form.
> > This gives you the freedom of making changes to the form without having
to
> > modify the user control's code, and lets the parent form encapsulate all
> > information about its logic and behavior.
> >
> > HTH,
> > Tom Dacon
> > Dacon Software Consulting
> >
> > "Johnny Fugazzi" <abillmeier@ldmkusa.com> wrote in message
> > news:uanKZsadEHA.3632@TK2MSFTNGP11.phx.gbl...
> > > I am working on a basic windows for App using c# and vs.net2003.
> > >
> > > I have a usercontrol containing a treeview, and I need to display
things
> > on
> > > he main form based on the item selected in the treeview. What is the
> > > bestway to reference the panel (or other controls) on the main form
from
> > the
> > > UserControl?
> > >
> > >
> > >
> >
> >
>
>



Relevant Pages

  • Re: (OT) Learning C (in order to patch nethack, so not entirely OT after all)
    ... What if they know no suitable language to program OO in? ... > implement in parallel what you design, ... What I meant is that C++ is not very good programming language to use describing OO principles as it has many functional features, but if you know OO principles C++ is very powerfull programming language to use. ...
    (rec.games.roguelike.nethack)
  • Re: Defining symbolic AI, what it really is and what its not?
    ... symbolic AI principles don't allow much intelligence, ... thinking machine or a knowledge machine that stores or manipulates ... knowledge in ways similar to how humans use and manipulate language. ...
    (comp.ai.philosophy)
  • Re: Armenian, Sumerian, Burushaski, and Turkic languages
    ... out any principles, ... (by specialists in the various language families) ... part of my "Encyclopedic dictionary of linguistics" ...
    (sci.lang)
  • Language is innate?
    ... Chomsky has asserted that Language is innate. ... he resorts to the universal principles of human language. ... Binding is a universal principle. ...
    (sci.lang)
  • Re: OOA?
    ... If the model is somehow executable, then the language is ... the model is *expressed* in an OOPL ... OO principles can only be applied in the context of an OO language. ... model that is fit for C++ and expect it to be fit for Smalltalk. ...
    (comp.object)