Just finished my first tutorial, enjoying fuse!
I can see how this can get really messy if I am having to write all the code in the MainView.ux file.
How do you guys organize your code?
Just finished my first tutorial, enjoying fuse!
I can see how this can get really messy if I am having to write all the code in the MainView.ux file.
How do you guys organize your code?
Hi!
You can easily split your UX over several files, e.g.
<App>
<Panel>
<Panel>
...part1
</Panel>
<Panel>
...part2
</Panel>
</Panel>
</App>
Can be split as:
Part1/2.ux:
<Panel ux:Class="Part1">
...part1
</Panel>
And in MainView.ux:
<App>
<Panel>
<Part1 />
<Part2 />
</Panel>
</App>
Oh that’s great! I love the ux language design, what about folder structure and software patterns? How do you handle uno code and javascript code? What about framework architecture?
on a sidenote, by the way, thanks for the answers! I wanna adopt this for a bigger project I have going on, that interacts with our rest api. I need to handle http calls, headers, and need to have client side storage
Have a look in this section : https://www.fusetools.com/developers/guides/uxmarkup
HTTP calls with headers etc can easily be done in JS with XmlHttpRequest
, see here:
https://www.fusetools.com/developers/guides/fusejs
Client side storage is also coming to FuseJS very soon, and can easily be done with Uno.
How JavaScript modules are organized relating to UX is currently being refactored. More docs will be published after the next release (in a few days!)