摘要 |
A design pattern for a software architecture includes a business services layer (16) comprising ApiService class (42), BusinessService class (48), Message class (44) and Field class (46). ApiService class (42) accepts a request that includes request parameters and utilizes corresponding instances of Message class (44) and Field class (46) to translate the request to an input message. The instances of Message class (44) and Field class (46) contain the request parameters in self-describing form, namely, field names and associated values. The input message is forwarded to the appropriate subclass of BusinessService class (48) by ApiService class (42). The subclass of BusinessService class (48) uses the input message to retrieve data and generate an output message containing the data. The output message is generated in self-describing form utilizing Message class (44) and Field class (46). ApiService class (42) translates the output message to a presentation format identified by the request.
|