Webix Jet : Recommended way to move large view UI in a separate file

In Webix Jet documentation, we always see UI code included in the same file of the view. When a view got a large UI, did there is a recommended way to separate the UI code from the view code ?
I’ve tried to move the UI in a requireJS module which become a dependency of the view. But I get stuck when the UI need to reference behavior code which is in the view.

Thanks,
Fabien

Yep, as webix UI config is a JSON structure it is recommended to split it into separate files and load through requreJS dependencies.

As for logic - normally you will want to handle the only UI related logic in the same file as UI. If you have some complex calculations or a business logic, most probably it needs to be moved to the model or helpers files.

For view related logic, you can embed event handlers directly in code of UI ( through using “on” structures in UI config ), so view related logic will be split between different files, along with UI config.