设计 GWT 应用程序样式的最佳方法是什么? [英] What is the best approach towards styling GWT applications?

查看:32
本文介绍了设计 GWT 应用程序样式的最佳方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

GWT 中的一般方法是使用面板,然后应用自定义 CSS 主题来获得自定义外观.虽然我可以通过修改 CSS 实现一定程度的 GWT 应用个性化,但我想知道其他人通常如何处理样式.

General approach in GWT is to use Panels and then apply custom CSS themes to get a customized look. While I can achieve a certain extent of personalization of my GWT app through CSS tinkering, I was wondering how others generally approach styling.

我在网上遇到的一些建议是通过使用 HTMLPanel 的纯 HTML 来管理布局.通过这种方式,人们可以直接在应用程序中使用 HTML 模型,而无需编写所有布局.

Some of the suggestions I came across the web were to manage layout with plain HTML, through use of HTMLPanel's. This way one can straightaway use the HTML mock-up within the application without having to code all the layout.

那么在您看来,处理 GWT 应用程序的布局和自定义样式的最佳方式和最不痛苦的方式是什么?

So what in your opinion is the best and least painful way to approach layout and custom styling of GWT application?

推荐答案

这完全取决于您、您的经验、您的团队等:

It all depends - on you, your experience, your team, etc:

  1. 通常/较旧的方法面板、小部件和合成将更容易使用/更熟悉:
    • 如果您是一名对 Swing 等框架有经验的 Java 程序员(我认为这就是 GWT 团队的重点),
    • 或者,如果您通常来自桌面世界".
  1. The usual/older approach of Panels, Widgets and Compositing will be easier to work with/more familiar:
    • If you are a Java programmer experienced with frameworks like Swing, etc. (I think that was the point of the GWT team),
    • Or if you come from the "desktop world" in general.
  • 如果您刚刚开始使用 GWT 体验,推荐使用(似乎 UiBinder 将继续存在,它比上述方法具有更大的灵活性),
  • 如果您有 Web 开发经验(或使用标记的桌面框架,如 .NET 的 XAML 等),则推荐使用,因为您将在熟悉的 HTML/XML 世界中工作,
  • 如果您在更大的团队中工作,并且您已指定设计人员负责 Web 应用程序的外观(而他们不了解/关心 GWT).将布局切割为 HTML 代码对他们来说应该非常简单,您只需很少的工作就可以将这些模板转换为 UiBinder 的 XML 模板.

以上方法都不是完美的——这就是为什么了解它们的优点和缺点是值得的——但最终的决定应该由你自己决定,因为你最了解你/你的团队的能力:)

None of the above approaches is perfect - that's why it's worth to know their strong and weak points - but the end decision should be yours alone, since you know your/your team's capabilities best :)

这篇关于设计 GWT 应用程序样式的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆