Directory

← Back

Snappy

Make your applications faster using client side actions - no server roundtrip required.

Author

Rating

Popularity

<100

As you probably know, almost every action in a Vaadin application requires a server request. Most of the time this is not a problem, but sometimes you probably wish you could optimize some small operations to be handled mainly on the client side.

With the Snappy add-on, you are allowed to define some actions to execute primarily on the client/browser, and let the new state be synchronized to the server lazily. No server request is made instantly when the actions are performed. The state is synchronized only when some other server request is triggered, such as button click which requires server side processing.

There are mainly two reasons you would want to move some operations to the client/browser:

  1. Make the interface respond faster to user input, so that it feels more responsive and 'snappy’
  2. Reduce HTTP traffic to the server, most notably in mobile devices, as latency and bandwidth could slow down the application

Both of these reasons come from the need to make the application feel fast to the end, which is usually very important.

Sample code

Label changeMe = new Label("Original label text");
SnappyButton changeIt = new SnappyButton("Set Text");
changeIt.on(Events.Common.CLICK).addAction(changeMe,
                Action.Label.SET_TEXT, "New label text");

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Initial release, quite ready for beta use. Some additional features might come before 1.0.

Not properly tested on all browsers, but should work so please report any issues you encounter. Probable bugs ahead.

Released
2012-02-26
Maturity
BETA
License
Apache License 2.0

Compatibility

Framework
Vaadin 6.5+
Browser
Internet Explorer
Internet Explorer
Internet Explorer
Firefox
Opera
Safari
Google Chrome
Internet Explorer
iOS Browser
Android Browser

Snappy - Vaadin Add-on Directory

Make your applications faster using client side actions - no server roundtrip required. Snappy - Vaadin Add-on Directory
As you probably know, almost every action in a Vaadin application requires a server request. Most of the time this is not a problem, but sometimes you probably wish you could optimize some small operations to be handled mainly on the client side. With the Snappy add-on, you are allowed to define some actions to execute primarily on the client/browser, and let the new state be synchronized to the server lazily. No server request is made instantly when the actions are performed. The state is synchronized only when some other server request is triggered, such as button click which requires server side processing. There are mainly two reasons you would want to move some operations to the client/browser: 1. Make the interface respond faster to user input, so that it feels more responsive and 'snappy’ 2. Reduce HTTP traffic to the server, most notably in mobile devices, as latency and bandwidth could slow down the application Both of these reasons come from the need to make the application feel fast to the end, which is usually very important.
Online