which is better in GWT interface, using the normal MVP with javacode, or UiBinder?? from performance, editing, simplicity aspects.
相关问题
- How to run GWT in production mode
- Google Guava 15.0 Error with GWT 2.5.1?
- Javascript instanceof & typeof in GWT (JSNI)
- How do you let UiBinder pass tags without binding
- Maven submodules in eclipse: Resources from one mo
相关文章
- Spring NamespaceHandler issue when launching Maven
- Annotation for GWT compiler to ignore method
- getComputedStyle like javascript function for IE8
- Uploading to Blobstore gives a Java heap OutOfMemo
- GWT ,Vaadin,SmartGwt,ExtGwt ?---from Swing [closed
- GWT JDBC LDAP connection fails
- How do I get the server-side exception message wit
- Best architecture for applications in GWT
This is what Google says:
So probably judging by the points you mentioned, UiBinder provides more advantages. However, I wouldn't do everything in UiBinder. Just start with it, and you'll find out, where a little bit of pure code might be a better (or the only) choice!
The direct answer to your question is : BOTH! :)
Simply build the MVP architecture then build each VIEW using the UiBinder. This is what I have been doing and it work perfectly. UiBinders can be attached to whatever class you want, as long as it has the same name as your class. (EX: YourView.java + YourView.ui.xml)
There is a tutorial in GWT doc that explain the UiBinder, although it's missing many important point.
I will soon be releasing a project with that architecture on Google code using the GPL. If you're interested, I can add the URL here when it's out so you can have a direct example of how they work together.
I also suggest you use ClientBundles for all your CSS and Images. If you want argument on the matter, there is plenty in GWT tutorial of ClientBundles. I've also integrated them perfectly with my MVP+UiBinder architecture and it work like a charm. The only problem here is that the ClientBindle tutorial was missing many important information so I had to play around a lot to make it work perfectly.
For each VIEW, I'd always use UiBinder. But for some simple Composite (homemade widget), I'd say it is sometime best to use direct javacode as Chris_l said.