Angular 2 server side rendering coming to Symfony and Twig
So the Angular and the Drupal development teams have started working together to bring Universal Rendering to PHP and Twig. The details remain murky on how exactly this will be implemented (using a Node.js server or a PHP library), but a PHP library (not an extension written in C) would be the easiest option for developers.
This feature is being developed by two product teams (Angular and Drupal) and there is an opportunity that the implementation will be coupled with Drupal:
In the past Drupal has been criticized for being a freeloader in the PHP community as of late, but this is a great opportunity for them to create something that is usable for hundreds of thousands of non-Drupal developers. We urge the Angular and Drupal teams to work to make this a generic PHP/Twig component and not something that is tightly coupled (ha-ha) with Drupal.
- Drupal team working on Angular 2 Universal support for Twig / PHP
While it will probably be relatively easy to plunder the code from Drupal. But ideally we would get a general purpose Universal Rendering component that could be installed with Composer and easily used across all kinds of different PHP applications. Not just Symfony and Drupal.
Learn more about Isomorphic Rendering:
- Introduction to React.js Components and Server Side Rendering in PHP
- Testing React.js isomorphic rendering with php-v8js and the Symfony Microkernel
- Rendering Riot.js tags in Twig using Node.js