2
votes

I am new to GWT and working on a project involving RPC and MySQL. I want to dynamically draw a network diagram which includes ovals and lines with arrows. I am considering using SmartGWT DrawOval and DrawLinePath.

1) Does it make sense to use SmartGWT for only drawing shapes and using GWT for other things like layouts/widgets/RPC/etc?

2)I know that it is recommended to not mix GWT and SmartGWT, so I want to know if I can safely use drawing widgets with other GWT components.

3) Is there better alternative than SmartGWT for drawing?

Thanks.

1

1 Answers

1
votes
  1. Nope, your approach is not a good one because of the answer to your second one.
  2. No, it is not safe, as it is not recommended. Better only use SmartGWT components for your UI elements. But I suspect that you are a bit confused here. Only UI elements are not to be mixed. All the other facilities of GWT (i.e. RPC mechanisms), can, and actually will be required to, be part of your solution.
  3. I see the following options:

    • Use SmartGWT UI elements for all your layers/widgets and of course use the drawing shapes you have identified to create your solution.
    • Use GWT elements and use other drawing libraries to achieve your goals. Such can be: gwt-connectors, raphaelgwt, lib-gwt-svg, depending whether connectors or simple lines are enough for your specifications.
    • Use SmartGWT UI elements and embed one of the above libraries to cover cases that the provided elements can't support. This can be tricky as the success of such marriage is not always guaranteed, but it can't be dismissed either. I had success, with such an approach, by using the lib-gwt-svg.