AJAX Made Easy - Learn AJAX
AJAX Home ASPNET

Achieve Faster Performance in Content Loading

 Category: ASPNET Add Comment





The Work Around in Content Loading for Faster Performance


It is always a challenge for developers to establish an application wherein all functions should be able to execute not just well but fast. This is even more challenging for Ajax based developers since as an RIA, it has to provide optimum user experience and the only way to do that is to develop an efficient and fast application. That is possible when all functions load up really fast. If one function load less faster than others, it will not perform as expected.


ASP.Net Ajax has provided a smart way of accelerating the speed of content loading. In gist, you can accelerate the speed of content loading when you control each function so that the server could focus on each function. Instead of dividing the server to different functions, this simple trick lets the server focus on a single function and executes faster than the original plan.


To do this, we need to “control” the user control. This could be done by building content and feeding the user control into it. Think of it as an RSS feed only that it uses another command. In ASP.Net this work is eased by a function called LINQ to XML. ListView is also used in this stage so that any manual changes on the HTML of the application could be done easily.


The next stage is to create a “stage” for the user control. The purpose of this is to properly render the whole application as an HTML. This can be done by creating an instance in ASP.Net that is totally independent from the list of functions that you are working on right now.


At this stage, you might think that what we are doing is loading a page from another loaded page. That is actually correct but this pipeline is actually faster compared to letting the server execute them altogether.
Once you are done with the stage, add a loader image to inform not only your user but yourself about the speed of the application. There are thousands of pre-built loaders in the web and you can pick anything that you want. This feature is optional but highly suggested to compare the speed of your technique to the traditional technique.


The last stage is to use JavaScript to weave them all. The empty HTML cannot execute the functions in itself and the user control will never communicate since it does not have any content handler. JavaScript provides this and if you are familiar with JavaScript, the actions that you have to add here are almost minimal. It is recommended to remove the loader as it is just another function that you have to execute.


Since you are executing the function in JavaScript, you will eventually have the server access the functions faster and show the result in the client side more efficiently. The challenge however is to code this function correctly especially in the JavaScript end. But as long as you are familiar with JavaScript especially on content loading, your application will work faster and better at the same time.






Next: ASP.Net Timer vs. UpdatePanel



Post Comment


You need to Login to post your comment...

Click here to login

Title:
 
Comment:



Daily Email Updates

AJAX Updates delivered directly to your Inbox...

Enter your email address:

Latest AJAXwith Updates

Related AJAX Articles

Popular AJAX Articles