I was wondering, since i searched here and didn't find an answer for this, if any of you can explain me the difference between using require splunkjs/ready! or using require splunkjs/mvc/simplexml/ready! ??
In which case I should use one instead of the other?
The idea of both is to ensure your code runs after those two processes are finished, even if one of them takes a while longer, because usually your code won't work or may even create errors if they haven't finished.
Which one you need depends on what you intend to do in your code. If you want to work some behind the scenes magic without touching any of your visualizations, you should be good to go with the first one only. If you want to move around stuff on your dashboard by changing the DOM with jquery or if you want to use a custom visualization using data from a search manager, you should probably use the second one as well.
In my personal experience, using the two ready statements is not strictly necessary, as most code will run fine either way with just the first one (though I've run into problems if that's not there). It's just that sometimes it won't, and to avoid trouble because of not-yet-loaded dashboard elements (also to increase portability: you never know where your apps run, and just because it runs on your machine doesn't mean it runs everywhere), you should use the second one if you operate on dashboard elements as well. Unfortunately, this is just my personal experience and I can't really cite any other reliable sources apart from the one above - but I know I was confused about this at first, too, but I hope I could clear things up a little for you.