Additional Infusion questions
antranig.basman at colorado.edu
Mon Sep 4 00:22:27 UTC 2017
Cheers Danail - yes there is indeed the forceCache option but this only really deals with part of the
problem caused by I/O being scattered around the design. I appreciate that you are seeking a neater design
where the I/O that a widget demands is located together with it in a self-contained way - but as well as
this not being assisted by the current framework, it lays you open to the problems of i) the layout possibly
jumping as each template fetch concludes, ii) needing to make extra effort to ensure that markup is not
appended to the document out of order, iii) surplus components around the design (the current framework is
not very optimised and there is a cost that might well lead to perceptible rendering delays if you construct
one extra component per widget).
Given i) and ii) will require you to design an interlock that prevents rendering before all I/O has
completed, you may as well make this a structural part of your design and follow the pattern of pushing all
I/O to the top of the tree. Given this iteration of the UI is relatively unambitious with a fixed repertoire
of perhaps 6 or 7 different widgets, this isn't going to represent a painful dependency burden.
On 01/09/2017 15:20, Danail Dimitrov wrote:
> Thank you for the incredibly detailed response Antranig! It was very helpful!
> As a side note, we found that the templates are cached when loaded, so they are fetched only once (there is
> an `forceCache` (that is passed as `cache` options to the `Ajax` request) option which seems to be `true` by
> default - https://github.com/fluid-project/infusion/blob/master/src/framework/core/js/ResourceLoader.js#L61
> ). Does this solve the concern about multiple fetching of the same template?
> Best regards,
More information about the fluid-work