TYPO3 Neos Technical Discussion July 9th

Categories: Development, Community Created by Berit Hlubek
Last tuesday we had the second technical discussion meeting for TYPO3 Neos & Flow. The main topics for this meeting were HTTP Components, CGL Updates and the JavaScript file structure.

HTTP Components

Initialized by Christopher the team had the idea to refactor the Request Handling of TYPO3 Flow into a chain of so called “components”. The goal would be to make custom handling much more flexible and to allow users to hook into request dispatching more easily (i.e. to detect and set the locale depending on some header). Three general questions were discussed:
  1. 1. Generally a good idea?
  2. 2. Is the approach of the first prototype fine?
  3. 3. Find a better name for “ComponentRequest”? Something like ComponentContext or ComponentFlow?
We decided that the general idea makes sense and it seems worth pursuing this approach and try to get it into Flow 2.1. This would mean that it must not touch the public API in order to stay backwards-compatible. Bastian will continue working on the changeset adding tests and try to get it 100% backwards-compatible.

CGL Updates

We felt the need of some changes and additions to the PHP coding guide lines.

Fully Qualified Namespaces (FQN):

  • It is encouraged to import namespaces if it serves readability
  • In @var and @param annotations the FQN has to be kept until Sebastians patch is merged
  • If importing namespaces creates conflicting class names it is ok to alias the classes or to keep the FQN

“use” statements

  • One use statement per line, one use statement for each imported namespace
  • For better readability it is encouraged to order use statements alphabetically (some IDEs do that for you)
  • use statements don’t have side-effects (e.g. they don’t trigger autoloading): Nevertheless you must remove unused use statements for better readability

Inline “@var” annotations:

In general one should try to use PHP in a way that the type can be derived. In some cases this is not possible (for example when iterating through an array of objects). In these cases it’s ok to add inline @var annotations to increase readability and to activate auto-completion and syntax-highlighting. Bastian will incorporate these changes into the official Flow CGL documentation.

JavaScript file structure

We discussed restructuring the complete JavaScript for Neos. This is still work in progress and the goal is to improve the structure and make it independent from the content module. Aske will create a masterplan for some standards based on which we can discuss the final structure.

Summary of the previous meeting

A quick status update on the issues that were discussed on the previous Technical Discussion on June 4th:

EEL Standard Library

As discussed, we’ll use a JavaScript-like scheme for the helper names. Christopher has already worked on this and made some good progress.

General configuration/templates

We decided on a general approach (see summary of the previous meeting) but nothing has been implemented so far.

Neos Assets and Resources

As decided Neos does not use pixel graphics any longer for icons in the UI. Instead Icons are inserted via CSS using the Font Awesome icon font and most of the icons have been changed during the TYPO3 Developer Days.
Next steps include simplifying the integration of custom icons and creating a custom icon font.

Commenting for docs.typo3.org

Bastian started a thread in the documentation mailing list. Generally the response was quite positive but there are some concerns especially when it comes to privacy.

Fluid templates

It has been decided, that we want to integrate Marcs work for a flexible way to configure all kinds of views declaratively in Flow & Neos.
There is a similar suggestion in the review queue for TYPO3 CMS. A meeting with everyone involved is being scheduled to find a good solution that is compatible to both, the Fluid package as well as the extension. The next technical discussion meeting is scheduled for July 23rd, 3pm CEST at http://bit.ly/FlowHangout