Skip to content

war-man/Science-Management-and-International-Affairs

 
 

Repository files navigation

FPT Science Management and International Affairs

CI CodeFactor

CÁC BƯỚC CHUẨN BỊ SAU KHI CLONE REPOS

Tự động format code thừa sau khi push commit:

  • Cài dotnet-format (nếu máy chưa cài): dotnet tool install -g dotnet-format
  • Copy file pre-commit sang thư mục .git\hooks

CONVENTION CHO GITHUB PULL REQUEST

  • Pull Request sẽ chia làm các loại (TAG):
    - fix
    - add
    - edit
    - remove
    - database
    - resources
    - config
  • Title của pull request sẽ được đặt theo format: [<tên tag>] - <Nội dung>
  • Luôn Squashing Pull Requests giúp cho lịch sử commits được gọn

image

CONVENTION CHO BACK-END

  • Thêm Controller trực tiếp trong folder Controllers
  • Tên Controller sẽ đặt theo PascalCase, ví dụ HomeController
  • URL được mapping tự động theo {controller}/{action}/{id} nên tránh đặt tên Controller quá chung chung
  • Khi tạo View thì Add View trực tiếp từ return View();

image

  • Để thuận tiện cho việc quản lý source code thì tránh [route()] dưới mọi hình thức, đặt tên controller cẩn thận
  • Luôn thêm ViewBag.pagesTree vào Action, không cần phải thêm cho trang chủ

image

CONVENTION CHO FRONT-END

  • Sau khi thêm đầy đủ ngôn ngữ ở /Resources/*.resx, thêm System.Resources.ResourceManager rm = GUEST.Models.LanguageResource.GetResourceManager(); ở đầu file .cshtml và gọi resource theo cú pháp rm.GetString("YourLabel")

image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 74.8%
  • CSS 19.9%
  • HTML 4.2%
  • C# 1.1%