Is it possible to separate totally the HTML/CSS layout from the GWT logic?

好久不见. 提交于 2019-12-23 10:08:36

问题


I'd like to allow our web developers to continue to work in pure HTML and to let developers to write GWT Java-only code to write the rest of the business logic.

Is it even possible?

Have anyone tried to work with the web developers in the GWT environment?

How do you incorporate the web developers into the GWT development process?


回答1:


Essentially what I'm looking for is something like either DeclarativeUI (http://code.google.com/p/google-web-toolkit/wiki/DeclarativeUi) or UIBinder (http://code.google.com/p/google-web-toolkit-incubator/wiki/UiBinder).

According to the GWT Blog the UIBinder just moved to incubator stage and will not be available by GWT 1.6 timeframe, but much later.

Is there any other way at this moment?




回答2:


If by HTML, you simply mean the layout and styling (not the content of the widgets themselves), then yes, I would say that this is completely possible.

GWT makes it fairly easy to seemlessly combine HTML code (with its own IDs, classes, and associated CSS) with GWT widgets. Many of the GWT widgets themselves are fairly thin wrappers over normal HTML controls, and can therefore be styled easily themselves.

Essentially, the webdevelopers give you the HTML/CSS files, and you make sure that the interactive parts have ids on them. Then your Java GWT code calls RootPanel.get() with these ids and adds the interactive content.

Its hard to be more specific about what is and isn't possible with this approach without seeing more of your specific requirements.



来源:https://stackoverflow.com/questions/766149/is-it-possible-to-separate-totally-the-html-css-layout-from-the-gwt-logic

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!