处理这些常量,我现在知道的有以下几种做法:
1.直接写在页面
2.数据库建立字典表
3.项目里面添加一个文件记录下这些常量
可以存储为xml\静态变量\json格式
想请教下,你们用的是哪种方式?不同的方式之间选择的原则是什么?
高洛峰2017-04-17 11:07:50
Write big changes into the database, use constant arrays for small changes, and write unchanged ones into the page
黄舟2017-04-17 11:07:50
If it doesn’t change frequently, write it directly on the page, such as gender~ Only men and women don’t need a database at all. There are only a few academic qualifications. If there are changes, they will be saved in the database.