Accessing Local Storage per HTLM 5 Spec

I am wondering if there will be an add-on or capabilities to access local storage for Vaadin 6 or 7. I am trying to decide if I should develop a new application using Adobe Air, Vaadin, Ext JS or some other technology that would give me local storage. Any thoughts on this?

Thanks,
Tom

At the moment there is no such add-on, but you can fairly easily build one yourself.

That said - what would be the use-case for local storage in a Vaadin application?

The use case would be as follows:

We are building an application that is used in the medical field. There are lookup tables that have 10’s of thousands of rows. We’d like to locally store them so that the client can look up codes from local storage rather than incur the round-trip to the server.

Being an Adobe Air developer, we have access to a local DB where we can store large code tables and just synch the updates or differences. This capability is one of the main reasons for using something like Air.

We also may want to allow a user to work off-line and still have access to the code tables. Again local storage would facilitate our ability to do that.

As a pro support subscriber, is it possible to get examples of how to build something for local storage?

Lastly, as we continue to evaluate tools, we must consider using one of the JS toolkits that may provide us easier methods for accessing local storage. How does using Vaadin help us quiet the HTML 5 debate?

Thanks for your help in this.

Tom

If this is a significant requirement, may I suggest that Vaadin is possibly not the best framework for this - it’s almost orthogonal to Vaadin’s strengths.

Vaadin is a server based application framework. That may change in the future, but I think it would be very very far into the future.

You can absolutely write widgets that will access local resources - if you can do it in javascript and a browser you can do it in a widget - and I can see large code-lookup tables being a good usecase for accessing storage via HTML5, but you can’t write a Vaadin Application that works completely “offline”; it must have access to a web server.

I think what I’m trying to say is this - if working completely offline is a major part of the project, you’ll be working against Vaadin most of the way. I believe Vaadin is a great web application framework, but it’s not the right for for every project.

Cheers,

Charles.

Hi,

As Vaadin uses GWT on the client side we are rather lucky. GWT has quite nice local storage API. You could use that to build your client side cache:

http://code.google.com/webtoolkit/doc/latest/DevGuideHtml5Storage.html

As Charles said, Vaadin is still (and IMO will be) a server side framework. I’d say that the thing you are trying to achieve is not impossible, but you’ll lose essential feature of Vaadin: everything is coded on the server side in a JVM and because of that it is extremely simple to work with. You’ll end up to the common web development h€|| when throwing in lots of client side logic - probably something that you really tried to avoid when choosing Vaadin.

I’m not that worried about lack of offline mode by myself. Mobile data networks are becoming better and better all the time. I thing most apps can already rely on the network today, even on mobile devices. Still I’ve been planning to create some kind of pure GWT “offline mode” (most essentially for TouchKit). That should really be just some sort of light weight fallback mode and when you you get online you would again get your full featured Vaadin UI with all bells and whistles. Consider our Vornitologist (TouchKit) demo app: you could fill in observations at the outback ofAlaska and when you get back online your observations would be shared with others and you could again see recent observations filled in by others.

cheers,
matti