I am in the process of converting a fat client application to ASP.NET. The executable is written in VB and it makes extensive use of VB collections. I want to offload some of the processing onto the client using Javascript but am not aware of the approved
method to mimiic VB collection functionality. Is there a Javascript equivalent to collections? Am I restricted to converting the collection classes to arrays or is there a better way of handling key lookups in Javascript?
I was also thinking of using XMLDOM but I am concerned with the amount of time required to parse DOM objects.
What would you gurus suggest I use in Javascript to implement a pseudo-collection type?
ericweller
Member
1 Points
4 Posts
Javascript and VB Collections
Feb 16, 2012 06:35 PM|LINK
Hello all,
I am in the process of converting a fat client application to ASP.NET. The executable is written in VB and it makes extensive use of VB collections. I want to offload some of the processing onto the client using Javascript but am not aware of the approved method to mimiic VB collection functionality. Is there a Javascript equivalent to collections? Am I restricted to converting the collection classes to arrays or is there a better way of handling key lookups in Javascript?
I was also thinking of using XMLDOM but I am concerned with the amount of time required to parse DOM objects.
What would you gurus suggest I use in Javascript to implement a pseudo-collection type?
Thanks in advance!
Jonelle
Member
404 Points
62 Posts
Re: Javascript and VB Collections
Feb 19, 2012 08:24 AM|LINK
My favourite is Backbone.js, but there's a learning curve involved. Once you get a hang of it you'll love it. These are some backbone resources;
http://documentcloud.github.com/backbone/docs/backbone.html
http://backbonetraining.net/resources
http://www.bitcandies.com/blog/2012/asp-net-mvc3-restful-application-tutorial-with-backbone-js-part-iv/
http://www.bitcandies.com/blog/2012/asp-net-mvc3-restful-application-tutorial-with-backbone-js-part-iv/
I am not sure if it intergates smoothly with webforms though.
Good Luck.
Please let me know if you need more help.
Please "mark as answered" if you find this post useful.
Allen Li - M...
Star
10411 Points
1196 Posts
Re: Javascript and VB Collections
Feb 20, 2012 02:39 AM|LINK
Hi, you can try JavaScript Array. There are some examples on the following site, you can refer to them:
http://www.w3schools.com/js/js_obj_array.asp
If you have any feedback about my replies, please contact msdnmg@microsoft.com
Microsoft One Code Framework