comments inline...
ARTMIC said:
Hello, does anyone have any opinions on data access functionality ?
What is the best way to use the data access components inside of Visual
Studio?
----You can use the designer and it is probably the fastest way to build
your application. however, there's a big trade off here. For one thing,
you'll be talking directly to the database a scenario which my friend Sahil
Malik refers to as as a "Cowboy" application in his wonderful new book
http://shrinkster.com/9y1 . So is this the 'best' way? It really depends
on how you define 'best' but in most every sense of the word I'd have to
answer NO!
Do we drag and drop the components on the screen and link them to the
database, creating a dataset etc.?
- You can. But you will probably want to create real business objects and
while you can use a dataset as a business object, whether or not you want to
is a different story. Again, I'd point to some of Sahil's wisdom for
guidance
http://codebetter.com/blogs/sahil.malik/archive/2005/06/07/64172.aspx .
Unless your application and table design is very straightforward, using only
the designer for your components probably won't work for you.
Or is it more efficient and faster to create them at runtime?
--Efficient in what sense? If you want to have an application that scales,
almost across the board I'd say NO. Using the designer also has a lot of
other issues that you can work around, but by the time you work around them
you might as well have rolled out your own. For isntance, in a web
application (or winforms for that matter), would you really want to hard
code your connection string inside the application? Of, you can use the
designer and still store this in the config file, but wyould you want to
publish your username and password in plaintext? Probably not. So you'd
encrypt and decrypt them, but then you'd have to put in some custom code and
little by little the 'benefits' of using a pure designer approach would be
diminished . In the same respect, you won't be able to set up an
application server or use remoting right off the bat if you use only the
designer. So these will help you get the app built faster, but it's not
done until it's done (I know, that's a brilliant observation) so it needs to
scale and perform and be secure and all that other jazz before it's really
done, and it's hard for me to imagine a real non-trivial production app that
was built purely with the designer.
Does anyone have any theories on what would allow for faster access to a
database ?
For one thing I'd recommend the data Access Application Block /Enterprise
Library
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/daab.asp
Also, if RAD is a primary goal, I'd look to using an O/R Mapper. Take a
look at LLBLGen Pro
http://www.llblgen.com/defaultgeneric.aspx. Another
fine product is
www.deklarit.com and I've recently come across NJDX by
Software Tree that's a great tool. All of these tools can cut a tremendous
amount of time out of development and if you look at LLBLGenPro for
isntance, Frans Bouma the lead architect on it frequents these newsgroups
and blogs regularly. You wont' find anything but rave reviews about
LLBLGenPro and if you look at their customer list, that's saying a lot.
Anything that has 100% user love is a safe bet. I'd look at the demos each
company has and see which one fits your needs best, they all do things
slightly differently so it's not exactly and apples to apples comparison,
but I feel 100% comfortable recommending any of them to you as I know so
many people that love each of them.