Appendix B SAmple Code The Apache Camel framework, as shown in Figure B-2, has a responsibility to provide API endpoints while the client-side Angular technology stack strictly handles the user interface. Complex business logic (like calculation of taxes, deduction of taxes, etc.) is implemented along with integration at the server-side. The server-side application contains a business controller, which is responsible for business logic, and integration controllers that are responsible for sending and receiving data to other application using Apache Camel’s messaging components and endpoints. Swagger will mock the third-party web services, which will be removed while integrating the DXP’s application with third-party systems. Deployment We have chosen Apache Tomcat to deploy our application. You can deploy Angular code on the Apache web server and the integration application on Apache Tomcat. Development In development you can serve your Angular code through Angular CLI. Apache Camel resides in a Spring container and this application is deployed on a Tomcat instance, as shown in Figure B-3. Angular Apache Swagger & Camel Rest API Rest API Mocking API Angular Material Spring Container Apache Tomcat Figure B-3. Deployment 337
![Building Digital Experience Platforms - Page 347](/cdn-cgi/image/width=600,quality=80,format=webp/https://cdn.relayto.com/images_originals/600ee860502a1.jpeg)