In Java, you can store a reference to an object to use it later. The Vaadin 8 component APIs use this to good effect. But for platform, there are setters like this:
public void setI18n(LoginI18n i18n) {
getElement().setPropertyJson("i18n", JsonSerializer.toJson(i18n));
}
Suddenly, it matter in which order you call methods, when it didn't earlier. Also, storing a reference to the i18n object to change error messages later on now won't work. This is incredibly confusing for Java developers, especially since previous framework versions do things according to standard Java practices.
Whenever possible, you should adhere to standard Java practices when creating an API for Java users.
In Java, you can store a reference to an object to use it later. The Vaadin 8 component APIs use this to good effect. But for platform, there are setters like this:
Suddenly, it matter in which order you call methods, when it didn't earlier. Also, storing a reference to the i18n object to change error messages later on now won't work. This is incredibly confusing for Java developers, especially since previous framework versions do things according to standard Java practices.
Whenever possible, you should adhere to standard Java practices when creating an API for Java users.