[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] Programmering i C# - "best practise" ?



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sat, 13 Oct 2007 18:37:19 +0200
"Jesper K. Pedersen" <sslug@sslug> wrote:

> En af de udfordringer jeg også har er at lade min gui ligge i en
> klasse for sig, for hvordan refererer jeg så til objekterne i Glade
> (gui "tegner") softwaren.
> 
Du har vendt problematikken 180 grader:-) Det er i GUI events
håndteres, så derfor er det GUI, der skal have referencer til øvrige
klasser. Har de øvrige klasser brug for en reference til komponenter i
GUI, kan du med sende en reference til de ønskede komponenter i de
andre klassers konstruktør eller i de specifikke metoder.

> Som sagt... Det jeg søger er lidt om "pænest" måde at skrive læsbare
> programmer på. Og jo jeg ved godt at der ikke findes en regel for hvad
> der er "pænest" og mest "læsbar". Men jeg har da set en række gode
> eksempler på vejledning til f.eks. C - men synes ikke helt den kan
> overføres til principperne bag C# som er bundet af den
> objektorienterede struktur.
> 
Du kan ikke splitte klasser op i flere filer. Er grunden til dit ønske,
at du har fået for komplekse klasser, bunder det i en designmæssig
fejl. En tommelfinger regel er, at en klasse højest må fylde 2-3 A4
sider kode, så hvis dine klasser fylder mere, må du opsplitte dem via
agregering eller komposition.

- -- 
Hilsen/Regards
Michael Rasmussen
http://keyserver.veridis.com:11371/pks/lookup?op=get&search=0xE3E80917
A computer is like air conditioning: it becomes useless when you open
windows.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHEP1/VErYVePoCRcRAqclAJ0ZX9aNSvmXcly7hxm8OVTiIS+3pgCfdlZr
l6GRbmAi2XoDyWGmpLhVNcA=
=enzx
-----END PGP SIGNATURE-----


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2007-11-01, 02:01 CET [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *