Symfony UXについての調査
Symfony UXとは
Symfony UXは以下の説明[1]の通り、シームレスにJavaScriptをSymfony Applicationで扱うための取り組み・ライブラリとのこと。Stimulusをラップしているようです。
Symfony UX is an initiative and set of libraries to seamlessly integrate JavaScript tools into your application. For example, want to render a chart with Chart.js? Use UX Chart.js to build the chart in PHP. The JavaScript is handled for you automatically.
Behind the scenes, the UX packages leverage Stimulus: a small, but powerful library for binding JavaScript functionality to elements on your page.
Symfony UXには以下を始めとするパッケージが存在し、ReactやVueなどのWebアプリケーションフレームワークにも対応しています。
- ux-react
- ux-vue
- ux-twig-component
- ux-live-component:
Symfony UXのメリット
なるべくJavaScriptを書かずにSymfony ApplicationをUIリッチ・UXリッチにできるのは良さそうです。ただ、そもそも用意されているパッケージが少ないので[2]、ある程度リッチなアプリケーションにしようとすると結局JavaScriptを書くことになりそうです。
References
[1]. Symfony Organiztion:The Symfony UX Initiative & Packages、Symfony Documentation、入手先 < https://symfony.com/doc/current/frontend/ux.html > (参照 2023-01-31)
[2]. Symfony Incorporated:Symfony UX、入手先 < https://ux.symfony.com/ > (参照 2023-01-31)