Currently I am dealing with a web application which uses a txt file as a database for testing for now. But we will connect it to a server later on.
My question is, if there is a more efficient way to get my objects than the way I am using now.
During the page_init I am getting all my objects into a Collection as List-<-TravelP->-, then I am populating the ajax toolkit accordion objects in the page with that. They are also firing some server side events of some hidden buttons.
I have some client side buttons which fires callbacks for getting some other objects to populate the accordions in an update panel.
And I am using .net Collections too much like dictionary and list, I am wondering if using arrays is more efficient.
Could you advise me about how to make this site better and faster ?
Is it better or possible to initialize those TravelP objects in javascript at the beginning and use it like that ?
Any comments would be greatly appreciated,
Thanks
First of all, I’d loose the UpdatePanels. If performance is what you’re after, forget about UpdatePanels.
Instead, you can write ScriptService web services (in C#) and call them from your JavaScript code. These special web services can return .NET objects which then, can be used in JavaScript code (make sure they are serializable though. Otherwise you’ll need to write your own JavaScript serializer).
I’d start with that. Doing so will give you the initial performance boost. Afterwards you can think of more to do to enhance your code.