Order views based on dependencies