Parameter handling
The code in the sample app is still ugly in places, but is starting to take shape.
URI Decoder
I have used a more strict interpretation of the UriFragment than Vaadin does by default, and made it a requirement that the URI structure is of the form:
http://example.com/domain#!finance/report/risk/id=1223/year=2012
where:
finance/report/risk/
is a "virtual page path" and is represented by a View implementation, and everything after it is paired parameters.
This is not as flexible as the standard Vaadin approach - but I just prefer it. It could easily be changed by using a different implementation of URIDecoder.
Site Map
The approach I have taken with the Guice based View provider means that I can put all the mapping of View name to View class in one place - in effect, a site map. At the moment it is part of the provider, but needs to be separated out.
No comments:
Post a Comment