Closed JuhanaKivela closed 1 month ago
I have implemented the AbbrevConverterComponent.java. Since it has the most basic functionality, I didn't create "AbbreviationObject.java". The process is frontend sends a request with a string(e.g. "ATL") and backend responds with a string(e.g. "Aittaluoto"). But for all the remaining components, creating "Object.java" would be necessary. I will look into the two possible ways.
Now I modified "AbbrevConverterComponent.java" and made the pre-defined class "AbbreviationObject.java" which is taken as payload. I follow the first way because in my opinion it might be easier to implement.
OLD INFO BELOW Backend components should take Objects of pre-defined classes as a payload (payload is similar to function parameter input) and process the request based on information there. For example AbbrevConverterComponent.java might take a very simple Object that only has 1 variable "Abbreviation" as a payload. In this case we would create e.g. "AbbreviationObject.java".
When we return the value, there are at least two possible ways to do it: