Chen Yangjian's Blog

Carpe diem - Seize the day

再说 Web Development

| Comments

比较讽刺的是,虽然看了许多前端的、后台的书,关注了许多 UED,订阅了 /r/web_design (这个 subreddit 其实没啥花头),做了一些 demo 网站,但是我从未正经做过牛鼻的。

不过应该不妨碍我在此大放厥词。道理是,我已经承认自己不要脸了,你们再调戏我也无用 XD。

今次要说的是,网站开发的时候遇到的种种麻烦事,算是对 两个 讨论 的总结。

第一个麻烦,是 Browser Support。主流浏览器,或者以渲染引擎作计数,有仨,Safari、Chrome 等所使用的 Webkit,Firefox 所用的 Gecko,IE、Maxthon、Green Browser、The World Browser 等等披着n种皮的 Trident,当然,还有 Opera (但是……你真的很小众,欧洲的情况应该好很多)。而网站开发的时候,先抛开后台,前端就已经有三种语言、四个浏览器、三种操作系统(不同平台上的浏览器行为可能会出现差别,最显著的是 OSX/IE 和 XP/IE),再加上各种语言的版本(JavaScript、CSS、HTML/XHTML)。以上,其实并非我的总结,只能说是对 YUI 某工程师的 PPT 的转述(Nate Koechley)。

不过,如今的情形其实已经没那么糟。XHTML 已经可以就义了,它为 HTML 5 和 HTML 4 Strict 做的备胎工作圆满完成。JavaScript 与 CSS 在桌面与膝上电脑上的浏览器支持已经越来越好,PPK 甚至因此觉得有点小失望

A year ago I already noticed that I became less and less interested in measuring the desktop browsers’ compatibility. Everybody just supports all the standards, even IE, and in my last round of desktop testing I did not encounter even one juicy new bug. Great for web development, boring for me.

他的主要工作已经转为手机浏览器的兼容性测试。

事情在往好的方向走,但是尚不足以认为可以以任一浏览器作基准开发 one fits all 的 webapp。有完美主义者总觉得各种各样的 hack 太让人讨厌,总因此认为这是不对的。我也算是其中一份子。不过事实摆在眼前,除了“Swallow my dignity, along with six tequila.” 确实暂时木有啥好办法。

第二个麻烦,也是最大的麻烦,就是客户。客户永远是小气的,对程先生们总是表示不理解。“我真搞不明白你们这些人,一天下来写三行代码。你们要做的就是打字而已诶”。详情请围观 clientsfromhell

Client: “This is absolutely wrong. Where’s all the HTML. We want the HTML?”

Me: “I don’t understand. All the files should be on the flash drive we gave you yesterday.”

Client: “Well… whats all this php jumbo-mumbo?”

Me: “PHP is just a language. It does all the work for your CMS. You can’t have CMS with only HTML files.

Client: “I get it. You just don’t understand. WEB-SITES-ARE-MADE-OF-H-T-M-L… or did you not learn that in whatever school you went to?”

Me: “I didn’t go to college.”

Client: “I’m working with a bunch of idiots.”

通常 freelance web development 的情节线路图都是这样的:

Profit |----------| Grief
                ^

Comments