Vaadin 7 beta1 - Still some major refactorings

Vaadin 7 beta1 contains some major refactoring in core Vaadin classes.


Root is UI

As all of you who move from alphaX to beta1 will notice, your code won’t compile. This is firstly due to the decision to rename Root to UI. We all felt that UI is a much more descriptive name for what you are creating compared to Root. We really would have liked to do this much sooner in the development process than beta1 but all the name suggestion that came up before did just not feel right.


Application is no more

Based on testing and feedback we came to the conclusion that the hierarchy consisting of Servlet, ApplicationContext, Application, UI in earlier alphaX was unnecessary complex and hard to grasp. The Application class, the base of all Vaadin application in Vaadin 6, really had little use anymore and few people understood ApplicationContext and its relation to Application.

To simplify things we decided to merge Application and ApplicationContext into VaadinSession, whose lifetime is equal to the HttpSession lifetime of the user. VaadinSession can contain any number of UI instances, typically from the same servlet, but it’s possible also that they come from different servlets. You can still decide the type of UI based on the request, although this is no longer done in your Application class. Please also note that VaadinSession is not designed to be overridden (as opposed to Application).


ApplicationServlet is now VaadinServlet

As Application disappeared the ApplicationServlet name no longer made sense so it was renamed to VaadinServlet (and merged with AbstractApplicationServlet). As we are constantly trying to hide less details for those who want to see the details we want to make the servlet API such that it is possible and ok to extend it to do certain tasks such as initializing values in a new VaadinSession. We are not quite there yet in beta1 and some methods in VaadinSession/VaadinServlet will still change in beta 2.

We realize that we are breaking your alpha-code by doing these changes (sorry about that) but at the same time feel it is worth a little refactoring now to live the coming years with a much cleaner API.


For short examples on how to use the new features, check out the Vaadin 7 mini tutorials:
https://vaadin.com/wiki/-/wiki/Main/Vaadin+7

For information on how to migrate from Vaadin 6 to Vaadin 7, see
http://dev.vaadin.com/wiki/Vaadin7/MigrationGuide

This is an beta release so we expect there to be bugs. We will no longer be making large new features but finalization of the current features might still affect API in some places. All your comments on the new features are welcome. Please post all Vaadin 7 related comments in the Vaadin 7 category.

Great to see the API becoming cleaner. I was wondering if I way to get the current VaadinSession would be provided