I have seen this mainly in the source of Facebook "Bootloader.setResourceMap({"bMxb7":{"name":...." What is exactly a bootloader in javascript? what is its use and purpose?
Thank you =)
I have seen this mainly in the source of Facebook "Bootloader.setResourceMap({"bMxb7":{"name":...." What is exactly a bootloader in javascript? what is its use and purpose?
Thank you =)
Strictly speaking, there is no such thing.
A bootstrap loader is the part of an operating system that loads the disk operating system from disk, thus the computer lifts itself by the bootstraps, by loading from disk before the disk loading routines are loaded.
There are no Javascript operating systems, so there is no bootstrap loader for Javascript. This is just some object that is named that way, presumably because it does something early in the page load process.
Generally speaking, the bootloader is a (relatively) small amount of code responsible for establishing the environment that all subsequent code requires to run, as such it is also the the first code to be executed. It's usually restricted to OSes, but makes sense for FB too.
In the case of Facebook, the bootloader will do things like loading additional JS files and other resources that the library needs in addition to the single public <script />
the developer included in the document.