houtzai / NetMVCWorkshop1

0 stars 0 forks source link

[CodeReview]-Coding Style & Coding Quality #4

Open GSSBilly opened 5 years ago

GSSBilly commented 5 years ago

DRY 原則(Do not repeat yourself)

[重複的 Script 設定, 請善用 Layout]

https://github.com/houtzai/NetMVCWorkshop1/blob/ec9439a530032986122474a7a6407720b2462b47/NETMVCWorkshop1/Views/Book/Create.cshtml#L78-L80

https://github.com/houtzai/NetMVCWorkshop1/blob/ec9439a530032986122474a7a6407720b2462b47/NETMVCWorkshop1/Views/Book/Edit.cshtml#L97-L99

GSSBilly commented 5 years ago

一致性

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

https://github.com/houtzai/NetMVCWorkshop1/blob/ec9439a530032986122474a7a6407720b2462b47/NETMVCWorkshop1/Views/Book/Create.cshtml#L19

https://github.com/houtzai/NetMVCWorkshop1/blob/ec9439a530032986122474a7a6407720b2462b47/NETMVCWorkshop1/Views/Book/Create.cshtml#L21

GSSBilly commented 5 years ago

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

https://github.com/houtzai/NetMVCWorkshop1/blob/ec9439a530032986122474a7a6407720b2462b47/NETMVCWorkshop1/Controllers/BookController.cs#L12

GSSBilly commented 5 years ago

命名原則

[無意義前綴]

https://github.com/houtzai/NetMVCWorkshop1/blob/ec9439a530032986122474a7a6407720b2462b47/NETMVCWorkshop1/Controllers/BookController.cs#L14

https://github.com/houtzai/NetMVCWorkshop1/blob/ec9439a530032986122474a7a6407720b2462b47/NETMVCWorkshop1/Controllers/BookController.cs#L30

https://github.com/houtzai/NetMVCWorkshop1/blob/ec9439a530032986122474a7a6407720b2462b47/NETMVCWorkshop1/Controllers/BookController.cs#L50