Friday, July 5, 2013

Using a Publish-Subscribe messaging pattern in Vaadin

The events system described by the Book of Vaadin is quite primitive. It's a standard Observer pattern (aka Listener pattern). 

Unfortunately, since the Listener requires access to the source object, this makes it highly coupled (the listener has to know about the source). 

What's worse is, in a practical sense, since Vaadin events do not "bubble" (not on the server side at least), its very difficult "get the handler to the required component" without violating all kinds of information hiding best practices.

What we really want is a publish-subscribe architecture that is similar to Parsley's in Flex.

GWT does provide a SimpleEventBus. And Vaadin does include this. And blogger Alex Tretyakov has here a great example of how to use it. As of this writing, its the best example out there.

Wednesday, July 3, 2013

Creating a Vaadin application using M2Eclipse (aka m2e) gives an error

I use M2Eclipse (and m2e-wtp) to create a vaadin-archetype-application. It works, but M2E keeps complaining about the below error.

"Plugin execution not covered by lifecycle configuration: com.vaadin:vaadin-maven-plugin:7.1.0:update-theme (execution: default, phase: generate-sources) "

Yes its a harmless error. But its irritating for an OCD like me. This is (probably) because m2e doesn't know about some of Vaadin's Maven goals:

  1. compile-theme
  2. update-theme
The way I solve let m2e know about it is:
  1. search the pom.xml for m2e's lifecycle config. Do a search for "org.eclipse.m2e".
  2. m2e will have tried to put some goals into vaadin-maven-plugin's plugin execution. e.g. <goal>resources</goal>
  3. put in the missing <goal>compile-theme</goal> and <goal>update-theme</goal>.
  4. update the Eclipse's Maven config. The easiest way is to quick fix ⌘1.

Tuesday, March 12, 2013

Dune HD "Error: file can't be played"

I recently got a "Error: file can't be played" when I tried to play a file in my Dune HD player (it was working less than 12 hours ago).

How I solved it was to re-flash my firmware. It doesn't seem to have any adverse effect besides wasting my time. Here's how I did it in my Dune HD.


  1. Go to "Setup -> Miscellaneous -> Firmware Upgrade"
  2. Select "Check Available Updates"
  3. It tells me "no new firmware version available" (If there is a new firmware, I'd suggest upgrading. If so, you can ignore the below steps.)
  4. Select "Show all versions".
  5. Select the current version (it stated there "current")
  6. Select "Upgrade"

Hths



Player: Dune HD Smart B1
Player purchased in: 2012
Player firmware: 121018_0846

NAS: Synology DS212