一些SAP UI5代码审查的例子

目录:

一些SAP UI5代码审查的例子

1. Group id decrease

Why the group id for com.sap.fiori is decreased from 1.5.6 to 1.5.1?

一些SAP UI5代码审查的例子

2. Best practice for constant definition

这个涉及到JavaScript里定义常量的最佳实践。

一些SAP UI5代码审查的例子

  1. Where is this oVersioningModel used?

一些SAP UI5代码审查的例子

I cannot search any other used list for oVersioningModel in S3.controller.js

4. What does backend 5 mean?

这个注释写得不太好,让人看不懂

一些SAP UI5代码审查的例子

5. Does this 8 mean wave8?

这个变量名里的8也让人费解。

一些SAP UI5代码审查的例子

6. Wrong comment

一些SAP UI5代码审查的例子

7. Code format

虽然这不是我们写的,但是看着难受。
作为一个强迫症患者,Jerry能表示这段代码看起来很难受。

一些SAP UI5代码审查的例子

而且单步调试特别不方便:

一些SAP UI5代码审查的例子

8. Unused parameter index

下面这个index参数实际上没有用到。

一些SAP UI5代码审查的例子

9. Return false to terminate the loop inside jQuery.each.

要获取更多Jerry的原创文章,请关注公众号"汪子熙":
一些SAP UI5代码审查的例子