Development best practices
 Share
The version of the browser you are using is no longer supported. Please upgrade to a supported browser.Dismiss

View only
 
ABCD
1
IDDescriptionLink documentationLink exemple
2
DEVSTD-1Always use English language in source code
3
DEVSTD-2Never use stderr and stdout (Exception.printStackTrace, System.out, System.err...)
4
DEVSTD-3Define Javadoc for all public classes, methods, attributes and constants
5
DEVSTD-4Use common eXo Code formatting rulesLink
6
DEVSTD-5Format only modified code instead of the whole class
7
DEVSTD-6Avoid using of java.lang.String.intern()Link
8
DEVSTD-7String concatenationLink
9
DEVSTD-8Commits inside PRs must have clear description
10
DEVSTD-9Add comments to complex algorithms
11
DEVSTD-10Divide complex code and big services to smaller pieces
12
DEVSTD-11Use eXoLogger for logging purpose
13
DEVSTD-12Never use == to compare Objects
14
DEVSTD-13Never swallow exceptions
15
DEVSTD-14Always log the complete exception (avoid using exception.getMessage())
16
DEVSTD-15Add Unit tests. When the issue is about a bug, the test has to fail wihout the fix and must succeeds with the proposed patch
17
DEVSTD-16Use and implement equals and hashcode methods to compare Objects
18
DEVSTD-17Use braces when using for, while, do/while, if / else and switch blocks
19
DEVSTD-18No whitespace changes or formatting changes has to be made in PRs. In fact, the PR can become unreadable with those changes.
20
DEVSTD-19Before requesting a PR, ensure that the build passes and that the branch is up to date with destination branch
21
DEVSTD-20When merging a PR, if it's about a fix or a quick win, the PR should be squached to a single commit and then merged. Else, if it's a Feature, a "Merge" commit should be added to destination branch
22
DEVSTD-21No exception should be swallowed. A log.debug is sometimes sufficient, if the exception is expected
23
DEVSTD-22No commented code should be committed
24
DEVSTD-23When adding new methods in API, please make sure to add a default implementation to ensure that it doesn't break implementations Mocks in Tests for example
25
DEVSTD-24An exception should be either loggued or rethrown, not both
26
DEVSTD-25Avoid adding commented code
27
DEVSTD-26void adding CSS in Vue components and place it in gatein-resources.xml as portlet skin
28
DEVSTD-27Use "computed" properties as much as possible inside Vue components instead of objects attributes direct accessPR chat
29
DEVSTD-28Make sure that all RDBMS fields accepts emoticons characters and that it's displayed correctly in front-end only if explicitly not acceptable PLF-8424
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
Loading...