RE: Representation<T> and Entity<T>

From: Jerome Louvel <>
Date: Tue, 10 Apr 2007 20:27:46 +0200


> Understood. In examples there's always the temptation to throw in
> everything to show all the features of the API but that can tend to
> confuse rather than educate.


> No, only JSR 311 implementations are expected to implement Entity<T>
> so its OK to add new methods in a later revision of the API.
> Representation<T> is concrete, so again its OK to add new methods
> since a revised 311 impl will support them.

But this isn't stated in the Javadocs, and even if it was stated, nothing
would technically prevent an API user to implement it in order to extend his
custom representation class. Then, as soon as we touch the interface, we
have many complaints. And beside that it doesn't add lot of value and it
isn't that flexible.

The overuse of interface is a common mistake in API design that we made in
the initial cycles of the Restlet API, until someone pointed me to Joshua
Bloch and Eamonn McManus's recommendations on API design:


Best regards,