Re: Elemental2 and widgets

2020-06-26 Thread Vegegoku
in most of the simple cases where you just wrap an element inside a widget 
like that, then you keep using the element as element not as a widget, 
things should work, but if you at some point needs a widget like 
interaction between wrapped widgets where the widget will expect a correct 
wiring of parent widget and a proper events sink you will face problems.

as for domino-ui, i would say you can just wrap as widgets only to append 
those domino-ui as elements, which means you will only treat them as 
widgets when you are appending them. other than that the gradual migration 
depends on how you would map your widgets to the domino-ui components, and 
how you split your views, and what mvp you use for example.

On Sunday, June 21, 2020 at 2:02:09 PM UTC+3, Gordan Krešić wrote:
>
> On 21. 06. 2020. 08:55, Vegegoku wrote: 
> > sorry, i meant to say : That will *NOT* do the required wiring 
> > 
> > On Saturday, June 20, 2020 at 1:55:20 PM UTC+3, Vegegoku wrote: 
> > 
> > That will do the required wiring to make elements behave like 
> widgets, 
> > it will not wire events correctly nor it will wire the 
> attach/detach, 
> > you can do it but it is not a simple task, thats why elemento moved 
> the 
> > issue the lib user instead of solving it in the lib itself. 
>
> Could you be a bit more specific? 
>
> So far, I've tested with only a very simple hierarchy: 
>
> RootPanel -> SimpleLayoutPanel -> [widget/Domino border] -> 
> GridLayout -> 
> other Domino elements 
>
> and I didn't see any problems, neither with event handling (click 
> listeners 
> on GridLayout children) nor with GridLayout.onDetached (didn't test 
> onAttached). 
>
> So, where I can expect problems to start manifesting? 
>
> Also, back to my initial question: ss there any "best practice" for 
> graduately migrating widget-based app to DominoUI? 
>
> -gkresic. 
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit/7042edb1-0c52-41a9-b367-7c50d4857575o%40googlegroups.com.


Re: runAsync + permutations

2020-06-26 Thread Colin Alworth
I'm not sure I've seen this done before, but in theory what you are 
attempting should be supported? The CodeSplitter runs on each individual 
permutation, taking both java/js programs as input, and appears to have 
checks to confirm that only reachable code for that permutation ends up in 
the split points. This is well after the optimization loop too, so the each 
java program should have dead code removed from it after constants (like 
system.getProperty("foo").equals("bar")) have been handled 
(getProperty("foo") replaced with a JPermutationDependentValue early in the 
build, then in the specific permutation the real value is swapped in by 
ResolvePermutationDependentValues, then DeadCodeElimination first rewrites 
the "literal".equals("literal") to true or false and the entire if 
statement gets replaced with an empty statement by Simplifier, also in 
DeadCodeElimination).

Can you confirm how you are checking this? You said "the code splits are 
generated all the same" - does that mean that the same number of split 
points exist and have should-be-pruned code in them, or that they exist but 
are actually empty (or mostly empty, minimum size is a under 1kb iirc)? 
Also, is there any chance that you've told the compiler to not heavily 
optimize? This is a long shot since even one pass through the optimization 
loop should make these changes, but is my next best guess just from reading 
the code briefly.

It does appear that the "count how many split points exist at all" (aka 
ReplaceRunAsyncs) 
happens before permutations are considered, so my hunch would be that those 
garbage split points are actually small or empty, and that avoiding 
generating them at all would probably be more trouble than it is worth, but 
I'm not certain about this.

On Friday, June 26, 2020 at 7:31:12 AM UTC-5 Alexander Bertram wrote:

> Hi there,
>
> I've have defined a second set of permutations for our app based on screen 
> size. When screen size dips below 768, the property "form.factor" is set to 
> "mini", and we bind the entry point to a different implementation.
>
> 
> 
> 
> 
>
> The LargeEntryPoint contains many more features, and uses GWT.runAsync() 
> to split some of the larger ones from the initial download.
>
> The mini permutations correctly only include the features included from 
> MiniEntryPoint. BUT they also include identical splits for each of the 
> GWT.runAsync() calls, even though the GWT.runAsync() calls are not 
> reachable from MiniEntryPoint.
>
> I've even tried wrapping the calls to GWT.runAsync() in:
>
> if(System.getProperty("form.factor").equals("full")) {
>GWT.runAsync(new RunAsyncCallback() {
>   // ...
>});
> }
>
> but it has no impact - the code splits are generated all the same.
>
> This isn't a show stopper as these split points are ever loaded from the 
> mini app, but it would be nice to reduce the extra compile and deploy time 
> involved in these large split points.
>
> Is it possible that the code splitting runs before dead code elimination 
> in each permutation? Any workarounds?
>
> Thanks,
> Alex
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit/acb5f188-6555-4831-b3e5-00257adeaa27n%40googlegroups.com.