Reputation:
The so-called "14 Golden Rules of High-Performance Websites" are:
Rule 1 - Make Fewer HTTP Requests
Rule 2 - Use a Content Delivery Network
Rule 3 - Add an Expires Header
Rule 4 - Gzip Components
Rule 5 - Put Stylesheets at the Top
Rule 6 - Put Scripts at the Bottom
Rule 7 - Avoid CSS Expressions
Rule 8 - Make JavaScript and CSS External
Rule 9 - Reduce DNS Lookups
Rule 10 - Minify JavaScript
Rule 11 - Avoid Redirects
Rule 12 - Remove Duplicate Scripts
Rule 13 - Configure ETags
Rule 14 - Make AJAX Cacheable
I'm wondering which ones GWT addresses auto-magically for its developers. For instance, as a single-page app, I'm sure Rule #1 (fewer HTTP requests) is covered under the hood. But what about Rule 9 (reduced DNS)? Rule 13?
Of these, the only one I don't think is applicable to any web framework is #2 (CDN), so let's pretend that's not on the list. So I ask: of the remaining rules, which ones does GWT address, and which ones does it not?
Upvotes: 2
Views: 193
Reputation: 64541
ClientBundle
will inline resources (CSS, images as data:
URLs); historically, ImageResource
s are composed into "CSS sprites" for IE6/7 (support for IE6/7 will be removed in the next version of GWT, but spriting is still possible behind a switch). RequestFactory
does batching (this can be achieved with GWT-RPC too, using a command pattern and custom wrappers)xsiframe
(or xs
) linker, your scripts don't need to be hosted at the same origin as the HTML host page (xs stands for cross site) so that they can be served by a CDN<inherits name="com.google.gwt.precompress.Precompress"/>
to your gwt.xml file to have the GWT compiler automatically produce gzip'd files (they're generated alongside the original uncompressed files, but you can turn off generation of uncompressed files by adding <set-configuration-property name="precompress.leave.originals" value="false" />
to your gwt.xml file; compressed files will have a .gz
extension; and by default only .html
, .css
and .js
files will be compressed)CssResource
s for CSS though, and that rule doesn't apply there either (the rule is about download order/priority)PopupPanel
, but it's only for IE6/IE7 so it'll be removed in the next version of GWT; and I don't think it had a real impact on performances anyway.RequestBuilder
, XMLHttpRequest
or JsonpRequestBuilder
, but GWT only provides the client side of it, you're responsible for the server-side hence cacheability)Upvotes: 8