在大型企业应用程序中使用ClientBundle? [英] Use ClientBundle in a large Enterprise Application?
问题描述
我们正在用GWT构建一个大型企业应用程序(数十个模块),并且需要决定是否使用ClientBundle。我很好奇StackOverflow GWT社区视为交易者的利弊,并为这样的用例提供破坏者。
就我们目前看到的而言:
$ b $ p 优点
- 所有图像/ css文件占用消除了服务器资源的消耗
- 由于上述原因,客户端加载速度更快(即内嵌图像url)
- CSS名称被混淆,因此命名空间冲突消除了
- CSS自动优化/验证
- 未使用的CSS类已被删除(上)
- Java参考将类名替换为可重构的css接口
- 对类名的UiBinder引用被替换为可重构的css接口
- 没有更大的main.css由于资源是特定于模块绑定的,因此失败
缺点 谢谢! 我一直在大量使用客户端软件包 m-gwt 。 困扰我的一件事是设备没有开发模式的样式。因此,样式可能意味着重新编译完整的应用程序。 大多数情况下,所有CSS3规则都可以通过使用文字函数在ClientBundle中使用,所以应该没问题。它可以通过@media查询获得一些小技巧。你可以注入一个简单的文本资源作为一个解决方法,但它的一种丑陋。 当你在谈论几个gwt模块时,考虑使用多个客户端软件包,这样你就可以仍然使用分割点来控制下载文件的大小(取决于你的.js文件的大小) 我在几个大的gwt应用程序中使用了clientbundles,对我来说编译时检查和重构支持击败仍在客户端捆绑中的小怪癖。 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 Cons Thanks! 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. 这篇关于在大型企业应用程序中使用ClientBundle?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!