Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
This commit is a preparation for a few further commits and changes the mechanism how the BigPipe javascript library detects the last flushed pagelet from server. Previously, there was a "IS_LAST:true" property in the JSON encoded pagelet object. However, this meant that when the pagelet was sent to the client, the server already needed to know at this point that this is the last pagelet. This can no longer be reliably determined in the future due to smaller restructuring.
Instead of sending "IS_LAST:true" within the JSON encoded pagelet object of the last pagelet, the BigPipe::render() method on the server will display a <script> element which calls "BigPipe.onLastPageletArrived()" after all pagelets have been flushed. This call informs the javascript library that the last pagelet has been flushed and arrived at the client. This is required because the BigPipe javascript library otherwise doesn't know that the last pagelet has been arrived (the javascript library waits for all pagelets to be flushed and displayed until it begins to execute the external javascript resources of every pagelet).
|
|
The development of this project began several years ago on a Windows system until I switched to GNU\Linux. Therefore, some files contained CRLF as line separators, now replaced with LF.
|
|
The debug mechanism has been changed. Instead of keeping the debug mechanism hardcoded within the core classes, it's now possible and recommended to use the seperate debugging classes which you can modify like you want. Those classes inherit their associated core classes and can add some debugging stuff. This has the advantage of having a clean core code without any debugging stuff. If the debug classes are not used then they shall not be included and their code will not be initialized.
|
|
|
|
|
|
Item class.
|
|
shorthand syntax, you can abstract the Pagelet class and use your own extended class which is more flexible and will keep the BigPipe main classes as small as possible.
|
|
must now pass an existing Pagelet instance to the method!
|
|
implemented methods "enqueue" and "dequeue" for the new queueing mechanism. The "dequeue" method is currently unused but will be used in the future. The changes in this commit are partially preparations for further commits.
|
|
priority of the corresponding Pagelet instance.
|
|
|
|
the "class" keyword which was introduced in ECMAScript 6 (2015) to build the prototypes. In addition, some variables and functions were renamed and declared with the shorthand syntax.
|
|
arrow functions which were introduced in ECMAScript 6 (2015).
|
|
has been replaced by the new introduced keyword "let" from ECMAScript 6 (2015), which scopes the variable to the nearest enclosing block instead of the nearest function block.
|
|
prototype was removed.
|
|
necessary and has been replaced by a simpler variant inside the BigPipe library.
|
|
try/catch block to prevent troubles with some creepy Microsoft browsers.
|
|
display custom HTML content immediately while the pagelet is still processing.
|
|
"Stylesheet" and "Javascript" to make it more consistent with the other class names (instead of using the abbreviations).
|
|
"Stylesheet" and "Javascript" to make it more consistent with the other class names (instead of using the abbreviations).
|
|
"::enabled()".
|
|
|
|
|
|
|
|
dependencies (either with the instance of the dependency Pagelet or the unique ID as string as argument).
|
|
|
|
|
|
|
|
+ New classes have been added: "BigPipe\Resource", "BigPipe\Resource\CSS", "BigPipe\Resource\JS". If you wan't to add a resource to a Pagelet, you can now built a new resource object with the "CSS" or "JS" class (the "Resource" class is abstract and the parent class of "CSS" and "JS") and can add PhaseDoneJS callbacks for this resources with "Resource::addPhaseDoneJS()" similar to "Pagelet::addPhaseDoneJS()". To add the resource to your pagelet: "$Pagelet->addResource($Resource)". Of course, you can still use the two SHORT methods "Pagelet::addCSS()" and "Pagelet::addJS()" which needs only one parameter with the resource URL.
+ Each resource has now PhaseDoneJS callbacks for 3 phases (Object initializied [INIT], Loading started [LOAD], Loading complete [DONE]).
+ Check your usage of the PhaseDoneJS callback constants of the Pagelet class: These constants have been renamed.
+ Debugging mode: Just set BigPipe::debugging(TRUE) and each pagelet and resource will be pass through a function which adds PhaseDoneJS callbacks with debug informations (Look now at the Javascript console and enjoy the beautiful colors which makes the debug informations better readable for your eyes. \(o_o)/).
+ Several code improvements on almost all files.
|
|
+ All pagelets are now executed immediately on arrive.
+ A "Display Dependency" feature was added. If you give a pagelet an dependency, it will first be executed if all pagelets, who registered as dependency, are displayed.
+ If BigPipe.reset() is called, the function loops through each Resource and executes Resource.abortLoading(). This removes the <link> or <script> element from DOM and removes the onload callbacks. This is to prevent that an onload callback from a previous page are executed while the user has already changes the page asynchronously and a resource from the previous page wasn't already loaded.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|