开发者

How do you manage static contents/pages with gwt?

I have been using Django with GAE/Python and recently I have been considering switching to GAE/J and GWT. My questions are

1) Is there a way to do hierarchical templating similar to the Django template system?

2) How do you manage static contents with/along with GWT in general?

I have been digging around quite a bit but I haven't been able to find something satisfactory. Here's a summary of the possible solution (I don't know if my conclusion of them are accurate though since I am not that familar with java tech.)

a) Use various java frameworks/template engine (Spring, FreeMarker, StringTemplate, Velocity, etc) but is it possible to mix use these with GWT?

b) Use Django with Jyphon... but then I am not really using GWT+servlet any more right? (And lose things like GWT RPC?)

c) Use JSP straight ... but there doesn't seem to be hierarchical template. As I type this I did some search and some have referenced Tile (http://stackoverflow.com/questions/490390/jsp-template-inheritance) does that work well with GWT?

d) Use GWT UiBinder. Base on the description of the dev guide, this seems to be exactly what I needed but then the examples I see are small and it seems to be best suited for layout of widget as oppose to a开发者_高级运维 page. And using UiBinder means that the page is still js generated right? (not crawlable, etc?)

Again, some of the conclusion above could be wrong since I am new to the server side java tech. Please correct me if they are inaccurate.


For Templating try Sitemesh -- very easy to setup and use. I'm currently running an application on GAE with Spring/Sitemesh/GWT. The only reason I chose to use java is that GWT-RPC is written for it. The biggest problem with using Java on GAE is the cold-start issue: read this post This actually is a huge obstacle, so think twice before moving to Java.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜