Download the PHP package richarddobron/bigpipe without Composer
On this page you can find all versions of the php package richarddobron/bigpipe. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download richarddobron/bigpipe
More information about richarddobron/bigpipe
Files in richarddobron/bigpipe
Package bigpipe
Short Description This library currently implements small part of Facebook BigPipe so far, but the advantage is to efficiently insert/replace content and work with the DOM. It is also possible to easily call JavaScript modules from PHP.
License MIT
Informations about the package bigpipe
This library currently implements small part of Facebook BigPipe so far, but the advantage is to efficiently insert/replace content and work with the DOM. It is also possible to easily call JavaScript modules from PHP.
Demo App
Try the app with live demo or check how to install.
Full documentation
https://richarddobron.github.io/bigpipe-php/
Requirements
- PHP 7.1 or higher
- Webpack
Installation
These steps are required:
-
Install composer package:
-
Install npm package:
-
Add this lines to /path/to/resources/js/app.js:
-
Create file /path/to/resources/js/ServerJS.js
- this step is optional, but if you skip it, use this in next step:
- Add this lines to page footer:
DOMOPS API
- setContent: Sets the content of an element.
- appendContent: Insert content as the last child of specified element.
- prependContent: Insert content as the first child of specified element.
- insertAfter: Insert content after specified element.
- insertBefore: Insert content before specified element.
- remove: Remove specified element and its children.
- replace: Replace specified element with content.
- eval: Evaluates JavaScript code represented as a string.
Refresh & Redirecting
Payload
BigPipe API
- require: Call JavaScript module method. You can call a specific class method or a regular function with the custom arguments.
Example PHP code:
Example JavaScript code:
- transport: Through transport markers you can send HTML content but also transform the content into JavaScript objects (such as Map, Set or Element).
Example PHP code:
What all can be Ajaxifed?
Links
Forms
Dialogs
Inspiration
BigPipe is inspired by the concept behind Facebook's BigPipe. For more details read their blog post: Pipelining web pages for high performance.
Motivation
There is a large number of PHP projects for which moving to modern frameworks like Laravel Livewire, React, Vue.js (and many more!) could be very challenging.
The purpose of this library is to rapidly reduce the continuously repetitive code to work with the DOM and improve the communication barrier between PHP and JavaScript.
Version Guidance
Version | Released | Status | Repo | PHP Version |
---|---|---|---|---|
0.x | 2022-03-27 | Maintained | v0.x | >=7.1 |
1.x | 2022-07-29 | Latest | v1.x | ^8.0 |
Credits
License
The MIT License (MIT). Please see License File for more information.
All versions of bigpipe with dependencies
ext-json Version *