Dynamic call of module pattern function
Instead of adding data-properties to the body tag, and waiting for / relying on jQuery, just use an inline script:

&lt;script type="text/javascript"&gt;
    var modules = /* echo the needed modules here */;
    for (var i=0; i&lt;modules.length; i++)
        App[modules[i]]();
&lt;/script&gt;