Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Performance / October 2004

Tip: Looking for answers? Try searching our database.

Best way - Dataset+cache or XML+cache or javascript ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
readytohelp - 21 Oct 2004 14:56 GMT
I am trying to find the most efficient method for designing. We have
several pages with dependent dropdowns. Currently what we do is
whenever user selects item in one dropdown then we go to the database
to re-populate the values in the second and third dropdown. And when
user selects the second dropdown re-populate the third one by going to
the database again. Obviously this is not the efficient way. So I
decided to re-code that. I found out the following alternatives:
1. Store all the data of the three dropdowns into three dataset which
is further stored in the cache. This is done only once when the
webserver is started since the data to be shown in the dropdown is
just readonly. Bind the first dropdown to the first dataset. Whenever
user selects any item the first dropdown filter the second dataset
that is in the cache and show the corresponding data in the second
dropdown. and so on
2. do as above but store in the cache three xmlDataDocument objects
instead of dataset and use xpath to get the corresponding data.
3. Use client side javascript and xml just as in this example.
http://www.codeproject.com/aspnet/masterdetailddl.asp
This solution works on Netscape 6.0+ and IF 5.0+ which is fine.

The data in the dropdown is very less i.e. about 10 in the first 25 in
the second and 60 in the last
I did some tests myself and found that the 2nd one took the shortest
time.
Does anybody know of any other way or have any comments.

I am thinking of sessions also, but since this data is going to be the
same for all the users doesn't make sense in terms of scalability.
David Browne - 21 Oct 2004 15:21 GMT
>I am trying to find the most efficient method for designing. We have
> several pages with dependent dropdowns. Currently what we do is
[quoted text clipped - 15 lines]
> http://www.codeproject.com/aspnet/masterdetailddl.asp
> This solution works on Netscape 6.0+ and IF 5.0+ which is fine.

Option 1 easier, and should also be faster.
Have you established keys and relationships among the DataTables in the
DataSet?

David
readytohelp - 21 Oct 2004 16:13 GMT
Thanx David.
Yes after putting the relationship I found that they are much faster.
Any comments on the third point doing a client side one. It looks more
attractive since it does not make a trip to the server. I know there are
ways like remote scripting and webservices to access client side code
and have tried to test with those doesnt look bad.
Sachin
readytohelp - 21 Oct 2004 19:38 GMT
Thanx David.
Yes after putting the relationship I found that they are much faster.
Any comments on the third point doing a client side one. It looks more
attractive since it does not make a trip to the server. I know there are
ways like remote scripting and webservices to access client side code
and have tried to test with those doesnt look bad.
Sachin

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.