Re: [闲聊] 软件界的晶晶体

楼主: CoNsTaR ((const *))   2019-09-16 17:34:17
※ 引述《kobe0834k (184.9)》之铭言:
: 最近“晶晶体”很夯
: 不管是政治人物、新闻媒体、网红Youtuber
: 近期话题很多都围绕在这上面
: 姑且不论晶晶体的好坏 以及追着这个话题的人的目的性
: (酸酸开战?求点阅率?)
: 个人是觉得 没什么差啦
: 沟通这件事的本质 本来就是互相看得懂、听得懂就好
: 不需太过双重标准
: 去断定、开酸或嘲笑晶晶体爱用者
: 自己却还是用着“神烦”、“BJ4”、“GG思密答”等等新兴网络用语
: 其实基本本质都是一样的啦
: 不过话虽如此 自己近期在 面对面沟通、Mail、通讯软件上
: 也开始注意别夹杂两种语言 让别人有嘲笑的机会
: 考量全英文可能更加降低沟通效率 所以决定全中文......
好奇试了一下全英文,不要嘲笑我的英文谢谢 QAQ
Sam,
I just checked & reviewed the code for today and have done some refactoring to
your code. Please check the following advices.
Firstly, to be consistent with existing code, please add notes to each attribu
te inside Model, such as functions like mandatory, str_length as well as other
validation rules which apply.
Also, do not verify data with frontend JavaScript, all the data verification s
hould be done with MVC pattern, which is descri
bed in Microsoft's standard. (by following the standard, data verification can
be done automatically under the linking process)
Another thing here, don't forget that Controller's behavior can be decided eas
ily because we have access to Model status from inside of Controller. (you mig
ht want to add a selector for that to avoid repeating the same process again a
nd again)
Second, make sure transaction is used when any involves DB access or modificat
ion to multi-table.
A rollback is also necessary to ensure data integrity when an exception occurs
.
The last thing to add, try to achieve page redirection with "POST" instead of
"GET" to prevent exposing parameters in the url. (see the sample program for d
etails)
EWWW!!!
: 山姆,
: 今天的程式码我看过了,帮你做了程式码复习与重构,
: 这里有几点建议请你以后注意一下。
: 首先是模型的部份请在各个属性上加上资料批注,像是“必需”、“字串长度”
: 等等验证规则,此为专案中的一致做法,别在前端撰写爪哇脚本去验证资料
: 用微软模型、检视、控制器内建议的标准写法即可
: 在模型系结时,会自动判断验证通过与否,
: 控制器内可以透过取得“模型状态”来决定运作流程
: 当然每个控制器都这么判断实在没完没了
: 所以可以写在动作筛选里面
: 第二点,数据库存取与更动的动作,牵涉到多个资料表的情况请记得使用交易,
: 搭配试、接区块的使用,有例外状况就回滚,保证资料的正确性
: 最后,页面跳转的方式尽量不要使用“得到”方式然后在网址列丢查询参数
: 尽量使用“提交”的方式,详细可参阅范例程式
: 咦?
作者: LinuxKernel (Linus Torvalds)   2019-09-16 18:44:00
END
作者: w0005151 (蓝厅)   2019-09-16 18:59:00
想表达什么?
楼主: CoNsTaR ((const *))   2019-09-16 19:34:00
全中文行不通试试看别的选择啊 orz原 Po 说全英文会降低沟通效率我就做个实验这样
作者: jyunwei (jyunwei)   2019-09-16 20:30:00
这里不是英语学习版
作者: pttworld (批踢踢世界)   2019-09-16 20:59:00
有没有人可以翻译成阿拉伯文的
作者: paoju5566 (paoju)   2019-09-16 22:18:00
师爷,你给我翻译翻译!
作者: pyCassandra (Q口Q)   2019-09-16 23:05:00
advice 不是advices =)
作者: senjor (哞哞)   2019-09-16 23:40:00
我英文不好,可以讲中文吗?
作者: bitcch (必可取)   2019-09-17 01:42:00
好台式的英文
作者: GGFACE (ggface)   2019-09-17 02:39:00
==想表达什么
作者: bill0205 (善良的小孩没人爱)   2019-09-17 07:54:00
你说中文吧
作者: banana13 (黑暗香蕉)   2019-09-17 08:27:00
程式国外的东西,比起“得到”“提交”好看的懂
作者: pelicanper (派立肯)   2019-09-17 18:20:00
这真的台式,赘字太多
作者: ken90242 (大人)   2019-09-17 20:02:00
作者: keyut2433 (keyut2433)   2019-09-18 07:14:00
建议你列成bullet point.

Links booklink

Contact Us: admin [ a t ] ucptt.com