I’m new to web development and for my first project I have a need for 4 cascading drop down menus. Ive been reading as much as I can about the best way to tackle this and there is some discussion about whether to preload these lists or to grab them from my database. Mine is a LAMP project and I have about 5000 items that need to go into these dropdown menus. The discussion I’ve seen states that if you don’t have a large number of dropdown items you are much better off preloading these items and pulling them using javascript. My question is what is considered a large number? With 5000 items am I much better off going the MySQL route? On some level I prefer that but all of the tutorials out there seem to deal with either ASP or preloaded items. So my questions are:
Is 5000 items too many to preload for a dropdown list? What would the cutoff be?
And, do you know of any good tutorials to get me started if MySQL is the way to go. I’ve seen a couple but they are not very detailed and for a newbie I’m getting wrapped around the axle. Thanks so much!
I would look more to the size in kb than how many items. I’m guessing even 5k entries is going to be 1-2kb after gzip, which is generally very little compared to the rest of the external objects a typical webpage loads(compare to the size of images + css + js).
Having to do multiple separate http requests is expensive from a responsiveness standpoint, especially for high latency connections like mobile devices(web autocomplete is generally pretty lame on my phone due to latency).
So anyway, personally I lean heavily towards just loading it all upfront unless the amount of data gets huge, or the chance of the data being used at all is very low.