Функция ajaxFunc - параметризованная на основе XMLHttpRequest, получает требуемый согласно параметра массив с сервера.
Как оптимальнее добавлять с сервера информацию на страницу? 
В первом варианте функция createFooter возвращает результат и не более того, мне нравится, но не нравится такая запись: app_box.appendChild(createFooter(items));
Во втором варианте эта функция сама меняет DOM, вроде как не по фен-шую.
Два варианта:
var app_box = document.getElementById('app_box');
ajaxFunc('get_main_page').then(function(items) {
   app_box.appendChild(createHeader(items));
   app_box.appendChild(createMain(items));
   app_box.appendChild(createFooter(items));
});
function createFooter(items) {//createHeader, createMain - однотипные
   var footer = document.createElement('div');
   footer.className = 'footer';
   footer.textContent = items.footer.text;
   return footer;
}
var app_box = document.getElementById('app_box');
ajaxFunc('get_main_page').then(function(items) {
   createHeader(items);
   createMain(items);
   createFooter(items);
});
function createFooter(items) {//createHeader, createMain - однотипные
   var footer = document.createElement('div');
   footer.className = 'footer';
   footer.textContent = items.footer.text;
   app_box.appendChild(footer);
}