best practices: backward compatibility

8

Click here to load reader

Upload: betclic-everest-group-tech-team

Post on 06-May-2015

1.585 views

Category:

Technology


0 download

DESCRIPTION

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

TRANSCRIPT

Page 1: Best Practices: Backward Compatibility

Managing Backward CompatibilityBest Practices

Page 2: Best Practices: Backward Compatibility

Backward Compatibility: on API & Services

To facilitate merging feature by feature with minimal impact on the wholesystem, it is key to support backward compatibility in the development.

• Use V2 method in API / Service / Stored procedureEx: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

Page 3: Best Practices: Backward Compatibility

Backward Compatibility: on Database

• On Database, Add and clean afterEx: 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 isused 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

Page 4: Best Practices: Backward Compatibility

Backward cCompatibility: New Parameters

• Use over loadingEx: 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

Page 5: Best Practices: Backward Compatibility

Backward Compatibility: object request / response

• Use object request / response

Prefer object request instead of a list of parameterEx: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

Page 6: Best Practices: Backward Compatibility

Find out more

• On https://techblog.betclicgroup.com/

Page 7: Best Practices: Backward Compatibility

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-home.com, 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.

Page 8: Best Practices: Backward Compatibility

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!