jeudi 21 février 2019

Whats a good practice to new implementation in same XML?

I have a web service that I want to implement new features. I wonder if it's a good practice to add them to the default XML or should I create new methods for this consumption?

An example: I have a method that returns the characteristics of a product, color, price, size, etc. I want to implement a new feature that will also return the price on several websites. Actual XML:

<Product>
    <Name> IPhone X </Name>
    <Color> Black </Color>
    <Type> Smartphone </Type>
</Product>

New XML:

<Product>
    <Name> IPhone X </Name>
    <Color> Black </Color>
    <PriceInSites>
        <Site> www.apple.com </Site>
        <Price> 1000.00 </Price>
    <PriceInSites>
    <Type> Smartphone </Type>
</Product>

Whereas multiple clients already use the implementation without this XML block - should I make this available in a separate method?

Whats a good practice to new implementation in same XML?




Aucun commentaire:

Enregistrer un commentaire