Wicket and Vue.js synergy

2020-05-06 Thread Илья Нарыжный
Hello,

I code on Wicket for around 10 years and on Vue JS for a few months
and found a lot of in common between these frameworks. There are 100
and 1 ways in Wicket how to integrate a front-end framework. But with
pre-created Wicket library - integration might be even deeper and lead
to a synergy effect.

I've started to collect some ideas and "design notes" about the
library which allows integrating Wicket and Vue on another level. I
will really appreciate any feedback and more ideas and comments. Here
is this document:
https://docs.google.com/document/d/1Lj4LqebeZFkYGsfyC2K7upUl8VpBeAE49Q-BLtvhpFM/edit?usp=sharing
Feel free to comment, edit or reply to this email.


P.S. If you use telegram: lets chat in the group around Wicket -
https://t.me/apache_wicket
P.P.S. Reminder: here is a curated list of "awesome things" around
Wicket: https://github.com/PhantomYdn/awesome-wicket . If you have
something to propose: please feel free to make a PR or an issue.

Thanks,
Ilya
-
Orienteer(http://orienteer.org) - open source Business Application Platform

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: WebSocket onClose/onError/onAbort is not being called

2020-05-06 Thread Maxim Solodovnik
Thanks Martin!

https://issues.apache.org/jira/browse/WICKET-6782
will create PR in a moment :)

On Wed, 6 May 2020 at 00:22, Martin Grigorov  wrote:

> Hi Maxim,
>
> On Fri, May 1, 2020 at 2:22 PM Maxim Solodovnik 
> wrote:
>
> > On Fri, 1 May 2020 at 18:15, Martin Grigorov 
> wrote:
> >
> > > Hi Maxim,
> > >
> > > On Fri, May 1, 2020 at 1:31 PM Maxim Solodovnik 
> > > wrote:
> > >
> > > > Hello Martin,
> > > >
> > > > WicketEndpoint#onError is being called
> > > >  "*ERROR* 05-01 16:10:21.740 o.a.w.p.w.j.WicketEndpoint:100
> > > > [EventExec-e2-t9] - An error occurred in web socket connection with
> id
> > :
> > > > 10"
> > > >
> > > > The problem WebSocketBehavior#onError is not being called
> > > > So my application doesn't get notified the connection has been closed
> > > 
> > > >
> > >
> > > Then it must be somewhere in Wicket.
> > > Check that [2] is called.
> > >
> >
> > Yes it is called
> >
> >
> > > Then [3], then [4]. From here on it is Wicket Event propagation [5]. It
> > >
> >
> > [3] and [4] are not called
> > As you can see from the log branch at
> >
> >
> https://github.com/apache/wicket/blob/d43c68c0126306021a12afbfe7876a36612fbbc3/wicket-native-websocket/wicket-native-websocket-core/src/main/java/org/apache/wicket/protocol/ws/api/AbstractWebSocketProcessor.java#L299
> > is in effect:
> >
>
> At
>
> https://github.com/apache/wicket/blob/d43c68c0126306021a12afbfe7876a36612fbbc3/wicket-native-websocket/wicket-native-websocket-core/src/main/java/org/apache/wicket/protocol/ws/api/AbstractWebSocketProcessor.java#L223
> we
> check
> whether the connection is still opened or it is a ClosedMessage.
> ClosedMessage is broadcasted exactly for this reason:
>
> https://github.com/apache/wicket/commit/ffa34c6bfbd2ccd8340e23ff1601edd3e0e941d6
> We should simplify this condition to allow ErrorMessage too. Maybe even
> AbortedMessage.
> For the erroneous kind of messages we can even remove the connection from
> the registry at the bottom of this method.
> Please play with it and suggest a change!
>
> Martin
>
>
> > DEBUG 05-01 16:10:21.741 o.a.w.p.w.a.AbstractWebSocketProcessor:299
> > [EventExec-e2-t9] - Either there is no
> >
> >
> connection(org.apache.wicket.protocol.ws.javax.JavaxWebSocketConnection@43539f89
> > )
> > or it is closed.
> >
> >
> >
> >
> > > won't find your behavior if it is not enabled or any of if its
> component
> > > hierarchy is disabled/invisible.
> > >
> > >
> > > 2.
> > >
> > >
> >
> https://github.com/apache/wicket/blob/d43c68c0126306021a12afbfe7876a36612fbbc3/wicket-native-websocket/wicket-native-websocket-core/src/main/java/org/apache/wicket/protocol/ws/api/AbstractWebSocketProcessor.java#L202
> > > 3.
> > >
> > >
> >
> https://github.com/apache/wicket/blob/d43c68c0126306021a12afbfe7876a36612fbbc3/wicket-native-websocket/wicket-native-websocket-core/src/main/java/org/apache/wicket/protocol/ws/api/AbstractWebSocketProcessor.java#L272
> > > 4. *
> > >
> >
> https://github.com/apache/wicket/blob/d43c68c0126306021a12afbfe7876a36612fbbc3/wicket-native-websocket/wicket-native-websocket-core/src/main/java/org/apache/wicket/protocol/ws/api/WebSocketMessageBroadcastHandler.java#L69
> > > <
> > >
> >
> https://github.com/apache/wicket/blob/d43c68c0126306021a12afbfe7876a36612fbbc3/wicket-native-websocket/wicket-native-websocket-core/src/main/java/org/apache/wicket/protocol/ws/api/WebSocketMessageBroadcastHandler.java#L69
> > > >*
> > > 5.
> > >
> > >
> >
> https://github.com/apache/wicket/blob/d43c68c0126306021a12afbfe7876a36612fbbc3/wicket-native-websocket/wicket-native-websocket-core/src/main/java/org/apache/wicket/protocol/ws/api/WebSocketBehavior.java#L86
> > >
> > >
> > > > :(
> > > >
> > > > On Fri, 1 May 2020 at 17:12, Martin Grigorov 
> > > wrote:
> > > >
> > > > > Hi Maxim,
> > > > >
> > > > > If WicketEndpoint#onError() [1] is not called then probably there
> is
> > a
> > > > bug
> > > > > in Tomcat.
> > > > > I suggest you to post this question at Tomcat's users@.
> > > > >
> > > > > 1.
> > > > >
> > > > >
> > > >
> > >
> >
> https://github.com/apache/wicket/blob/master/wicket-native-websocket/wicket-native-websocket-javax/src/main/java/org/apache/wicket/protocol/ws/javax/WicketEndpoint.java#L92
> > > > >
> > > > >
> > > > > On Fri, May 1, 2020 at 12:21 PM Maxim Solodovnik <
> > solomax...@gmail.com
> > > >
> > > > > wrote:
> > > > >
> > > > > > Hello,
> > > > > >
> > > > > > I'm having weird situation: WebSocket connection is closed on
> page
> > > > > reload,
> > > > > > but none of my onClose/onError/onAbort handlers are being called
> > > > > > I have changed wicket version to latest SNAPSHOT and got some
> debug
> > > > logs:
> > > > > >
> > > > > > *ERROR* 05-01 16:10:21.740 o.a.w.p.w.j.WicketEndpoint:100
> > > > > > [EventExec-e2-t9] - An error occurred in web socket connection
> with
> > > id
> > > > > > : 10
> > > > > > java.io.IOException: java.io.IOException: Broken pipe
> > > > > > at
> > > > > >
> > > > >
> > > >
> > >
> >
>