idea: i18n dynamic templating ? (like wordpress), feedback

81 views
Skip to first unread message

Ed

unread,
Mar 7, 2015, 4:39:13 AM3/7/15
to google-web-tool...@googlegroups.com
Please some feedback on the following i18n dynamic templating idea:
1) Have text in separated files like xml (or json).
2) Have all html/css in html pages.

All wil recognize this approach, it's no rocket science, but I miss it.
I noticed there are some ideas/projects like dynamicUiBinder out there that come close, but not enough.
I think there also bigger frameworks that use gwt as frontend that have something like this (but I don't want to use the "whole" framework).

Both 1) and 2) are lazy loaded from the backend when needed and merged to create the html snippet/page.

Reasons?
a) High productivity: The web designer/developer can focus entirely on creating the html/css pages/snippets. I always get frustrated that I have to do too much css/html stuff as a gwt developer while others can do this much better.
b) Flexibility: Changing some html/text without having to change the gwt code (-> rebuild/deploy/test). Existing Cms tools/frameworks can be used to update the text and html/css and publish the updated files that are then used by the existing gwt code.
c) Dynamic multi language support: all texts are contained in separated files. By starting up the app with another parameter value (through url query param or in in the index.html), another language files are loaded.

I think it's comparable with the Wordpress approach: you download a wp template and put any text in your want through the wp admin.

Currently I have half this approach (using it for years now): all texts come from cms xml files (managed by hand or in the future a admin/cms tool). This works well, all xml files are lazy loaded when needed. They currently contain a bunch of html that is further decorated by gwt code (adding buttons, form fields, etc..).

My main reason is that I want to boost productivity and let every developer do what he does best. Currently I find that hard, as css/html isn't well separated such that it can be easily used by html/css/web developers that aren't gwt developers. At the end of the day, I am doing too much html/css that I don't want to do as others can do that much better/faster.
Nowadays it's common to do the html/css abroad much cheaper (and better), but that's difficult when using gwt (did it several times).

The way of work:
1) A html/css expert take the design input (photoshop/sketch/etc...) and create the html pages/snippets.
2) The html files are further decorated by the gwt developer such that can be decorated/used by his gwt code: replacing the text by labels; putting the text in the cmsl xml files; adding id's to further decorate it by the gwt code.

The idea is that the html snippets/files will stay the main working doc for both the gwt and html/css developer, such that it's directly used by both: that makes it easy to make changes and directly use them.
Currently, html files are often translated to some html snippet (UiBinder) that is usable for the gwt developer, but not anymore for the html/css developer, that leads to misunderstanding/bugs/delays/frustration/etc...

Please your feedback? (how do others solve this problem currently ?)

I want to build the other half somewhere in the coming months.
How does this fall in place with the upcoming gwt releases (web components approach) ?

Jens

unread,
Mar 7, 2015, 5:08:55 AM3/7/15
to google-web-tool...@googlegroups.com
At least the template stuff kind of sounds like Errai UI. See html files in https://github.com/errai/errai-tutorial/tree/master/src/main/java/org/jboss/errai/demo/client/local

-- J.

Ed Bras

unread,
Mar 7, 2015, 5:23:25 AM3/7/15
to google-web-tool...@googlegroups.com
@Jens: thanks for your feedback. I looked at it. I like the component-based annotation approach. 
It sure gives me inspiration. It would be nice if this templating mechanism can be used independently of the rest of the platform (haven't looked at it yet), and that it's flexible to extend it (It extends Widget which for me is obsolete, don't use it anymore except for the root) 
Reply all
Reply to author
Forward
0 new messages