Question

I am currently working on a n-tier (3 tiers) ASP.NET web application with the .NET 3.5 framework.

I would like to know how to load the data in a list control and drop-down list in the fastest way possible utilizing 'best practices' for n-Tier applicaqtions.

What are the best practices using latest and feasible technologies (ASP.NET MVC, Entity Framework, Telerik Combobox for the UI, AJAX, etc.)?

Was it helpful?

Solution

"The fastest way"? Load your database into local memory and write some optimized assembly code to fetch it.

Seriously though. Your question is very broad, it's like asking "what's the fastest way to build a house". Well... we need a lot more information. What kind of house? What kind of windows? What's the land like?

There are dozens of DAL's, "feasible technologies", and frameworks. Any combination of them is likely to give you what you need. Until you actually set down specific requirements, it's going to be pretty difficult to understand what you're looking for.

OTHER TIPS

What womp said. That and the "fastest" way is to not push a lot of data to the client but rather minimize what goes down the wire.

Build the list & dropdown control on the client with AJAX.

  1. Load data into cached memory on application start
  2. Client makes a JSON request for data to load into the controls
  3. JSON object is created on the server with data taken from the cache and sent back to the client
  4. On the client, iterate over the returned JSON object and and add DOM elements to the list & dropdown control

Assuming the choices on the drop-down lists are known at the time the page is rendered, I would use this strategy:

  1. Favor just rendering plain old OPTION tags.
  2. If that slows down the page load too much, use AJAX that is triggered immediately upon page load (set the controls as disabled until populated) so the rest of the form can render.
  3. If that is still too slow, or too unwieldy, use an AJAX auto-complete field.

For (1) or (2) above, if the list of choices is static, I would suggest storing the option list on the server in the Application cache as an HTML string, built by StringBuilder when it has not been created yet or needs to be updated.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top