Post has attachment
Been having fun wth ReactiveX recently, mostly on Android with Retrofit and RxJava. I stumbled across CycleJS (https://egghead.io/lessons/rxjs-an-interactive-counter-in-cycle-js) which is a pure Reactive Web stack for JS and decides to see how easy it would be to do it in GWT, the result after about an hour of hacking displays a progressively incrementing <p>Clicked 'n'></p>

To explain what's happening here, this is a pure functional app with no state. User inputs are mapped to streams of data, which are mapped to DOM side effects (virtual dom patches), which feed source input sources back.

In this particular example, we create a stream containing only the integer '1' and merge it with a stream of click events from the body element, which are mapped to '1's. We then do reduce operation to add them, and then map the final number to a virtual dom P tag.

Thats it. Clicks flow in, DOM effects flow out. To see why this is cool, look at this time travel add it (https://www.youtube.com/watch?v=7fA0pVDHGJ0) or this hot reload example (https://www.youtube.com/watch?v=6KD8bYSohFI)

Keeping the code pure functional makes those examples trivial. It also makes it trivial to run code on the server, send down a stream of DOM patches, or compute them on the client, it makes no difference.

RxJava mostly works, there's a patch RxJava-GWT to make it work. (https://github.com/ibaca/rxjava-gwt)

Granted, it's probably not super practical, but it's conceptually much much simpler than ReactJS. It took me only an hour to implement this it's so simple.

Photo
Add a comment...

Post has attachment
One of the missing features of Java8 is string templating. I makes it hard to build a React-like library for GWT without hacks. I suppose this could be done with annotation processors somehow ala GWT generator templates, but it is not as easy as writing

render(t7`<div>{{blah}}</div>`)
Add a comment...

This collection is for GWT related posts that I make.
Add a comment...

Post has attachment
Add a comment...

Post has attachment
Add a comment...

Post has attachment
Add a comment...

Post has attachment
+Bruce Johnson and +Joel Webber presented a pretty cool "History of GWT" session today at the GWTcreate.com conference, but more impressive than the stories of GWT's origins back in 2004, was their demo of FullStory (https://www.fullstory.com/) , the product they launched after leaving Google. This product has amazing potential to change both the way customer support works, as well as how user interface study is conducted. The potential for deep insight into what's failing in the design of an app with respect to customers and 'close the loophole' in iterative design is enormous. 
Add a comment...
Wait while more posts are being loaded