Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Data Source - Right for the application?

Status
Not open for further replies.

bigfoot

Programmer
May 4, 1999
1,779
US
I recently took over a project where the original developer quickly created a web page with some display input capabilities. this is a ASP.NET using VB site.
I have no reason to convert this to C# since they both compile the same code.

He/She had a screen that served as a registration section of the site. I'm not sure how high traffic this site will be so I wanted to get some other opinions as to how to approach this.

The back end is a SQL Server database and it's connected to the page through a SQL Data Source (SDS) that is used as a data source to a DetailsView control.

The DetailsView control is broken down into Template Fields that have labels and textboxes. Nice. I'd have done that too.

Simple and quick. It works great all the time.
But after thinking about it and what I have learned by reading other articles and posting here, the SDS may not be the best solution for my client's website.

Do I want to get rid of the SDS and write a data class on the back end to handle the get and put to the database? Is it worth the effort?
As the users of the app get more and more, I don't want any problems with the site.

Thanks for all the help.






 
Do I want to get rid of the SDS and write a data class on the back end to handle the get and put to the database? Is it worth the effort?
Datasource controls are terrible for a number of reasons.
1. not debuggable
2. not testable
3. presentation has knowledge of database.

I would swap out the data source controls for services which do the real work. Do not roll your own data access framework. this is a solved problem. I prefer NHibernate, ActiveRecord is another great option for data access. There is also WilsonORMapper and if you have some dollars LLBL Gen Pro is also an established ORM tool.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Thanks for the write back. I think you showed me NHibernate & ActiveRecord before but I dismissed using them because they needed a C# project and I wasn't able to take the time to learn it.

I'm a bit more fluent in C# but this project is still VB. Any good choices that are free?

Sorry if I sound like noob. :)
 
Just to add. I can purchase a solution like LLBL Gen Pro, and roll the price into the job.

Reading LLBL Gen Pro now...
 
It doesn't matter that the code is written in C# or VB. it's a .net assembly. LLBL is written in c# as well. once it's compiled to an assembly it doesn't matter.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top