2.7. Understanding modules vs. packages

Every GWT application/project will contain Java packages and GWT modules. You’re probably fairly familiar with Java packages; they’re a way of encapsulating related Java classes and/or functionality together under a single namespace.

 

Definition

Java package—Encapsulates related Java classes and functionality under a single namespace. They’re useful, among other reasons, for the separation of logical units of code.

 

The application you’ll create shortly will have a package called com.manning.gwtia.ch02.client, with a single Java class file.

GWT overlays a parallel module structure in the source code, which is invisible and inconsequential to the Java compiler but is visible and important to ...

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.