MuleSoft development made easy with templates
MuleSoft Community
Welcome to the MuleSoft Community page keeping MuleSoft Developers, Architects, and Business Users informed!
Introduction
Development, including build and unit testing, takes a major percentage of the time we spend on any project or program we embark on using MuleSoft. If development teams do not have the proper planning nor right set of artifacts, mistakes are likely. This blog will provide tips to prevent these mistakes and ease a few common developer pain points. Make sure to read through to find a step-by-step video tutorial to guide you as well.
Developer pain points
Here are a few pain points developers may experience when starting a new MuleSoft project/program in an enterprise.
These pain points can increase the development time and effort to achieve the code.? However, in one of my recent projects, when I took MuleSoft templates along with me. I was able to deliver a project with 16 APIs in just 6 weeks with production quality.?
Considerations for the common assets
When creating or customizing common templates or libraries we will need to make the following considerations.
Start with thinking what are common elements such as:
For example, ABC Corp may have heavy Salesforce-driven program(s) across the enterprise and their template will have a Salesforce connection apart from the common connections I have already mentioned.
What Design Libraries we would need
The following are some basic common libraries that are to be set in place and to be published to Anypoint Exchange.?
领英推荐
Considerations while creating or customizing Code Templates
We will need a robust folder structure for creating our code template.?
/src/main/resources
This structure can change as per the requirements for your project. This is a sample folder structure as part of the template.?
Identify the common source and target systems and incorporate those connections into your global-config.xml file and its properties defined in the properties files.?
For example, A Customer ABC is a more Salesforce driven organization, Hence we can make the Salesforce connection part of our global-config.?
Some Best Practices
While writing code for your API definitions, Always have a separate XML file with meaningful legible name which reflects what you are implementing. Your global configuration file has mean names for your connections that are easily read and understood.?Keep self service for your APIs when naming them. Always have a self-signed cert incorporated into your Code Template.? Make sure to avoid putting DataWeave code inline and create separate files for your DataWeave transformations.?Make all common connections part of your code template.?
Video tutorial
Conclusions
In summary, I wanted to bring all that you need while you define a new design/project template on your new project/program. These common assets and code templates have helped me in great detail and in fact on my last project I was able to cut down the development time by at least 25%.
Author
Aravind Ramadugu, MuleSoft Mentor, Accenture
Lead Enterprise AI Integration Engineer at Dallas Fort Worth International airport
2 年I only see libraries uploaded to exchange. Doesn't have any steps to use this as template. Is that going to be in another part?
Transforming IT Governance, Risk and Compliance - Application Life Cycle Management
2 年Awesome Aravind. Thanks for sharing. Great work????