Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6096089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:53:10+00:00 2026-05-23T12:53:10+00:00

We have a platform component (written in Java) that now shall be backward compatible

  • 0

We have a platform component (written in Java) that now shall be backward compatible for a certain period, e.g. 3 years.
Is there a possibility, that implementing a new feature or fixing a bug must require an interface change in the platform?

One concrete example is, let’s say there is some kind of listener interface defined in the platform, and the client code will implement the listener. Later a new method seems needed in the listener to introduce a new feature, but we cannot do that because it will break the interface so that some client will not be able to compile.

Is it a good idea to create a new interface that extends the original one with the new method? The client that needs this new feature will now implements the new interface, and other client code needs not to be changed. Of course the invocations in the platform shall now check the type of the listener, if it is the new interface with the new method, then the new method will be invoked, or nothing will be done.

This kind of change may make the code look not so straightforward, but I guess it shall still work. Are there any cases that an interface change in the platform is a must?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:53:10+00:00Added an answer on May 23, 2026 at 12:53 pm

    Is there a possibility, that implementing a new feature or fixing a bug must require an interface change in the platform?

    Yes, if this bug is an accidental break of the backward compatibility and if you’ve released several versions (X+1 … X+N) of the product before detecting this break. So, one part of your clients depends on older version X, but another part of clients depends on the X+1 … X+N broken versions. And if you’ll fix this bug, then newer clients (X+1 … X+N) will be broken.

    Is it a good idea to create a new interface that extends the original one with the new method?

    Possible, but you’ll probably got a problem with naming of these interfaces and with documentation compilation. I recommend you to delay such features and break API each 3 years with supplying of detailed explanation of how to change old clients.

    Of course the invocations in the platform shall now check the type of the listener, if it is the new interface with the new method, then the new method will be invoked, or nothing will be done.

    There are 3 kinds of backward compatibility: binary (running old clients), source (recompilation of old clients) and behavioral. If you need to add a new method to the interface, then you can only break source compatibility but keep the binary compatibility by checking used interface version (final String VERSION = “N”) and calling new method only for compatible versions. So, if some old client need a new feature, then it should be changed and recompiled.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a cross platform program that runs on Windows, Linux and Macintosh. My
I have some cross platform DNS client code that I use for doing end
I have a mobile platform that I am trying to write some communications code
I have this large C++ project that I need to build on a platform
I was reading Java Platform Performance (sadly the link seems to have disappeared from
I have written this event photography application that features a slideshow among other things.
I have a 32 bit COM component DLL and this DLL is written in
Hi there I am desktop application developer but now i have to work on
I have a very simple command line Java application that I wish to port
I am putting together some ideas for our automated testing platform and have been

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.