First of all let me recognize the amount of work that i'm sure the BDP team is putting in this new API. I'm sure that something like this is not an easy task to accomplish and that sometimes we don't see the full picture and start to criticize too early.
That being said let me share with you my thoughts.
As i learned here in the forum the old API relied on outdated technology, had an huge overhead on each request/response and had limitations on its design so an update to a more lightweight technology like JSON was very welcomed.
Some people didn't like that but some people just don't like change so many of us didn't listening to them. I myself thought that it was a lot of work to update but eventually it would be a good thing.
Then came hell.
As a developer with very few experience i started to learn about JSON and slowly started to figure out the amount of work that i would have to do to upgrade to the new API.
There is no descriptive language file for the new API like the WSDL in the previous one. This means that you will have to build all of the Request/Response/Error classes for each of the requests. As an example a single request (placeOrders) has almost the amount of lines of code than all of my requests in the previous API.
Then we have to Serialize/Deserialize all things from JSON to the Objects and the other way around. Here we have to make a lot of Error Handling on our apps.
Finally there is the request to the server, this part is relatively simple but we have to account for errors, timeouts and build exit strategies so the Errors objects of the API will be filled and our applications warned about.
Then there are options that i assume the BDP team made that i don't think are the right ones. One is the API is case sensitive and that brings a lot of sensibility (i rather have a more robust thing with all things being case insensitive). Then there is a over normalization (i don't know if this is the appropriate term) of some objects like the PlaceOrders. There's really no need to create all those nested objects, something like this is much simpler:
Then there is the specific case of VB.Net that i believe, by the success of the VB.Net topics in here, is the most popular language to develop for the BetFair API. VB.Net has the " as the string delimiter and JSON uses the " symbol for separating fields. This would be no problem if VB.Net had a global escape symbol but it doesn't so a simple JSON request string looks like this:
This is a problem that has no culprits, it just a bump.
In summary it's a lot harder to develop for this API and i believe a lot of people that have developed to the old one will not be able to upgrade their Apps/Bots.
Some of this issues could be resolved by the BDP Team if they developed a descriptive file like JSON Schema (or even libraries for the different languages).
I believe that at this stage a lot of us don't have the time or the resources to build apps/bots in this new API.
I'm a beginner developer and don't really know if this issues can be address and if they are really obstacles. I hope some of the more experience developers can leave us with some advice.
Thanks
That being said let me share with you my thoughts.
As i learned here in the forum the old API relied on outdated technology, had an huge overhead on each request/response and had limitations on its design so an update to a more lightweight technology like JSON was very welcomed.
Some people didn't like that but some people just don't like change so many of us didn't listening to them. I myself thought that it was a lot of work to update but eventually it would be a good thing.
Then came hell.
As a developer with very few experience i started to learn about JSON and slowly started to figure out the amount of work that i would have to do to upgrade to the new API.
There is no descriptive language file for the new API like the WSDL in the previous one. This means that you will have to build all of the Request/Response/Error classes for each of the requests. As an example a single request (placeOrders) has almost the amount of lines of code than all of my requests in the previous API.
Then we have to Serialize/Deserialize all things from JSON to the Objects and the other way around. Here we have to make a lot of Error Handling on our apps.
Finally there is the request to the server, this part is relatively simple but we have to account for errors, timeouts and build exit strategies so the Errors objects of the API will be filled and our applications warned about.
Then there are options that i assume the BDP team made that i don't think are the right ones. One is the API is case sensitive and that brings a lot of sensibility (i rather have a more robust thing with all things being case insensitive). Then there is a over normalization (i don't know if this is the appropriate term) of some objects like the PlaceOrders. There's really no need to create all those nested objects, something like this is much simpler:
Code:
MarketID
Orders()
SelectionID
Size
Price
PersistenceType
OrderType
Side
Code:
"{""filter"":{""eventTypeIds"":[""" & EventTypeId & """],""marketCountries"":[""GB""],""marketTypeCodes"":[""WIN""]},""marketStartTime"":{""from"":""" & dateNow & """},""sort"":""FIRST_TO_START"",""maxResults"":""1"",""marketProjection"":[""RUNNER_DESCRIPTION""]}"
In summary it's a lot harder to develop for this API and i believe a lot of people that have developed to the old one will not be able to upgrade their Apps/Bots.
Some of this issues could be resolved by the BDP Team if they developed a descriptive file like JSON Schema (or even libraries for the different languages).
I believe that at this stage a lot of us don't have the time or the resources to build apps/bots in this new API.
I'm a beginner developer and don't really know if this issues can be address and if they are really obstacles. I hope some of the more experience developers can leave us with some advice.
Thanks


Comment