Wrox Programmer Forums
|
ASP Pro Code Clinic As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Pro Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 8th, 2004, 10:02 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default Folder Tree - ASP vs JS ??

Hello

I am currently weighing up the efficiency (or lack of?) building a folder tree type feature purely in ASP
Had anybody done this?
Is any body laughing at the idea? (if so, how hard?)

Why in ASP
My JS is average and I least enjoy passing values between the two.
All the items in the tree are managed and will come from three tables

It is an events search on a calendar system, a three tier (groups, subgroups and categories) hyperlinked event picker. Based on your pick all events relating to your chosen group show. Javascript is shinning as the pages are gong into a SOE so browser versions etc are not an issue.

OK that’s a bit of bg/info I want to implement a recursive style ASP menu system to do this job, what’s your thoughts on EVERY time a group is clicked/expanded a trip to their server is necessary? The client is 'web savy' and expects efficient code, system documentation has to state technologies and techniques used - How much more in efficient is this method over the usual:
get records, create client side array(s), build structure

Looking forward to your thoughts, thanking you


Wind is your friend
Matt
__________________
Wind is your friend
Matt
 
Old August 8th, 2004, 10:32 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Matt,
Quote:
quote:what’s your thoughts on EVERY time a group is clicked/expanded a trip to their server is necessary?
I am not sure if "THEIR server" here means the DB server(may be hosted at thier end). IMO, it is necessary because, as being said it is of three levels, and you will have to query the db for what is being clicked to get that related list displayed. You cannot store all that in arrays on the client system and query upon that. If that can be still stored into arrays, it is like storing all 3 tables' entire data into arrays. Now how would one query from array based on what is being clicked and one will have to maintain relations ship between them too.

For instance, you could have observed that in the p2p.wrox default page, where categories are displayed with a "+" and on click on any of those, it gets expanded after being queried (ofcourse from DB, I believe) based on that value.

Hope that helps.
Cheers!

_________________________
- Vijay G
Strive for Perfection
 
Old August 9th, 2004, 12:59 AM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

happygv

Hello and good day. I guess I had made an assumption that folder tree like code was better done as client side as possible. Thinking about it, what I am going to build could be called hierarchal navigation. Also, I guess to have a managed menu will be a nice tool.

Since I didn’t get a 'do it with JS' I will push on and ASP it. As I said this client likes to get as many km's to the gallon as possible. In your opinion, If this category tree was to grow considerably (unsure if this is the case) when does it become exhaustive running back and forward to the database every time a category is clicked?

Q: Would you suggest:
We have ten main categories, each of these categories had 50 sub categories. When the user clicks a category a query pulls 50 records (each time a category is clicked)
OR
Vs 10 Arrays each holding the sub category contents

Cheers


Wind is your friend
Matt
 
Old August 9th, 2004, 03:29 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Matt,

IMHO it depends on the size of the tree & what you can get away with on the client side.

I had to so something with large trees, but the client mandated use of IE, so I was able to build part of the tree & send it to the client, then use xmlhttp (mozilla has an equivalent technology) to get sections of it when required, removing the need to re-build the whole tree with each click & resulting in a far more responsive page.

Best regards,

Chris

 
Old August 10th, 2004, 01:45 AM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

Yes xml was my initial thought and may still be the way to go for managing and portability. I have been looking 'whats out there' and found an extermly nice version including a good to go CMS for the items (as many levels deep as you want)
http://www.Planet-Source-Code.com/vb...=7690&lngWId=4

Wind is your friend
Matt





Similar Threads
Thread Thread Starter Forum Replies Last Post
Using js file in ASP.NET ndr1977 BOOK: ASP.NET Website Programming Problem-Design-Solution 1 October 26th, 2006 04:57 AM
How to display tree view in asp. rupen Classic ASP Basics 2 July 14th, 2005 04:23 AM
asp inside js crmpicco Classic ASP Basics 2 July 6th, 2005 09:49 PM
JS/ASP watch mega Javascript 5 April 29th, 2004 03:03 PM
Need help in creating folder tree velmj XSLT 1 November 19th, 2003 06:28 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.