Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use ClientBundle in a large Enterprise Application?

Tags:

gwt

We're building a large enterprise application (dozens of modules) with GWT and need to decide whether to use ClientBundle or not. I was curious what pros/cons the StackOverflow GWT community view as deal makers and deal breakers for such a use case.

As far as we see it currently:

Pros

  • All images/css files that take up server resources to download are eliminated
  • Client loads faster because of the above (i.e. inlined image urls)
  • CSS names are obfuscated, so namespace collisions are eliminated
  • CSS is automatically optimized / verified
  • Unused CSS classes are eliminated (above)
  • Java reference to class names are replaced with refactorable css interfaces
  • UiBinder reference to class names are replaced with refactorable css interfaces
  • No more big "main.css" fails as resources are module bundle specific

Cons

  • For maintenance CSS becomes either unreadable in obfuscated mode, or extremely verbose in debug mode
  • More steps needed for basic CSS work (like adding class)
  • All devs must know Java,CSS,HTML nuances
  • CSS3 and other at-rules (i.e. @font-face) are not supported by GWT natively
  • Increased compilation times

Thanks!

like image 296
Joseph Lust Avatar asked Nov 07 '11 21:11

Joseph Lust


1 Answers

I have been using client bundle heavily in m-gwt.

One thing that was bothering me was styling for devices that did not have dev mode. So styling could mean recompiling the complete app.

Mostly all CSS3 Rules can be used in ClientBundle by using the literal function, so that should be okay. It gets a little tricker with @media queries. You can inject the css as a simple textresource as a workaround, but its kind of ugly.

When you are talking about several gwt modules, consider using multiple clientbundles so you can still use split points to keep the download file size under control (Depending on how big your .js files get)

I have used clientbundles in several big gwt apps and for me compile time checking and refactoring support beats the little quirks that are still in client bundles.

like image 173
Daniel Kurka Avatar answered Sep 27 '22 22:09

Daniel Kurka