2019-11-08
很多时候我们傻傻分不清
create, add, new
-create 表示从没有到有, 产生了新的东西
-add 通常是把某个东西添加进去某个东西,比如 add to cart, 通常产生的是一个关系,而不是一个具体的东西
-new 通常是 ui 用的
update, change, edit
-update 是修改内容, 产生新的值
-change 是替换,一个还一个
-edit 通常用于 ui
delete, remove
-remove 是移走, 消失的往往是关系.
-delete 是删除,真的把东西给消失掉了。
pascal case = PascalCase
camel case = camelCase
hyphen = blog-title
upper case = UPPERCASE
lower case = lower case
title case = Blog Title
backend c#
class = pascal case
property = pascal case
enum key = pascal case
variable = camelCase
parameter = camelCase
folder and file = pascal case
frontend js/ts
class = pascal case
property = camelCase
enum key = pascal case
variable = camelCase
parameter = camelCase
folder and file = hyphen
url = hyphen and lowercase
当命名遇上 short form
abbreviation 单字缩写
identity, identification = id
quantity = qty
acronym 多字首字母缩写
input output = IO
world wide web = WWW
abbreviation 就继续小写没事儿.
acronym 就比较麻烦, 有时候全部大写会很乱
有些人会把他变大小写,有写人不会...
我认为最好是保持大写吧.