11.2. Should you use JavaScript Native Interface?

This is a question that can lead to some heated debates. It normally revolves around whether or not you have a background as a Java or JavaScript developer when you come to GWT. In the same way that many years ago a debate persisted about assembly versus high-level languages, some JavaScript developers continue to dispute the need or reason for GWT, and some GWT developers still can’t fathom why anyone would use JavaScript.

We’ll sit on the fence for a little while. Clearly we think GWT is the best approach, but we do recognize that in rare occasions JSNI is needed. We’ll look at the reasons why, in general, you shouldn’t use JSNI in your applications as well as where it might make sense. Let’s ...

Get GWT in Action, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.