Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7665233
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T14:30:41+00:00 2026-05-31T14:30:41+00:00

I am wondering what the best practices in developing an application where an external

  • 0

I am wondering what the best practices in developing an application where an external CSS developer is involved in designing the look and feel of the site?

Ideally, they would be creating CSS files that we could easily integrate into the site over multiple iterations, and the development team would not have to do any manipulation of these files (obviously there would be HTML or template changes to point to the appropriate classes).

GWT documentation (http://code.google.com/webtoolkit/doc/latest/DevGuideUiCss.html) lists four approaches:

  1. Using a tag in the host HTML page.
  2. Using the element in the module XML file.
  3. Using a CssResource contained within a ClientBundle.
  4. Using an inline element in a UiBinder template.

The documentation suggests that modern applications would tend to use approaches 3 and 4, however these seem intrusive to the development process, as we do not want to have to constantly update CssResource interfaces with changes to the CSS each iteration (in approach 3) or have to chop and split the CSS files to inline them into our ui.xml files (in approach 4).

We are thinking of using approach 2, and hand coding the CSS classes. This would allow us to easily drop in CSS file updates and not have the developers need to touch them. We would lose obfuscation and there would be some work to manage changes to CSS names, though no more than the other approaches. Are there any other considerations I am missing?

Is there a best practice for building GWT applications where external CSS designers are involved?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T14:30:42+00:00Added an answer on May 31, 2026 at 2:30 pm

    There can be issues if you have team who is not conversant in both HTML/CSS/JS & GWT/Java. Let’s assume you have rock starts, which you should strive for. Then you want to get the following CSS GWT benefits:

    • No string literal class name references
    • No CSS namespace conflicts/pollution
    • Minimization of CSS classes (compress selectors and properties)
    • Compiler optimization of CSS rules (combine similar rules), exclusion of unused rules
    • Compiler time checking of CSS validity and missing classes
    • No heap of external CSS files
    • No issues when running DevMode in remote mode (otherwise browser pulls remote CSS, not new CSS you’re working on)

    I find the best way to do so is with the UiBinder & 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.

    Everything is in one place:

    • CSS defined in UiBinder, where it’s used
    • CSS interfaces defined in Java file, where they’re used

    Widget

    class MyClass extends Widget {
        ... // jave UI binder class
    
        public interface MyStyle extends CSSBundle {
            String someClassName();
        }
    
        @UiField
        MyStyle style;
    
        ...
        something.setClassName(style.someClassName());
        ...
    }
    

    UiBinder

    <!-- UiBinder File -->
    <ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'>
    
        <ui:style type='com.my.app.MyFoo.MyStyle'>
            .someClassName { background-color:pink; }
        </ui:style>
    
        <div class='{style.someClassName}'>Sample text.</div>
    
    </ui:UiBinder>
    

    I’ve asked this question before, check it out here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to web development and am just wondering about best practices for java
I was wondering about some best practices for data binding in web forms. For
I'm wondering if anyone has any best practices for automating the testing of installers
I was wondering if people would share their best practices / strategies on handling
I think this is just a Best Practices question, but I was wondering if
I am wondering what the best practices are for creating non-loggable accounts. On StackOverflow,
I'm new to Flex, and I'm wondering about the best practices when it comes
I am wondering if there are best practices for deciding between when a system
I'm wondering, are there any guidelines or best practices on when to use sessions
I am wondering whats the best practices regarding functions and objects. For example I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.