Re: [閒聊] 軟體界的晶晶體

看板Soft_Job作者 ((const *))時間4年前 (2019/09/16 17:34), 4年前編輯推噓3(637)
留言16則, 15人參與, 4年前最新討論串3/3 (看更多)
※ 引述《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!!! : 山姆, : 今天的程式碼我看過了,幫你做了程式碼複習與重構, : 這裡有幾點建議請你以後注意一下。 : 首先是模型的部份請在各個屬性上加上資料批注,像是「必需」、「字串長度」 : 等等驗證規則,此為專案中的一致做法,別在前端撰寫爪哇腳本去驗證資料 : 用微軟模型、檢視、控制器內建議的標準寫法即可 : 在模型繫結時,會自動判斷驗證通過與否, : 控制器內可以透過取得「模型狀態」來決定運作流程 : 當然每個控制器都這麼判斷實在沒完沒了 : 所以可以寫在動作篩選裡面 : 第二點,資料庫存取與更動的動作,牽涉到多個資料表的情況請記得使用交易, : 搭配試、接區塊的使用,有例外狀況就回滾,保證資料的正確性 : 最後,頁面跳轉的方式盡量不要使用「得到」方式然後在網址列丟查詢參數 : 盡量使用「提交」的方式,詳細可參閱範例程式 : 咦? -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 174.112.170.249 (加拿大) ※ 文章網址: https://www.ptt.cc/bbs/Soft_Job/M.1568626459.A.16B.html

09/16 18:44, 4年前 , 1F
END
09/16 18:44, 1F

09/16 18:59, 4年前 , 2F
想表達什麼?
09/16 18:59, 2F

09/16 19:34, 4年前 , 3F
全中文行不通試試看別的選擇啊 orz
09/16 19:34, 3F

09/16 19:37, 4年前 , 4F
原 Po 說全英文會降低溝通效率我就做個實驗這樣
09/16 19:37, 4F

09/16 20:30, 4年前 , 5F
這裡不是英語學習版
09/16 20:30, 5F
是的

09/16 20:59, 4年前 , 6F
有沒有人可以翻譯成阿拉伯文的
09/16 20:59, 6F
阿拉伯人渥太華很多,梵文的有沒有

09/16 22:18, 4年前 , 7F
師爺,你給我翻譯翻譯!
09/16 22:18, 7F

09/16 23:05, 4年前 , 8F
advice 不是advices =)
09/16 23:05, 8F
Thanks

09/16 23:40, 4年前 , 9F
我英文不好,可以講中文嗎?
09/16 23:40, 9F
可以

09/17 01:42, 4年前 , 10F
好台式的英文
09/17 01:42, 10F
外國人也是這樣講話,不台式啊

09/17 02:39, 4年前 , 11F
==想表達什麼
09/17 02:39, 11F
讓我想想

09/17 07:54, 4年前 , 12F
你說中文吧
09/17 07:54, 12F
對不起

09/17 08:27, 4年前 , 13F
程式國外的東西,比起「得到」「提交」好看的懂
09/17 08:27, 13F
GET POST ? ※ 編輯: CoNsTaR (174.112.170.249 加拿大), 09/17/2019 08:52:06

09/17 18:20, 4年前 , 14F
這真的台式,贅字太多
09/17 18:20, 14F
贅字多是formal,臺灣英文可能不分場合都硬要formal?

09/17 20:02, 4年前 , 15F
09/17 20:02, 15F
這我的文,還是你先吧... ※ 編輯: CoNsTaR (174.112.170.249 加拿大), 09/17/2019 20:54:12

09/18 07:14, 4年前 , 16F
建議你列成bullet point.
09/18 07:14, 16F
感謝建議,但我做的只是翻譯原文,這樣才有參考性 ※ 編輯: CoNsTaR (174.112.170.249 加拿大), 09/18/2019 08:42:34
文章代碼(AID): #1TVrSR5h (Soft_Job)
文章代碼(AID): #1TVrSR5h (Soft_Job)