Your "getRoots" function does not return anything. Using the $.ajax(successCallback) or $.ajax.done() patter is the same thing. You are not deferring anything. There is no way you can do this without callbacks, events or promises. Callbacks and events are basically the same, only the latter allow better architectural decoupling (highly debatable fact). Promises mean that you can write var x = getRoots() and x will be undefined until the browser gets back a response from the server. Your application has to account for this. So either you start coding with the async pattern in mind (callbacks, events) or design applications that handle null/undefined values gracefully.
Using callbacks:
function getStuff(callback) {
$.ajax(...).done(function(data) {
// maybe process data?
callback(data);
});
}
getStuff(function(data) {
// this is where I can use data
});
This way you can write your getStuff methods in a separate module, say "DataService" so MVC logic is not polluted.