Download the PHP package koriym/js-ui-skeleton without Composer

On this page you can find all versions of the php package koriym/js-ui-skeleton. 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 js-ui-skeleton

JS-UI Skeleton

Japanese

A Javascript UI application skeleton for PHP project

Instead of PHP's Template Engine, Javascript on the server side or the client side is responsible for creating the view. Server-side rendering is done with V8Js or Node.js. Redux React example code is included, but you can freely select the JS template engine or UI framework.

Rendering

SSR only

Render the static page on the server side. Use JS's template engine and SSR-enabled view libraries such as ReatJs or VueJs.

SSR + CSR

Generate DOM on server side and convert it to HTML. The generated DOM is handed over to the browser JS. We use SSR-enabled view libraries like ReatJs and VueJs that can generate DOM.

CSR only

On the server side, just create JSON and generate DOM or HTML with CSR. Normally the non-DOM part of the document's root (such as the OGP <meta> tag) is rendered in PHP.

Prerequisites

Demo

Build and run example redux code.

Installation

There are two ways to make the JS UI application an independent project and to include it in the existing PHP project.

New installation

When creating it as a package and using it from a PHP project add that package to dependence. Since you can manage versions by UI yourself, it is easy to do UI dependency management from PHP projects and parallel work.

Add to existing project

Add the ui folder andpackage.json to the existing project.

The directory structure looks like this.

UI Config

Edit ui/ui.config.js to specify web public folder and the output directory of the bundled JS file by webpack.

Entry File

Specify the entry file in ui/entry.js. The SSR file is given a _ssr postfix.

Run Config

Set the JS application configuration file in the ui/dev/config/ directory.

$app is the application name, corresponding to the filepublic/build/dist/{$app}.bundle.js. $initialState is the initial state of the JS application (in the case of the template engine, it is the value assigned to the template) $ssrMetas is the value passed in SSR only.

Save the setting file with an arbitrary name, You select it on the screen and execute it.

Create UI Application

Server side

In a JS renderer application, implement render function which takes two parameters (preloadedState and metas) and return html string. This example illustrates typical SSR Redux application.

Client side

Render with preloadedState which is supplied by SSR. Then insert generated DOM into document root DOM for continuation.

Run JS Application

Execute the UI application created with Javascript.

Execute the above command and select and execute the rendering method that appeared on the screen. You can also run server side code in the browser to make debugging easier.

Command

Run the PHP application

Start the PHP application on the PHP built-in server.

Run the PHP application with sync

Start the PHP application with hot module loader and browserSync.

To monitor phpmd and phpcs, edit the dev command of phpmd.xml andphpcs.xml installation package.json in the project root and change it fromdev to dev-qa.

Test

Monitor JS test execution by Karma +Mocha + Chai. Edit karma.conf.js to change the setting.

Lint

Run Eslint. Edit .eslintrc to change the setting.

SSR Utility library

Baracoa is a utility library for SSR. A V8 snapshot is supported to boost the performance.


All versions of js-ui-skeleton with dependencies

PHP Build Version
Package Version
No informations.
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 koriym/js-ui-skeleton contains the following files

Loading the files please wait ....