Wednesday, December 25, 2013

Re: organizing modules and CSS resources

I noticed that there is much more overhead. But what is the benefit over the simple approach?

CSS is embedded in your final JavaScript so you do not have to make an additional request to fetch the *.css files of your widgets. Also you don't have to care about CSS name clashes as GWT will rename all CSS classes to make them shorter and unique. You also gain compile time checks because you now need to use method calls to set style names and the GWT compiler will complain if a method call does not have a corresponding CSS class in your CSS file.

But of course there is also a draw back: Building themes for your app that can be changed on the fly is a lot more tricky now.

-- J.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment