JavaFX and the Missing Interfaces
Richard Bair
richard.bair at oracle.com
Mon Nov 5 12:26:21 PST 2012
That is correct, when you are designing a class hierarchy such that is intended to be extended via subclassing, interfaces are pretty much a non-starter. If each Node in the scene graph had an associated interface, then we'd have to create new versions of the interfaces for each release where we add a single new method -- or the interfaces would have to be some subset.
Maybe somebody can show how this would work in more concrete terms? I don't even see how it would be practical at all.
Richard
On Nov 5, 2012, at 12:20 PM, Daniel Zwolenski <zonski at gmail.com> wrote:
> +1
>
> I think we've had this conversation before. Maybe something to do with interfaces being too brittle where if you add a method anyone implementing it will now be missing a method, whereas with a base class they can add a stub method?
>
> Other frameworks use interfaces extensively though (eg Spring, java.util.Collections), generally with positive outcomes.
>
>
>
> On 06/11/2012, at 5:50 AM, Randahl Fink Isaksen <randahl at rockit.dk> wrote:
>
>> I have been struggling with a number of problems stemming from the way JavaFX is designed – specifically the lack of interfaces for many of the extension points in the class hierarchy.
>>
>> It takes some thorough explaining with code examples, so instead of just an unformatted e-mail I posted a more readable explanation of the problem on-line:
>> Please read http://blog.randahl.dk/2012/11/javafx-and-missing-interfaces.html
>>
>> I hope we could have a constructive discussion on this matter on this list before I go ahead and file a Jira, so the Jira issue becomes the best possible basis for solving the design problem.
>>
>> Thanks
>>
>> Randahl
More information about the openjfx-dev
mailing list