how to do dynamic SVG?


how can you dynamically (by code) generate SVG/vector graphics with Vaadin?

Is there a built-in solution (I found a package called elemental.svg)?
If not: Would it be a good idea to use an existing JS library (e. g. Snap, svg.js)?

I am new to Vaadin and I saw that you can create both server-based applications and client-based applications. Does the requirement of doing SVG have implications on this decision?

If I make a server-based application, does this mean that doing SVG at the client side (e.g . a chess game) gets slow?



Server side approach by no means makes your applicaiton slower. Otherwise bad design decisions might, in both client and server centric approaches.

If you are planning online Chess game, I’d implement it as std. Vaadin application, with “ChessBoard” custom component. In its client side implementation, use this
GWT SVG library
. Keep the board state in Vaadins “shared state”. For “dynamic changes” I’d probably use clientRPC mechanism.