I think this is completely unmaintainable
I do not agree with you. Large number of small files is much better for maintenance than couple large files. I agree that GWT is much more verbose than Spring MVC:
- You do not need all these interfaces because of dynamic nature of JSP
- JSP in Sppring MVC case is not strictly typed and give your abilities to do many low level things automatically (for example data binding).
- And do not do some things at all (no need to clean up view between requests, view is stateless).
In a case of GWT due to strict nature of Java and statefull view you must do a lot of additional work. It is completely maintenable (if it is done correctly). Main advantage is that you can add unit tests for your presentation layer. Due to this fact it will be more maintenable for long running projects with complex UI, large codebase and big team. If it is not the case for you project (screens are simple and you do not plan to add unit tests for UI layer) then it may be better to:
- use some another more lightweight presentation technology (Spring MVC for example).
- or simplify your policy (for example allow presenter -> view interactions without interfaces). Normally you lose ability to unit test your presenters in this case. As mentioned by @Andrea Boscolo you can use GwtMockito as a workaround for this problem!
Two another advantages of interfaces between view and presenters:
- You can easy switch view implementation (famous case about making desctop UI -> mobile UI switch that unfortunately I never saw implemented)
- For me it is some kind of barrier that help keep presentation logic in presenter. Presenter know only about necessary things. I like this concept. This helps me write all pieces in right places.
What is really annoing with all these files is that it takes much time to setup one activity. To simplify it:
- Ensure that you use UiBinder template in eclipse
- Even more, you can write your code generator that will take activity name and package as parameters and then it will generate all necessary things. So you need just modify ActivityMapper and start writing important UI logic. It is done for my current project and makes me happy.
Another source of boilerplate is data binding. Consider using editor framework.