"Scott" <sdcoonce@gmail.HEY_YOU.com> wrote in message
news:OKO8QR5wFHA.3720@TK2MSFTNGP14.phx.gbl...[color=blue]
> I used exclusively sql for a long time, so I always used SqlConnection,
> etc... Then I discovered quite a while back the interfaces IDbConnection,
> etc., which changed my entire outlook on db access. It does take some[/color]
extra[color=blue]
> work, sometimes (like when you actually need to instantiate a connection)
> but works so much better and is database "independent" (almost).
>
> Scott
>
> "Steve" <sss@sss.com> wrote in message
> news:%230jLAH5wFHA.720@TK2MSFTNGP15.phx.gbl...[color=green]
> >
> > "Joanna Carter [TeamB]" <joanna@not.for.spam> wrote in message
> > news:O0pUDE5wFHA.908@tk2msftngp13.phx.gbl...[color=darkred]
> >> "Steve" <sss@sss.com> a écrit dans le message de news:
> >> %23vwBox4wFHA.3772@TK2MSFTNGP11.phx.gbl...
> >>
> >> | 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[/color][/color][/color]
a[color=blue][color=green][color=darkred]
> >> | single form application, but I'm not sure where I should be doing my[/color]
> > main[color=darkred]
> >> | 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[/color][/color][/color]
classes[color=blue][color=green][color=darkred]
> >> without any UI at all; using NUnit to buid your test framework. Then[/color][/color][/color]
once[color=blue][color=green][color=darkred]
> >> you have proven that your business classes are "bug-free", you can[/color][/color][/color]
start[color=blue][color=green]
> > to[color=darkred]
> >> think about how you want to display the properties of instances of[/color][/color][/color]
those[color=blue][color=green][color=darkred]
> >> classes.
> >>
> >> Certainly, you should separate you app functionality from you UI; you[/color]
> > might[color=darkred]
> >> 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[/color][/color][/color]
the[color=blue][color=green][color=darkred]
> >> principles are the same.
> >>
> >> Joanna
> >>
> >> --
> >> Joanna Carter [TeamB]
> >> Consultant Software Engineer
> >>
> >>[/color]
> >
> >
> > Thank you for the great response Joanna!
> >
> > I'm glad you mention Data access, I was just designing that (on paper)[/color][/color]
and[color=blue][color=green]
> > will be using MS Access at first, then if all goes well moving to
> > SqlServer,
> > so I figured that a data access class for each provider inheriting a
> > common
> > interface would make the transition smoother in the future. I was also
> > considering the same approach for the UI, currently it's a desktop[/color][/color]
client,[color=blue][color=green]
> > but I would like to offer a web client later.
> >
> > I will check out your links.
> >
> >[/color]
>
>[/color]
Hi Scott,
From what I have read, the IDbConnection is an interface and I futher
understood that interfaces don't have implementation. So can you explain a
bit more how you would use this interface?
Thanks,
Steve