jsTree and Lazy Loading

jsTree and Lazy Loading

Old forum URL: forums.lhotka.net/forums/t/10886.aspx

DerThomas posted on Wednesday, November 16, 2011

Hello everyone,

I'm pretty new to CSLA and I already have a Question.

My Situation:
Currently I'm writing my Diploma Thesis and my task is to copy a Desktop Application (in WPF) to the web using Asp.Net MVC. In the last weeks I analysed the desktop application and build a corresponding Gui Prototype. Now I want to fill my GUI and my first step is to fill a jsTree with data from CSLA Business Objects, this wouldn't be a problem but the Tree has to load lazy like it does in the desktop application.

It's not a problem to load the data, just how do I make it load lazy without converting it into html, json, or xml?

Is there anyone with experience using jsTree with CSLA lazy loading?
Just write if you need any further informations Smile

Thanks in advance


DerThomas replied on Thursday, November 17, 2011

P.S.: I just can't skip Lazy loading because we support Data volumes of 1'000k articles and 100k+ nodes.

JonnyBee replied on Thursday, November 17, 2011

As far as I know - you must add a WCF service that exposes the data you need (from CSLA objects or database) as json or rest data so that you can load this into a javascript on a web client.

I assume your WPF application uses the DataPortal to access data and this is not applicable for your web client using javascript.

DerThomas replied on Thursday, November 17, 2011

I thought so... but is it possible to send the data back without the need to rebuild the data source from the service:

Here a short scenario i thought about using a WCF service which builds a json obj from CSLA:

1. jsTree get's json obj and builds a tree
2. user deletes an article inside of the tree
3. tree informs a second service to update the CSLA Object
4. json obj is rebuild because of the "new" CSLA Object
5. then it starts at #1 again

I hope I build a correct scenario... excuse my confusion but this is my first time with mvc and CSLA Geeked

Or is there any other way of rebuilding the tree.
Currently I'm studying the jstree documentation to hopefully find a solution.

Copyright (c) Marimer LLC