« Back

Breaking Bad - Breaking API Compatibility

General Blogs November 22, 2013 By Ray Augé Staff

When is breaking something not a bad thing?

  1. When it's done with purpose.

  2. When the result is better than the original.

So, if you know you have broken something, and that means it's broken for everyone, why stop with just the currently required change? Why not fix everything that was wrong in the first place?

If an API was bad, and you had to make a small breaking change in order to resolve some limitation, isn't it time to solve most, if not all that was bad?

Ok, so you may not know all the ways that it might go from bad to good right then, but it's probably the best time to re-consider just what that might be while it's busted.

Broken APIs are the greatest opportunities for improvement.

Make sure you take advantage!

Knowing when you've broken API compatibility is therefore very important as well. Liferay's new baseline capability is exactly intended to make this very clear, as quickly as possible, at build time.

Threaded Replies Author Date
Thanks for this empowering philosophy, besides... Suraj Bihari November 25, 2013 6:58 AM
You are totally right. In particular I agree... Christian P. Lerch December 4, 2013 3:19 AM

Thanks for this empowering philosophy, besides your fantastic code explanations these fundamentals and thoughts are a best practice for everyone.
Posted on 11/25/13 6:58 AM.
You are totally right.
In particular I agree with "Broken APIs are the greatest opportunities for improvement."
Hey, why not take this great opportunity to overhaul the broken RPC API?
You know what I mean: all those dozens of method in com.liferay.portal.service.http.xyzServiceHttp classes (and of course in com.liferay.portlet.xyz.service.http too) that use not serializable java.io.InputStreams as parameters.
Calling any of them immediately throws a java.io.NotSerializableException, thus rendering this API rather useless.
Sorry to bother you with such mundane stuff, but doesn't philosophy always ask for palpable action?
Posted on 12/4/13 3:19 AM.