Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There can be issues if you have team who is not conversant in both HTML/CSS/JS &amp; GWT/Java. Let's assume you have rock starts, which you should strive for. Then you want to get the following CSS GWT benefits:</p> <ul> <li>No string literal class name references</li> <li>No CSS namespace conflicts/pollution</li> <li>Minimization of CSS classes (compress selectors and properties)</li> <li>Compiler optimization of CSS rules (combine similar rules), exclusion of unused rules</li> <li>Compiler time checking of CSS validity and missing classes</li> <li>No heap of external CSS files</li> <li>No issues when running DevMode in remote mode (otherwise browser pulls remote CSS, not new CSS you're working on)</li> </ul> <p>I find the best way to do so is with the UiBinder &amp; the Java class for that UiBinder, all in one place. See below example. This will in my experience produce the most robust, compressed, fastest, reliable app possible, and adds no additional files.</p> <p>Everything is in one place: </p> <ul> <li>CSS defined in UiBinder, where it's used</li> <li>CSS interfaces defined in Java file, where they're used</li> </ul> <p>Widget</p> <pre><code>class MyClass extends Widget { ... // jave UI binder class public interface MyStyle extends CSSBundle { String someClassName(); } @UiField MyStyle style; ... something.setClassName(style.someClassName()); ... } </code></pre> <p>UiBinder</p> <pre><code>&lt;!-- UiBinder File --&gt; &lt;ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'&gt; &lt;ui:style type='com.my.app.MyFoo.MyStyle'&gt; .someClassName { background-color:pink; } &lt;/ui:style&gt; &lt;div class='{style.someClassName}'&gt;Sample text.&lt;/div&gt; &lt;/ui:UiBinder&gt; </code></pre> <p>I've asked this question before, check it out <a href="https://stackoverflow.com/questions/8042977/use-clientbundle-in-a-large-enterprise-application">here</a>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload