JavaScript components questions

I am trying to build new map add-on based on Leafltet. I know that there is another one called v-leaflet. I tested it and works ok, but it seems to be uncomplete and is GWT based, so i am trying build a new add-on using the new Vaadin 7 JavaScript component posibilities.

It’s a goal that also serves to my purposes of evaluating Vaadin as the future framework to build web applications on the company I work and specially the task of expanding it’s posibilites with third party JS components (that is, the framework openess to the many new JS components).

My first question is about the approach i have decided to follow… is there any good reason to build a JS library based add-on using GWT? It seems to me that the pure JS solution is better, removing the intermediate GWT layer so the development process is faster, the solution less complex and, at the same time, I am able to add Leaflet plugins or adapt it to new requirements with less effort. What do you think about it?

On the other hand, a map component is not a monolithic one in the sense that it has some child elements like layers or popups. For me, the map component has too many variables to be represented on single shared state object, many of them nested like a map having layers and a layer having markers. I think it should be better to split the design having a dedicated state and connector for each layer, for example. It’s there such a thing like child states/connectors for non-visual subelements on JS based components?

Thanks in advance,

  • Oscar