Suggestions for the Addon Process

Firstly, thanks all at Vaadin for producing an amazing tool, and even more so for the addon contributors for doing such an amazing job to extend Vaadin in so many useful ways.

Secondly, I’m relatively new to Vaadin, so if my comments are already handled elsewhere, forgive the duplication, but if they are, they are not very visible, to me at least.

Lastly, I’m not sure where to put these ideas, so for lack of a better place, I’m putting them here.

Here are my suggestions:

  • Provide an update e-mail option when an addon you’re using gets updated
  • Have some form of standard addon package naming structure

For the first point, I think it would be very useful to be able to “subscribe” to an addon, so if it is updated we can either get an e-mail, or equally good, a message next time we sign on that these addons have been updated.

This comes from the fact that any resonably sized webapp will use quite a few addons, I’m averaging about 5-6 “must haves” for all applications and then specific addons for given sites needs.

On the second point, I would suggest just like Addons are “Certified, Stable, Experimental, etc.” there should be some form of agreed convention of package naming. Some developers do: org.vaaddin.addon. some do org.vaadin. some give the addon completely different names.

This makes it very hard to pull in the right imports when coding. I generally import specifically each class I use, since from way back when that was the recommended approach for efficiency of memory and execution. Eclipse does a great job of figuring out what to import, but even so, it is not “professional” in feel. Just my hang up I guess, but it makes Vaadin look more fragmented than it first appears.

Given the consistency of the Vaadin API, it is quite at odds that the addon standards are not so well defined. Just like the JavaBean “standard” is a coding convention you can follow or not, the same goes on here. The easy way to build awareness of the standard is simply to parse the Addon being uploaded and if it does not meet the standard package structure, ask the developer if they wish to proceed. This will help newer developers to adopt the standard.
Hope these ideas help,

PS I’m really enjoying how much more productive I am with Vaadin compared to other web frameworks

Hi Anthony!

Good comments, thanks for the input! The first point (add-on updates) has been discussed, already back when the first version of the add-on directory was launched. It took a good while, and now the need for such a feature is even more apparent, so I can tell you that such a feature is now planned and already designer. Just waiting for implementation, which will a part of a larger website redesign in the coming months.

The second point hasn’t been discussed so much (haven’t heard at least), but we definitely need to discuss it more. I find myself once in a while wondering what the naming conventions should be when doing a new add-on, so some guidance wouldn’t hurt.

Feel free to post suggestions, opinions from the community are appreciated.


Thanks for the reply Jouni,

On the second point, what I’d suggest is this:

org.vaadin.addons.. That seems to be the most common approach.

My other point was to add a Java Reflection test on upload to see if the Addon conforms to the convention. If it does not, the user still has an option to continue the upload.

Here’s some Java code that can test for package naming, it’s just a main method, but the core of the manifest checking concept is there.

   public static void main(String[] args)
      if (null != args && args.length > 0)
         String jarName = args[0]

            JarFile jar = new JarFile(jarName) ;
            System.out.println ("Loaded " + jarName + " OK"); 
            Manifest mf = jar.getManifest() ;

            String addonPackage = mf.getMainAttributes().getValue("Vaadin-Widgetsets") ;
            if (null == addonPackage)
               System.err.println ("Jar file [" + jarName + "]
 does not seem to have a valid MANIFEST file for your wdiget.") ;
               if (addonPackage.startsWith("org.vaadin.addons."))
                  System.out.println ("VALID Package Name: " + addonPackage) ;
                  System.out.println ("Your package: " + addonPackage + " does not conform to the Vaadin guidelines of org.vaadin.addons.<addon name>") ;

         catch (IOException e)
            System.out.printf ("Jar File: %s load eror [%s]
- caused by: %s%n", jarName, e.getMessage(), e.getCause()) ;
         System.out.println ("Usage:java FindPackage <path + jar file>\nThe path to valid jar file must be passed in.") ;