Sallyyyyy / .NetMVCWorkShop1

0 stars 0 forks source link

[CodeReview]-Coding Style & Coding Quality #4

Open GSSBilly opened 5 years ago

GSSBilly commented 5 years ago

一致性

[htmlAttributes,具名參數使用與否請維持一致性]

https://github.com/Sallyyyyy/.NetMVCWorkShop1/blob/1ecafdb0fa1b5393881a2509a99757150d7cbb48/MVCWorkShop1/Views/Library/Index.cshtml#L19

https://github.com/Sallyyyyy/.NetMVCWorkShop1/blob/1ecafdb0fa1b5393881a2509a99757150d7cbb48/MVCWorkShop1/Views/Library/Index.cshtml#L21

GSSBilly commented 5 years ago

良好&有意義&格式正確註解

https://github.com/Sallyyyyy/.NetMVCWorkShop1/blob/1ecafdb0fa1b5393881a2509a99757150d7cbb48/MVCWorkShop1/Controllers/LibraryController.cs#L13

GSSBilly commented 5 years ago

重複 Function

https://github.com/Sallyyyyy/.NetMVCWorkShop1/blob/1ecafdb0fa1b5393881a2509a99757150d7cbb48/MVCWorkShop1/Views/Library/InsertBook.cshtml#L87-L98

GSSBilly commented 5 years ago

DRY 原則(Do not repeat yourself)

[抽共用 Function]

https://github.com/Sallyyyyy/.NetMVCWorkShop1/blob/1ecafdb0fa1b5393881a2509a99757150d7cbb48/MVCWorkShop1/Controllers/LibraryController.cs#L19-L27

https://github.com/Sallyyyyy/.NetMVCWorkShop1/blob/1ecafdb0fa1b5393881a2509a99757150d7cbb48/MVCWorkShop1/Controllers/LibraryController.cs#L41-L49

GSSBilly commented 5 years ago

命名原則

[請用 Pascal Case]

https://github.com/Sallyyyyy/.NetMVCWorkShop1/blob/1ecafdb0fa1b5393881a2509a99757150d7cbb48/MVCWorkShop1/Controllers/LibraryController.cs#L34