"Steve" <(E-Mail Removed)> a écrit dans le message de news:
%(E-Mail Removed)...
| As a rule of thumb, is it good practice to abstract application
| functionality from the form code behind in a c# winforms app? I have a
| single form application, but I'm not sure where I should be doing my main
| processing, if I should be working with the Form class instance or
creating
| an "engine" class and doing everything there? Are there any general
| guidelines?
You are heading in a very good direction here :-)
In theory, you should be able to build and test all your business classes
without any UI at all; using NUnit to buid your test framework. Then once
you have proven that your business classes are "bug-free", you can start to
think about how you want to display the properties of instances of those
classes.
Certainly, you should separate you app functionality from you UI; you might
also consider separating your app functionality from your database
connectivity; see some articles on OPFs (Object Persistence Frameworks) on
my website
www.carterconsulting.org.uk they are targetting Delphi but the
principles are the same.
Joanna
--
Joanna Carter [TeamB]
Consultant Software Engineer