Download the PHP package electro-modules/matisse without Composer

On this page you can find all versions of the php package electro-modules/matisse. 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 matisse

Matisse

Introduction

What is Matisse?

Matisse is a component-based template engine for PHP web applications.

What are components?

Components are parameterised, composable and reusable units of rendering logic, domain logic and markup, that you can assemble and configure to create visual interfaces and provide functionality to applications.

How does Matisse differ from other templating engines?

Like any other template engine, Matisse generates an HTML document by combining a source (template) document with data from your view model.

But unlike most other PHP template engines, which just render templates made of text/markup intermixed with code written in PHP or in a custom DSL, Matisse assembles user interfaces from building blocks called components. It also tries to keep logic out of templates as much as possible, therefore allowing a clear separation of programming and presentation logic.

Matisse templates are very clean and readable, and are composed only of clean HTML enhanced with additional component tags and binding expressions.

Finally, applications made with Matisse are not MVC (Model View Controller) based. Matisse promotes a MVVM (Model, View, View Model) architecture, with mono or bi-directional data binding.

How is it similar to other competing solutions?

Some concepts may remind of you of AngularJS, React or Web Components, which are client-side frameworks.

Matisse, combined with the Electro framework, brings to the server-side many of those concepts, but in a pragmatic, simpler, faster and easier way, allowing you to write sophisticated web applications without having to deal with Javascript, ES6, Typescript, AJAX, REST APIs, module loaders, transpilers, file watchers and complicated build toolchains. Just write your code, switch to the browser, hit Refresh and instantly see the changes you've made come to life. Then deploy seamlessly to production.

What is the value proposition of Matisse?

Matisse allows you to rapidly create complex web applications from composable building blocks.

It reduces significantly the need to write PHP code by using components that, not only can render visual interfaces, but can also provide built-in functionality for handling data, domain logic and user interaction.

In fact, with Matisse, your entire application can be made of components, at many abstraction levels, starting from low-level design elements and widgets and progressively nesting more and more higher level abstracted concepts and constructs, up to the point where you'll be able to write your application's user interfaces with your own custom, HTML-compatible, DSL (Domain Specific Language).

With practice, your templates will become very terse, readable, semantic and expressive, but will remain flexible enough to accomodate any kind of custom HTML for handling specific requirements.

Your productivity will skyrocket by reducing code to a minimum and reusing and sharing blocks of functionality, both within projects and between projects.

Matisse optimizes the workflow between designers and programmers, by allowing designers to easily create their own components, without code, and assemble them into functional application mockups that can be converted to working prototypes by programmers with a minimum of rewriting, AND which can later return to designers for further development, remaining fully understandable to them.

Matisse also automates many of the tedious tasks web developers need to perform, by reducing the need to write boilerplate code, automatically managing assets (scripts and stylesheets), dependencies, libraries installation and integration, building and optimizing stuff for production, etc.

More than a templating engine, Matisse is an architectural framework for your applications, and a different way of developing them.

Installation

To install this plugin on your application, using the terminal, cd to your app's directory and type:

For correct operation, do not install this package directly with Composer.

Overview

Matisse is a powerful templating system and explaining all its capabilities is beyond the scope of this Readme.

We'll give you just a little overview of its main concepts and features, so that you may have a cursory idea of what it is and how it can be useful for rapidly creating complex web applications from composable building blocks.

Templates

Matisse templates are HTML text files where, besides common HTML tags (always lower cased), special tags, beginning with a capital letter, specify dynamic components.

Example

Note: when writing templates, HTML markup should be written in HTML 5 syntax, while component tags must be written in XML syntax. This means tags must always be closed, even if the tag has no content (you can use the self-closing tag syntax: <Component/>). Unlike XML though, attribute values are not required to be enclosed in quotes.

Components

On the example above, Input is a component, not the common input HTML element. It is processed on the server, and it generates HTML markup that will replace its tag on the resulting HTML document.

For is another component. It repeats a block of markup for each record on a list (array) of records. When there is data, For writes an header (if specified), followed by the repeatable content, followed by a footer (if specified). If there is no data, only the content of the Else subtag is output.

Attributes

Component properties are represented by HTML tag attributes (ex. the each and of attributes of the For tag).

You should use attributes for defining properties having scalar values (ex: string or numeric values).

The syntax for an attribute is name="value", name='value' or name=value (the later can be used only if the value has no spaces on it).

Boolean attributes (those with true or false values) can be defined without specifiyng the values. Ex: <Tag readonly/> for true and just <Tag/> (with the attribute missing) for false.

Subtags

Subtags, like tags, are also capitalized, but they do not represent components; they represent properties of the enclosing component.

In the example above, the optional content parts of the For component are defined with subtags: the Header, Footer and Else tags.

Use subtags when the property value is HTML markup. Notice that a subtag's markup content may define additional components.

Mixed HTML and XML markup

Again on the example above, notice how the <ul> tag is only closed inside the <Footer> tag, seemingly violating the correct HTML tag nesting structure of the template. In reality, the template is perfectly valid and so is the generated HTML output. This happens because, for Matisse, all lower cased HTML tags are simply raw text, without any special meaning. All text lying between component tags (those beginning with a capital letter) is converted into as few as possible Text components.

So, the real DOM (as parsed by Matisse) for the example above is (in pseudo-code):

Data binding

Data from a view model or from component properties can be automatically applied to specific places on the template. This is called "binding" data to the template.

To bind data, you use "data binding expressions", which are enclosed in brackets.

Example

If you need to insert a binding expression on a javascript block containing brackets, you'll need to always insert a line break after each bracket that is not part of a binding expression.

Example

In this example, the bracket on the first line of script is not mistaken for a binding expression delimiter, as it is immediately followed by a line break.

Expression syntax

The syntax for expressions differs from PHP expressions. For instance, accessing properties of an object or array is done with the dot operator, instead of the [] or -> operators.

Expressions can also define sequences of filters for applying multiple transformations to a value. The pipe operator | delimits the filters on an expression. The value from the leftmost part of the expression will flow from left to right, the result of the previous filter being fed to the next one. Filters may also have additional arguments.

Example

(Un)escaping output

Binding expressions always HTML-encode (escape) their output, for security reasons.

But if you really need to output raw markup, you can use the * filter.

Example

Binding component properties

On composite components (those having their own templates), you can bind to the properties of the component (that owns the template) using the @ operator.

Example

You'l see more examples of this type of binding on the section about "Macros", below.

Implementing your own components

Each component tag is converted into an instance of a corresponding PHP class. When the template is rendered, each class instance is responsible for generating an HTML representation of the corresponding component, together with optional (embedded or external) javascript code and stylesheet references or embedded CSS styles.

Minimal component example

This is the smallest, simplest component that you may implement:

You would call this component from a template like this:

which would render:

Minimal component with a property

Let's make our component's output text parameterizable:

You would call this component from a template like this:

which would render:

Macros

Components can also be defined with pure markup via template files, without any PHP code. Those templates are conceptually similar to parametric macros, so they are called macro components, or simply macros.

A more advanced component

This template defines a macro component that implements a customisable panel:

You can then create instances of this component like this:

When rendered, the template will generate the following HTML markup:

View Models

You may bind values from a view model into your template.

For instance, given the following view model:

you may call the same component, defined above, like this:

The resulting output would be identical to the one from the previous example.

More documentation

This was just a very short introduction to the Matisse template engine.

Matisse provides many more advanced features to power-up your development (like Includes, Content Blocks, Typed Properties, Composite Components, Assets Management, Rule-based Presets, Metadata, Custom Filters, Auto-mapped Controllers, Service Importing, Javascript Code Generation and Client-side API, HTTP request handling and routing, and many more!...).

Despite its current lack of documentation, Matisse is quite ready for use. In fact, we are using it, right now, on several projects at our company.

We're sorry for the lack of documentation, but we're working on it.

See also

Take a look at the Matisse Components plugin, if you want an extensive collection of Bootstrap-based components that you can use right away on your applications.

License

The Electro framework is open-source software licensed under the MIT license.

Electro framework - Copyright © Cláudio Silva and Impactwave, Lda.


All versions of matisse with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
electro/installers Version ^1.0.0
electro/interop Version ^0.10
php-kit/flow Version ^1.0.0
php-kit/html5-tools Version ^1.0.0
php-kit/power-primitives Version ^1.0.0
php-kit/tools Version ^2.0.0
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 electro-modules/matisse contains the following files

Loading the files please wait ....