PHPackages                             wkeller/bigpipe-pipeline - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. wkeller/bigpipe-pipeline

ActiveLibrary

wkeller/bigpipe-pipeline
========================

BigPipe: Pipelining web pages for high performance built in PHP.

1.0.0(6y ago)43GPL-3.0-or-laterJavaScriptPHP ~7.1.0|~7.1.3|~7.2.0

Since Oct 21Pushed 6y agoCompare

[ Source](https://github.com/williankeller/bigpipe-pipeline)[ Packagist](https://packagist.org/packages/wkeller/bigpipe-pipeline)[ RSS](/packages/wkeller-bigpipe-pipeline/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)DependenciesVersions (3)Used By (0)

BigPipe: Pipelining web pages for high performance
--------------------------------------------------

[](#bigpipe-pipelining-web-pages-for-high-performance)

[![Build Status](https://camo.githubusercontent.com/ba782c8ff03b21078bb460b41b8170577f3fd042ecd16166baf2f1f19b87b9af/68747470733a2f2f7472617669732d63692e6f72672f77696c6c69616e6b656c6c65722f626967706970652d706970656c696e652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/williankeller/bigpipe-pipeline)[![Packagist](https://camo.githubusercontent.com/9e456d1f302676422b409e24048f2ec031a05b2f6c348c24e748374fd691c8e5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f776b656c6c65722f626967706970652d706970656c696e652e737667)](https://packagist.org/packages/wkeller/bigpipe-pipeline)[![Downloads](https://camo.githubusercontent.com/93369d0c7b5b6e79c30eb8ba00cbd117bd2238c4bcca833e1b41487c4b61ae1b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f776b656c6c65722f626967706970652d706970656c696e652e737667)](https://packagist.org/packages/wkeller/bigpipe-pipeline)

Bigpipe is a feature originally created by facebook: [BigPipe: Pipelining web pages for high performance.](https://engineering.fb.com/web/bigpipe-pipelining-web-pages-for-high-performance/)The general idea is to break down web pages into small reusable pieces of functionality called Pagelets and separate them into various stages of execution within web servers and browsers. This enables progressive front-end rendering and results in exceptional front-end performance.

### Our library code:

[](#our-library-code)

Most web frameworks are based on a request and response pattern, one request arrives, we process the data and output of a model. But before we can issue the model we have to wait until all the data has been received before the model can be processed. When you receive your first batch of data, why not send it directly to the browser so that it can start downloading the required CSS, JavaScript and processing it.

### Install via composer (recommended)

[](#install-via-composer-recommended)

```
composer create-project wkeller/bigpipe-pipeline
```

### Methods to use it:

[](#methods-to-use-it)

- **addContent()** *(add content to the some DOM element)*
- **addCss()** *(add the CSS no to the head of the page)*
- **addJS()** *(add JavaScript file to the footer of the page)*
- **addJsScript()** *(add inline JavaScript content)*

### Some working examples:

[](#some-working-examples)

**Adding static text content:**

```
// Initiate Pagelet (creates new div with ID)
$element = new Pagelet('static-text');

// Adding the text content inside of the DIV element
$element->addContent('Static text content inside of the "static-text" DIV element.');

// Priting Pagelet element
echo $element;
```

**Adding external file:**Possible files to be loaded: PHP, HTML and more.

```
// Initiate Pagelet (creates new div with ID)
$element = new Pagelet('it-is-a-file');

// Adding the content of the file inside of the DIV element
$element->addContent('path/to/file/filename.php', true);

// Priting Pagelet element
echo $element;
```

**Adding CSS no head**

```
// Initiate Pagelet
$element = new Pagelet('css');

// Adding style files to the head
$pagelet->addCss([
  'path/to/file/style.css',
  'path/to/file/fonts.css'
]);

// Priting Pagelet element
echo $element;
```

**Adding JavaScript files to the footer of the page:**

```
// Initiate Pagelet
$element = new Pagelet('javascript');

// Adding JavaScript files to the footer
$pagelet->addJS([
  'path/to/file/jQuery.js',
  'path/to/file/script.js'
]);

// Priting Pagelet element
echo $element;
```

**Adding inline JavaScript content:**

```
// Initiate Pagelet
$element = new Pagelet('javascript-inline');

// Adicionando javascript inline
$pagelet->addJsScript("$('static-text').innerHTML = 'Changing static content';");

// Priting Pagelet element
echo $element;
```

### Priority:

[](#priority)

In BigPipe, JavaScript resource is given lower priority than CSS and page content. Therefore, BigPipe won’t start downloading JavaScript for any pagelet until all pagelets in the page have been displayed.

With that, it's possible to set priority to the Pagelets you are loading. Let's say you'd like to load your footer content as last content:

```
// Initiate Pagelet
$element = new Pagelet('footer', null, 30);

// Adding JavaScript files to the footer
$pagelet->addJS(['path/to/file/footer.js']);

// Adding the text content inside of the DIV element
$element->addContent('Footer content goes here.');

// Priting Pagelet element
echo $element;
```

In this case, `footer` will have priority `30`. All the Pagelets bofore this number will be loaded first.

### Contribution

[](#contribution)

Want to contribute to this extension? The quickest way is to open a [pull request on GitHub](https://help.github.com/articles/using-pull-requests).

### Support

[](#support)

If you encounter any problems or bugs, please open an issue on [GitHub](https://github.com/williankeller/bigpipe-pipeline/issues). Need help setting up or want to customize this extension to meet your business needs? Please open an issue and if we like your idea we will add ad a feature.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2392d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2963928?v=4)[Willian Keller](/maintainers/williankeller)[@williankeller](https://github.com/williankeller)

---

Top Contributors

[![williankeller](https://avatars.githubusercontent.com/u/2963928?v=4)](https://github.com/williankeller "williankeller (15 commits)")

---

Tags

big-pipebigpipedynamic-contentfacebook-pipelinejavascriptpageletpageletspipeliningpipelining-capabilitiespipelinebigpipepageletbigpipe pipelinefacebook bigpipefacebook pipeline

### Embed Badge

![Health badge](/badges/wkeller-bigpipe-pipeline/health.svg)

```
[![Health](https://phpackages.com/badges/wkeller-bigpipe-pipeline/health.svg)](https://phpackages.com/packages/wkeller-bigpipe-pipeline)
```

###  Alternatives

[league/pipeline

A plug and play pipeline implementation.

1.0k16.0M74](/packages/league-pipeline)[stolz/assets

An ultra-simple-to-use assets management library

296519.2k8](/packages/stolz-assets)[mpociot/pipeline

Simple PHP middleware pipeline

1381.6M12](/packages/mpociot-pipeline)[pipedrive/pipedrive

Pipedrive REST client for PHP

601.2M](/packages/pipedrive-pipedrive)[chefhasteeth/pipeline

18049.5k1](/packages/chefhasteeth-pipeline)[imanghafoori/laravel-middlewarize

Use laravel middlewares on any method calls in your app

1134.5k1](/packages/imanghafoori-laravel-middlewarize)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
