Request for changes in the Public API

While working on the next part of my Bean tutorial, I noticed a few things about the API which IMHO are not too coherent.

If I look at the javadocs of the com.servoy.j2db.ui.IComponent (which exists since version 3.5), the header comment states that it is an:

Public API:
Interface to which form elements needs to conform, to be handled in the same way for swing(rich client) or wicket(webclient) UI.

There is also a comment about the getId() method, saying that it should return the

Public API:
wicket id, normally the UUID prefixed with ‘sv_’

This is fine, but the problem is that there is no way of instantiating a Wicket component from a bean unless you use the com.servoy.j2db.IServoyBeanFactory interface which is not public (in any version of the API).
No way for a bean which would not be at time a Swing bean (when place on a form in developer) and a Wicket bean when used in the web client to be made without the use of this interface.

So I would vote for this interface to be added to the public API (4.1+) otherwise it doesn’t make sense to have an IComponent interface which allows for form elements for Swing and Wicket, when you can’t create Wicket components.

And the com.servoy.j2db.dataui.IServoyAwareBean, being already there since (at least) 4.1.2 should reappear in the public API for 4.1.x, because it is an essential interface for building input beans in Servoy.

And finally, I would also vote for a few more interfaces and classes to be added… I’m not pushing here, just being rational.

I’m talking about these 2 interfaces:

  • com.servoy.j2db.ui.IStylePropertyChanges
  • com.servoy.j2db.ui.ISupportWebBounds
    Because I doubt that without these interfaces, Servoy would recognize and use Wicket beans correctly and place them correctly on a form.

And also these 6 classes used in Wicket components like the TreeViewBean:

  • com.servoy.j2db.util.ComponentFactoryHelper
  • com.servoy.j2db.util.PersistHelper
  • com.servoy.j2db.server.headlessclient.dataui.ChangesRecorder
  • com.servoy.j2db.server.headlessclient.dataui.StyleAttributeModifierModel
  • com.servoy.j2db.server.headlessclient.dataui.TemplateGenerator
  • com.servoy.j2db.server.headlessclient.dataui.TooltipAttributeModifier

All these classes could certainly be created at long length by third party developers, but that would be reinventing the wheel, while these are here and made for some specific purposes already.

Making these interfaces and classes public would certainly assert your will to grant power to developers, and give them the possibility to build web components for the platform, which right now are very few, and help people build web compatible plugins and beans.

I hope that you will take this request into consideration, I can make a case for it if you want to.
I really think that it is essential for developers to have at their disposal the tools to build third party components that are best adapted for the platform, and the platform’s whole strength is to be smart and web client compatible, so let us build components that also fulfill this contract!

Thanks in advance,

i added the IServoyAwareBean and the IServoyBeanFactory to the public api of 4.1.x (and on)

ChangeRecorder and IStylePropertyChanges will only be public in 5.0 they have changed and are refactoried a bit to be better usable (so if you would use them 5.0 will break)

TemplateGenerator is not something thats for public usage

I will check for the 2 AttributeModifiers/Models

jcompagner:
i added the IServoyAwareBean and the IServoyBeanFactory to the public api of 4.1.x (and on)

ChangeRecorder and IStylePropertyChanges will only be public in 5.0 they have changed and are refactoried a bit to be better usable (so if you would use them 5.0 will break)

TemplateGenerator is not something thats for public usage

I will check for the 2 AttributeModifiers/Models

Thanks Johan!

What about ISupportWebBounds, is it going to change also?
And about the 2 helpers? (ComponentFactoryHelper and PersistHelper)
They have lots of static methods which are really useful when building Wicket beans, don’t you think they could also be made public?

Thanks in advance,

jcompagner:
i added the IServoyAwareBean and the IServoyBeanFactory to the public api of 4.1.x (and on)

Hi Johan,

can you tell us when they will appear in the javadocs at http://www.servoy.com/docs/public-api/?

And did you had a chance to look into the 2 AttributeModifiers/Models? The ISupportWebBounds and the 2 helpers? (ComponentFactoryHelper and PersistHelper)?

Thanks in advance,

Hi Johan,

I still can’t see the 2 interfaces in the public API for 4.1.x (and on), do you know when they will appear.
And the other interfaces/classes?

Thanks for looking into this,

did we do a release? did we do an update?

jcompagner:
did we do a release? did we do an update?

OK Johan! That’s my fault if I didn’t understand. Sorry.

But when you said:

jcompagner:
i added the IServoyAwareBean and the IServoyBeanFactory to the public api of 4.1.x (and on)

I thought that it was going to be updated without the need for a new release (that’s what happened last time you updated it), and that you simply forgot about it.

it is added.

But then everything needs to be generated and build and then uploaded to the server as the public api doc.