Download the PHP package bear/ssr-module without Composer

On this page you can find all versions of the php package bear/ssr-module. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package ssr-module

BEAR.SsrModule

CI Scrutinizer Code Quality

JavaScript view layer for BEAR.Sunday

This module enables you to write views in JavaScript while keeping your application logic in PHP. The JavaScript templates are executed server-side (SSR) for initial rendering and can hydrate on the client for interactivity.

When to Use This Module

Prerequisites

Install

Composer Install

Module Install

Place your {app}.bundle.js file in the $buildDir directory. This JS is used for server side rendering (SSR) only.

[Ssr] Attribute

Basic

Add the #[Ssr] attribute to methods where you want SSR. Set the JS application name with app.

JS Render Application

Here is a minimalistic JS application. Export a render function. Use koriym/js-ui-skeleton to create a JavaScript UI application.

State and Metas

In SSR applications, you may need two kinds of data:

Separate them using the state and metas parameters in the #[Ssr] attribute:

render.js:

Cache Modules

For production, use cache modules to improve performance:

APCu Cache

Custom Cache

JavaScript Runtime

This module uses koriym/baracoa for JavaScript execution, which supports two runtimes:

Runtime Pros Cons
Node.js (default) No PHP extension required, easy deployment Process spawn overhead per render
V8Js Embedded execution, no process overhead Requires PHP extension installation

Node.js is used automatically when V8Js is not available.

Performance Note

When using event-driven caching with TTL=0 (cache invalidated by events rather than time), the Node.js process overhead becomes negligible. The rendered HTML is cached indefinitely and invalidated only when the underlying data changes, so JavaScript execution occurs only on cache misses.


All versions of ssr-module with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2.0
bear/resource Version ^1.15
koriym/baracoa Version ^1.0
ray/aop Version ^2.14
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bear/ssr-module contains the following files

Loading the files please wait ...