-
Notifications
You must be signed in to change notification settings - Fork 1
Home
NelsonSousaSAP edited this page Aug 23, 2023
·
11 revisions
Description
- The Customer Data Cloud accelerator is local development environment for SAP Customer Data Cloud
- Enables the use of all modern tools, including modern JavaScript and real source control
- Provides code separation, enabling best practices, unit tests and quality checks
Current challenges
- Hard to collaborate in feature development and poor quality assurance
- No code quality or security validations
- Working locally affects the online version
- The code becomes not maintainable
- Code written in old JavaScript with bad formatting
- Not possible to track changes
- The code is not testable
Benefits
- Enables collaboration and improves quality assurance with code reviews
- Implement code quality and security check tools with git (Sonar, Checkmarx and Mend)
- Development without affecting online version
- Code separation in different files
- Supports modern JavaScript ES6 syntax and standardized automatic code formatting
- Version control using git
- Easily implement unit tests or e2e tests
Solution
-
Functional
- Scripts to manage de project
- Init: If src/ directory is empty, pulls all data from SAP Customer Data Cloud
- Reset: Replaces src/ directory with all data from SAP Customer Data Cloud
- Start: Creates local live preview with reload on changes
- Test: Run test suite providing report
- Build: Bundles the JS, CSS, HTML and JSON to build/ directory
- Deploy: Pushes the local code to SAP Customer Data Cloud
- Local Development: Web SDK, Screen-Sets, E-mail Templates
- Configurations with version control: Policies, Schema, Consents
-
Technical
- Use the SAP Customer Data Cloud REST API to pull and push code and configurations
- Use Git for version control, code reviews and integration with quality insurance tools (Sonar, Checkmarx, Mend)
- Provide unit and e2e code testing tools (Jest, Cypress)
- Provide a file structure that enables code separation
- Build tools that enable the use of modern JavaScript ES6 and bundling of the different files (Babel, Mustache and Custom scripts)
- Provide tools for automatic code formatting (Prettier)
- Local development with live preview (light-server)
Recommendations
- A large amount of SAP Customer Data Cloud projects developed by SAP have poor code quality with bad formatting.
- It becomes hard to maintain features developed with JavaScript that have some degree of complexity
- It’s not possible to have version control for SAP Customer Data Cloud many configurations
- For first release, involve customers that want to improve the code quality and organization
More info about SAP Customer Data Cloud: https://help.sap.com/docs/SAP_CUSTOMER_DATA_CLOUD/2da86a02352940de9e0946bc7f1b4e53/4d83300f0ac949828f9604a8abb44065.html?locale=en-US&state=DRAFT