V3 is extremely focused on performance. Being it a browser based application, it relies on the download of several files from the server to the browser to run. This download process impacts on the page rendering and the user satisfaction.
To help improving the user experience, V3 offers several loading and startup methods, which can be used by developers, according to their needs and expectations.
The Inline Method
With this method, the "full editor code" is loaded inside the <head> tag. All editor instances share the same code base, and their UI are created as soon as defined in the page.
Advantages: The editor is displayed on the page, ready to be used, as soon as it is rendered.
Disadvantages: The page takes longer to load.
The Deferred Method
This method aims to reduce the impact of the editor download in the page load.
A small script file (< 5KB) is loaded in the <head> tag. It contains a small subset of the editor API, which defines the functions needed to create editor instances in the page. Editor instances will not be created immediately when defined, being inserted in a creation queue.
The full editor code is then loaded right before the closing </body> tag in the page. As soon as the code is loaded all queued instances are effectively created.
Advantages: The impact on the page load is minimal.
Disadvantages: The editor will not be available as soon as the page is displayed. It will be downloaded right after it, and a blank space will fill the editor space meanwhile. Also, an extra file is downloaded.
The On Demand Method
This method is quite similar to the Deferred Method described above, including the small script file to be loaded, this time either in the <head> or before the closing </body> tag. The key difference is that, in this case, the full editor code is not loaded before the closing </body> tag, but as soon as an editor instance is created.
The most obvious use of this method is for web applications that create their interface dynamically, based on the user actions, like Ajax applications.
Advantages: The impact on the page load is minimal, almost zero. The full code file is not downloaded if not needed.
Disadvantages: The editor will not be displayed immediately when created, but with a first time download delay.
The Timeout Method
This method is almost identical to the On Demand Method, except that the full editor code download is delayed by a predefined amount of time after the window.onload event. If any editor instance is created before that timeout, the full code download is started immediately.
This method is probably the best choice for Ajax applications, after the Inline Method, if the user has high chances of facing editor instances during the application usage.
Advantages: The impact on the page load is minimal, almost zero. The editor is displayed immediately when created, if the creation happens after the timeout.
Disadvantages: The full editor code is downloaded, even if the editor is not created. An extra file needs to be downloaded.