Best Practices: Backward Compatibility


Published on

A series of best practices: some tips on how to manage Backward Compatibility

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Best Practices: Backward Compatibility

  1. 1. Managing Backward Compatibility Best Practices
  2. 2. Backward Compatibility: on API & Services To facilitate merging feature by feature with minimal impact on the whole system, it is key to support backward compatibility in the development. • Use V2 method in API / Service / Stored procedure Ex: Instead of changing the current method : public object Method (long applicationId) Create a new one : public object Method_V2 (short channelId, string universCode) Then flag the old one as obsolete : [System.Obsolete("This method is shouldn't be used anymore, use Method_V2 instead")] public object Method (long applicationId) 2
  3. 3. Backward Compatibility: on Database • On Database, Add and clean after Ex: You need to change a table with a new column Table_1 (ID INT, Col1 VARCHAR(10)) Add the new column and keep the existing one : Table_1 (ID INT, Col1 VARCHAR(10), Col2 INT) With the new feature, the Col1 won’t be used anymore, but in the case this is used by another feature or if the feature is not validated in time to go to production, the database release won’t be an issue. 3
  4. 4. Backward cCompatibility: New Parameters • Use over loading Ex: You need to add a parameter to an existing method MethodA(parameter 1, parameter 2) Create another method : MethodA(parameter1, parameter 2, parameter 3) And change the existing one to call the new one : MethodA (parameter1, parameter 2) Call MethodA (parameter1, parameter 2, default value for paramater 3) Manage the default value in the new method. 4
  5. 5. Backward Compatibility: object request / response • Use object request / response Prefer object request instead of a list of parameter Ex: MethodA(parameter 1, parameter 2, parameter 3, paramater 4, parameter 5) MethodA(objectRequest request) In this case, objectRequest will provide 5 properties corresponding to parameter 1 to 5 You can now change the object request wihtout breaking change and manage new parameter on the service / API side. 5
  6. 6. Find out more • On
  7. 7. About Betclic • Betclic Everest Group, one of the world leaders in online gaming, has a unique portfolio comprising various complementary international brands: Betclic, Everest Gaming, bet-at-, Expekt… • Active in 100 countries with more than 12 million customers worldwide, the Group is committed to promoting secure and responsible gaming and is a member of several international professional associations including the EGBA (European Gaming and Betting Association) and the ESSA (European Sports Security Association). • Through our brands, Betclic Everest Group places expertise, technological know-how and security at the heart of our strategy to deliver an on-line gaming offer attuned to the passion of our players.
  8. 8. We are hiring! Betclic Everest, Bet on the best... job! We’re helping millions of on-line players express their passion for Sport, Poker, Casino, Horse Racing... We want our brands to be easy to use for every gamer around the world. We’re building our company to make that happen. Everything we do should reflect our values: Come and work in a friendly atmosphere based on trust & cooperation between IT Teams. So bet on the best job & join our teams!
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.