|
| 1 | +--- |
| 2 | +sidebar_position: 320 |
| 3 | +title: Collaborative Coding |
| 4 | +--- |
| 5 | + |
| 6 | +# Collaborative Coding with Simplicité |
| 7 | + |
| 8 | +This document outlines best practices and workflows for collaborative development on Simplicité platform projects. It provides guidance for teams working together on Simplicité applications, covering version control, environment setup, access management, and quality practices. |
| 9 | + |
| 10 | +Collaborative development on Simplicité projects requires careful coordination between team members, proper version control practices, and effective use of the platform's built-in collaboration features. The foundation of successful team collaboration is proper Git repository management for modules and adherence to established workflows. |
| 11 | + |
| 12 | +## Environment Setup |
| 13 | + |
| 14 | +### Individual Development Environments |
| 15 | + |
| 16 | +For effective collaborative development, each team member should have: |
| 17 | + |
| 18 | +- **One Simplicité environment per developer** - Each developer should have their own dedicated Simplicité instance |
| 19 | +- **One Git repository per project** - Use a centralized Git repository (e.g., GitLab, GitHub) for the project |
| 20 | +- **External development tools** - Use IDEs like VS Code for enhanced development capabilities |
| 21 | + |
| 22 | +### Repository Configuration |
| 23 | + |
| 24 | +Each Simplicité module can be exposed as a Git repository, enabling standard collaborative workflows. When setting up modules for collaborative work: |
| 25 | + |
| 26 | +- Modules are **non-bare repositories** - The local worktree is needed by the export/import processes |
| 27 | +- Configure HTTP(S) access with the following settings in `.git/config`: |
| 28 | + ```ini |
| 29 | + [http] |
| 30 | + uploadpack = true |
| 31 | + receivepack = true |
| 32 | + ``` |
| 33 | + |
| 34 | +## Recommended Development Workflow |
| 35 | + |
| 36 | +Based on real-world experience from Simplicité integrator teams, here's the recommended workflow for feature development: |
| 37 | + |
| 38 | +### Before Starting Implementation |
| 39 | + |
| 40 | +1. **Pull the latest version** from the main GitLab repository |
| 41 | +2. **Push to your Simplicité instance** using the import module functionality |
| 42 | +3. **Ensure your local environment is up to date** |
| 43 | + |
| 44 | +### During Feature Development |
| 45 | + |
| 46 | +1. **Implement your feature** in your local Simplicité environment |
| 47 | +2. **Commit the feature** from within the Simplicité instance |
| 48 | +3. **Create a feature branch** (`myfeature`) from the main branch in GitLab |
| 49 | +4. **Cherry-pick the commit** containing your feature to the new branch |
| 50 | +5. **Push to the feature branch** in GitLab |
| 51 | + |
| 52 | +### After Implementation |
| 53 | + |
| 54 | +1. **Create a merge request** for your feature branch |
| 55 | +2. **Request code review** from team members |
| 56 | +3. **Address feedback** and make necessary changes |
| 57 | +4. **Merge the request** after approval |
| 58 | + |
| 59 | +## External Editor Integration |
| 60 | + |
| 61 | +### VS Code Setup |
| 62 | + |
| 63 | +For teams using VS Code, install the following extensions: |
| 64 | + |
| 65 | +- **[Extension Pack for Java](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-pack)** - Provides IntelliSense and Java debugging tools |
| 66 | +- **[Simplicité VSCode tools extension](https://marketplace.visualstudio.com/items?itemName=SimpliciteSoftware.simplicite-vscode-tools)** (optional) - Allows pushing code directly to Simplicité instances |
| 67 | + |
| 68 | +:::warning |
| 69 | +You must activate the `DEV_MODE` system parameter for the Simplicité VSCode extension to work. |
| 70 | +::: |
| 71 | + |
| 72 | +### Development Workflow with External Editors |
| 73 | + |
| 74 | +The typical workflow when using external editors: |
| 75 | + |
| 76 | +1. **Configuration changes** in Simplicité |
| 77 | +2. **Commit changes** in Simplicité |
| 78 | +3. **Pull changes** from Simplicité to local environment |
| 79 | +4. **Local development work** in your preferred IDE |
| 80 | +5. **Commit changes** locally |
| 81 | +6. **Push changes** back to Simplicité |
| 82 | + |
| 83 | +## Code Quality and Security Practices |
| 84 | + |
| 85 | +### Testing and Quality Assurance |
| 86 | + |
| 87 | +- **Use private browser windows** for testing to avoid session conflicts between test and designer users |
| 88 | +- **Implement unit testing** with proper coverage measurement |
| 89 | +- **Use code quality tools** like SonarQube for continuous quality monitoring |
| 90 | + |
| 91 | +### Security Considerations |
| 92 | + |
| 93 | +For collaborative environments, implement proper security measures: |
| 94 | + |
| 95 | +- **Strong passwords** for designer users (change regularly) |
| 96 | +- **Two-factor authentication (2FA)** using authentication applications (Google or Microsoft Authenticator) |
| 97 | +- **Deactivate designer accounts** when not in use (may complicate delivery processes) |
| 98 | +- **Regular security audits** and access reviews |
| 99 | + |
| 100 | +### Code Quality Tools |
| 101 | + |
| 102 | +Integrate code quality tools into your development workflow: |
| 103 | + |
| 104 | +- **SonarQube integration** for automated code analysis |
| 105 | +- **Unit test coverage** measurement using JaCoCo |
| 106 | +- **Automated testing** in CI/CD pipelines |
| 107 | + |
| 108 | +## Additional Resources |
| 109 | + |
| 110 | +- [Git Repositories Documentation](/docs/integration/webservices/git-repositories) |
| 111 | +- [External Editor Setup](/docs/devops/external-editor) |
| 112 | +- [Code Quality Tools](/docs/devops/code-quality) |
| 113 | +- [Security Best Practices](/docs/security) |
| 114 | +- [Docker Deployment](/docs/operation/docker) |
0 commit comments