Reputation: 3163
I'd like to support internal links to my web application (eg a user could receive a confirmation email with a link to his purchase/reservation/whatever inside the app). I'm using Vaadin framework to build my web application GUI. I know Vaadin 7 will support this feature, but it was not released yet; therefore, I use Vaadin 6.
From the documentation, I see 2 methods:
1) UriHandler Doc: https://vaadin.com/book/-/page/advanced.resources.html URL example: www.app.com/reservation/123
2) UriFragmentUtility Doc: https://vaadin.com/book/-/page/advanced.urifu.html URL example: www.app.com#reservation123
I've built an example with the 2nd method and it works. It seems to be that I could achieve similar results with UriHandler, is that right? If so, what are the advantages and disadvantages of each method?
Thanks in advance.
Upvotes: 2
Views: 1794
Reputation: 3155
Navigating to a URI Fragment within the same URL - essentially using an HTML Anchor - will not force the browser to reload the entire page. A different URL will.
If you application has a header/content/footer design, then using a UriHandler will make the browser re-layout the header and footer on each navigation. This will be evident to the user. A URIFragmentHandler will not need to do that.
I'm not aware of any advantages of the UriHandler over a UriFragmentUtility, other than the aesthetics of the URL itself. We're successfully using a UriFragment approach in a large application (hundreds of screens), to good effect.
Upvotes: 3