Can Svelte.js be used for data driven templates?

118 views Asked by At

I am interested in programming UIs that have their structure depending on a meta definition. (such as user defined Canva defined in a design mode with drag and drop components, and then generating the UI according to that description in a JSON structure).

The UI features are in other words defined by data coming from user profile, context and permissions (so according to a DB query or the content of a data structure in an array, etc.)

Again, in other words, I do want to avoid hard coding the UI feature, but rather have the interface components chosen and bundled at runtime.

QUESTION: Can Svelte.js, a compiled framework, do that, or we need to stay with an interpreted framework for such mission?

1

There are 1 answers

0
Goren On

Yes, yes it can. First of all it no longer is a compiled framework. It is also an interpreted framework that performs lives on the server. Just use some curly quotes for your variables and it’ll work.