Search code examples
web-servicesdesign-patternssalesforceapex-code

I am developing an integration application which will integrate a SOAP API using WSDL. Can anyone guide me about relevant design patterns etc?


com Developer and working on an integration app that links an external system with Salesforce.com. The external system exposes its service through SOAP API and provides a WSDL which I have imported and classes are created under a namespace. I need help in developing the overall architecture of the application.

What should be the architecture of the system? Should I develop model and service classes for different entities for fetching data from external app and converting response into my own model classes?


Solution

  • Treat the external system as you would a typical data layer (DBMS, Web services, etc). This means encapsulating the data fetching logic in such a way that the business layer has no idea where the data is coming from. The Repository Pattern is one technique for doing this.

    Once you have abstracted your data layer away, you would handle the translation of Data to Entities in whatever way you see fit. You could use a tool such as AutoMapper to do this or write your own custom translation layer where the Data is translated into objects that your application works with.