Les:
It's kind of hard to say for sure but let me elaborate. Let's say that I
knew that I had an app and all it had to do was provide a form and a grid
that would allow users to ADD/DELETE/INSERT records, kind of like the grid
view in SQL Server. If I was positive that the underlying structure would
never change, and that the app would never grow etc, I could take all kinds
of shortcuts. I could jsut use a wizard for instance, hard coding the
connectionstring etc. Now, if this app will never grow, I may not really
see any benefit by seperating dataaccess, presentation etc, (assuming that
the app would never change.) However, depending on what you anticipate your
growth to be, you'll probably want to start breaking things up. Pretend
that Stored Procs for instace were had no benefit other than they sit on the
server. Would they still be worth using? Yes. Why? B/c you can change
what they do without interrupting users. You could make modifications
without anyone ever knowing.
The same goes with everythign else. After all, if you had to send the car
back to the factory every time you got a flat tire, that would be obtrusive.
However, if you never got a flat you'd never know the difference.
Alas, "Should all the data-access code exist in the module code" Again, it
depends on your needs, but it will scale better. All shops have their
little 'rules' and we have well close to 100,000 lines of code which is
heavily related to dataaccess and never used a wizard. However, there are
probably many scenarios where they use them extensively and all is well. I
will tell you though that if we used the configuration wizards, it'd be well
advised to take advantage of attributes and config files, otherwise the next
time we changed our DomainController, we'd have an awful lot of finding and
replacing to do.
Hopefully that answer it?
Bill
Les Cardwell said:
Bill,
BTW...
most
instance I wouldn't worry about them. By dragging them on your form, you
are moving your logic to the form. Sure stored process push it back to
another layer, but you can't stick your DataAccess logic in a .dll and run
it remotely if you need to. Once again, if you will never grow, it won't be
that much of a problem, but it could be.
...are you suggesting that all of the data-access code should exist in the
module code (ie- using SQL Helper/MS Data Access Application Blocks - which
is what's suggested by Best Practices ) w/Stored Procs vs. dropping the
DataAdapter/DataSet objects onto the form? I assumed they were essentially
the same...