Radek
Radek

Reputation: 11101

which data source for jsTree?

I want to write an application using jsTree that would display and manipulate directory structure of my hdd (one selected directory and all subdirectories). Manipulate = read/update/create files & create new directories.

I have no real experience with jsTree and I wonder

(all runs on sinatra + haml on windows)

Upvotes: 1

Views: 665

Answers (1)

JasCav
JasCav

Reputation: 34632

This is going to be a bit of a cop-out answer, but you really should use the data source that best fits your project. jsTree can handle all three, but, for one reason or another, it may benefit you to choose one in particular.

In my own use of jsTree, I have found it easiest to use JSON because it is very easy to build and create server-side (where I am using ASP.NET MVC). It requires very little work to accomplish, and I can encompass the building of the tree in a single class.

I don't have any other particular suggestions other than jsTree (based on the technology you are using). I would say make a decision and give it a try. If you're using source control, you can always roll back if things don't work out for you. However, it sounds like you would do best to actually start using jsTree and seeing if it fits your needs. It's not a very "heavy" library, so it is fairly easy to begin getting it to work and see how you like it.

One piece of advice, however, is keep both the documentation AND the forums available to you as there are some features that are not fully updated in the official documentation, but it is covered in the forums. (I ran into one particular issue in this manner which was solved through some searching in the forums.)

Upvotes: 1

Related Questions