India Meetup Group Q&A Session

Hi,

I’m afraid this is an issue we just cannot fix. WebSockets in Tomcat 7 are still very fragile and everything is not possible. If you can upgrade to Tomcat 8, or some other server like jetty, the issue should be resolved.
See this change
for more details.

cheres,
matti

  1. This has been on a list of possible technical articles for too long. Hopefully we can cover this soon. Practically my suggestion is use TestBench (or plain Selenium/WebDriver), write clean well structured cases, code “that is a story”. This way you’ll get the whole user stories written and can see in your test statuses how your application proceeds while doing actual development. And, you are testing the whole stack.
  2. With Spring and Vaadin and Hibernate, my suggestion is to grab
    vaadin4spring
    , use Spring Data JPA (hibernate by default) and just inject the auto generated repositories. This is very easy to do, I have used that in some examples. I also created an enhancement ticket to
    vaadin4spring project
    . If somebody wants to contribute to this effert, this would be an easy place to start.

As with other web apps. Just ensure it is serializable, so it can be moved to another server if for example one server goes down for maintenance. In any case, I suggest to use sticky sessions, as it is more efficient for the cluster. Also the session don’t necessary need to be serializable either, but then you’ll lose HA features and session failover.

UI.setPollInterval(milliseconds) or enable constantly open communication with @Push annotation and changes will happen right away.

Pretty much standard tools will do: browser inspector and java profiling tools for the server side. There can be various reasons which cause it, but most often it is a badly optimized DB query :slight_smile: One Vaadin specific helper is a dialog one can open in browser with “?debug” query parameter. With that you can see if latencies happen with the request (on server side) or in the browser (might be the case with lots of visible components and slow devices/browser, like IE6).

Definitely maven:

  • Commonly used elsewhere in the industry
  • Not just a package manager, but also does builds and adds project meta data
  • Excellent IDE support, your developers can use their IDE of choise without hazzles

A thing to note is that, although some of our eclipse plugins features are “tied” to IVY, you practically don’t need them with maven build. Maven build will update your versions, theme and widgetset, with a nice IDE integration, and the visual designer is there for you with maven builds as well.

TestBench eases writint tests quite a lot compared to plain selenium, but there might still be some things that need to be tackled by developers anyway. I always emphasis that test development shouldn’t be considered as a trivial task, often it might be even harder to do it well than to do the actual application developement. And this is not specific to web app development or vaadin development.

If you want to get started efficiently with TestBench, I suggest to order a training from our experts to your team. You’ll easier learn best practices for testing with Vaadin TestBench.

If you think there is a bug in TestBench itself, you should definitely file it to dev.vaadin.com. A new version is coming out soon so small issue might get fixed for that already.

This is quite generic “issue”, not even related to Vaadin: quering the size of a SQL table is very expensive in some cases. The bad thing is that if you want your entities in a “lazyloading” data table like we have in Vaadin, we just need to have the number for rows available.

If quering size is expensive, I’d first try to cache the value somehow. If not possible you probably just have to ditch lazy loading form you user interface and e.g. just always use a limit clause in your query and do “standard paging”. This is naturally possible with Vaadin as well. I think there are some helpers in the vaadin.com/directory.

I don’t remember that there is built in server side API to do the traditional “Are you sure you want to leave the page?” question. But with JavaScript you can add such a verification as with any other web application.

A built in feature like this might be handy. Dare to write an enhancement ticket to dev.vaadin.com ?

No built in features, but you can hook to pretty much any java authorization framework. Both Vaadin CDI add-on (for java ee world) and vaadin4spring add-on have some helpers to implement role based access control. Check out
this example
, it uses shiro, Vaadin CDI and runs on Java EE 6 servers. It currently just checks roles in the code to enable editing of user database, but we plan to add examples of views that only appear for “admin” role. If I remember correctly it happens simply by adding @RolesAllowed(“admin”) annotation to the view class.

Try
beanutils
or SerializationUtils for cloning, apache commons libraries are excellent helpers, don’t hesitate to use them in any java apps. You could also suggest implementinng Cloneable to dev.vaadin.com.

Could you post a code examle for your donut thingie?

No plans currently, but our experts can use airplane if necessary and it wouldn’t be the first time for them to travel to India. Online support is of couse available to all over the world.

Lots of large enterprises, and several large enterprises are implementing their Vaadin apps by India. See our
“who is using”
page for some references. As Vaadin is an OS product, we naturally only know a fraction of the users.

Try using maven archetype
“vaadin-archetype-widget”
as a basis. Then look help from
the Book
and
minitutorials
. You should get pretty far. But indeed, a tutorial for this would be awesome too, tutorials are great ways to get the basics.

Most often you need to do nothing. We try really hard not to break backwards compatibility. Just full rebuild (with the GWT compilation if you have client side extensions).

And yes, we have all the APIs you need to do extensions. As a proof you can scroll through the almos 500 extensions available in
the Directory
:slight_smile: And note, that there are also some that are not published there.

Thanks for all the valid questions raised! I case you have any other questions later, feel free to create new threads to generic groups of our forum. Our whole community is here to help you.

And when you need professional support, with guaranteed response time, our
pro support
is the service to use. There all questions are handled under NDA, so you can also share some “secret” code snippets easier and answers are easier to give.

Thanks!

Thanks Matti,

For your reply. I will think about writing a tutorial series and contributing back. May be this could help someone who are in real need. By gods grace, till date have not written a single Client side widget, but feel like this doesn’t lasts long.

Thanks,
Krishna.

Wow, nice to hear you have such a long history with Vaadin. You can contact me (sami.kaksonen@vaadin.com) and I’ll setup a meeting where we can go through the benefits of being a Vaadin Solution Partner in more detail.

Hi,

Could some one help me how to use latest browser CSS hacks in vaadin 7 SASS?
Like… below,

@-moz-document url-prefix() { .btn-delete { color:#999; } } The problem is vaadin 7 sass compiler fails to compile above code and gives below error,

com.vaadin.sass.internal.parser.SCSSParseException: Error when parsing file D:\ARM\ARM2WM\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\WWM_UI\VAADIN\themes\wwmtheme\wwmbutton.scss Encountered "@-moz-document" at line 46, column 1. Was expecting one of: <S> ... "}" ... "+" ... ">" ... "~" ... "[" ... "*" ... "&" ... "." ... ":" ... <INTERPOLATION> ... "@include" ... "@debug" ... "@warn" ... "@each" ... "@if" ... "@extend" ... "@content" ... <IDENT> ... <VARIABLE> ... <HASH> ... "@media" ... "@page" ... "@font-face" ... <KEY_FRAME_SYM> ... <ATKEYWORD> ... So,unable to target latest mozilla and IE browsers with hacks starts with @ symbol…
Any help would be great!! on this…

Thanks,
vijay

Hi,

Is it possible to write clientside javascript in Vaadin?

Hi, I’m really no sass expert, but if your think its a bug in our sass compiler, fill a ticket at dev.vaadin.com. A workaround is to use the original ruby based compiler until that is fixed. You pretty easily hook a maven plugin to do that without installing anything special, but you’ll need to extract valo files form vaadin-themes.jar as the ruby compiler don’t check for files from classpath.