To Mozilla HQ: It’s about time to launch a Firefox OS Project

I’ve talked about Firefox OS during several offline occasion; some people find the concept hard to understand, some, agreed with me, suggested that I should put everything together in written so people at large would know about it. Here are the reasons why I believe Mozilla should start working on an operating system based on Firefox.

1. To enrich the add-on ecosystem

Before Apple’s iTunes Apps Store for iPhone, and iPod or iPad later, Mozilla Add-ons was one of the largest collections of web software. The add-ons does from simply help people to access content to development tools. However, after 5 years of introduction of Firefox and it’s extension framework, people find it hard to formulate a business model with it – Mozilla try to cope the problem with donation system incorporated within the add-on site, however, with the proven model from the competitors, developers had shift their focus to these new platforms. Echofon, once called TwitterFox, would not be able to deliver a paid “pro” version successfully if it had not reach other platforms.

By developing an Firefox OS, Mozilla could make proof to developers in the ecosystem that Firefox is more than a browser, and their hard work is more than browser add-ons. I am not saying turning Firefox into an OS would immediately make add-ons development profitable – however, it might not never be if there is no OS.

2. To provide an alternative browser OS

When I talked about Firefox OS, people often compare my imaginary OS with Chrome OS. It’s comparable, yet, the Google’s approach might not be the best way. For instance, Google intend to copy Apple’s business model, creating an centralized Chrome Web Store, defeat the purpose that web should be a platform without a controlling vendor.

Should Mozilla had working on a Firefox OS, it not only provide an alternative to Chrome OS, but it also give users valuable choices on browser OS front. Alternative is not about playing the RMS card – that every software should have a libre alternative – instead, the existence of the strong enough alternative is the key to drive innovation.

(Don’t believe me? Think about IE6.)

3. To deliver better user experience in Firefox

The recent development of Firefox 4 bring exciting UI changes that align with many modern browsers, like Application Tabs or TabCandy, later known as Panorama, which enables user new innovate ways to organize information and works.

These powerful features, nevertheless, doesn’t work within an application as tiny as a browser sometimes. Before Panorama, I usually group my works in different browser windows, so I could switch between them on Windows taskbar. After trying Panorama, along with Application Tab, I don’t think it works as well as Exposé in Mac OS X, or even what I did. For example, app tabs are always visible no matter what Panorama work space you selected, yet in Panorama view app tabs actually belongs to a group – this results confusion. What’s worse, click in any app tab in another work group immediately brings you to that group, with no fast way to switching back.

Another example would be the UI change decision about bringing tabs on top of the toolbar. I agreed with the decision to bring tabs to top; but when I pressed F11 to make my Firefox window go full screen, I found the close window button (the X) was not on the top-right corner of the screen (which, according to Fitt’s law, is a hot spot for cursor aiming, and, according to the logic of Windows OS, should be always the place to close a maximized window).

These examples might be just tiny issues that come with a beta version of Firefox; I believe most of them will be fixed by talent people at Mozilla before the final version releases. Nonetheless, these are the evidence that how messy it would be to ask an browser within an operating system to manage it’s own tasks – We should definitely work on these user experience innovation, however a Firefox browser will always be a constraint for these interaction innovations – A Firefox OS will not. By developing a Firefox OS with these innovations, Mozilla will certainly have a better chance to polish them before they were brought to the browser.

Ever since Windows 95, binding between tasks in browser window and tasks in client applications has always been a key issue. Windows 7 introduced jump list; IE9 users will be able to pin websites on their Windows task bar. A Firefox OS will help Mozilla developers come up with even better interaction, instead of endlessly implement what Windows, or other OS APIs enables applications (browsers) to do.

4. To defend the Open Web

Mozilla is a foundation with limited resource. Everything it does has to be somehow connect to its mission. A Firefox OS project will undeniably connect to the cause. Here is one of the reasons why: Today, users prefer mobile apps than [mobile] web.

I twitted the link sometimes ago. The sad inconvenient truth is, if people access information mainly from apps but not the through the browser, the browser itself will be irrelevant. Eventually, the web itself will be irrelevant, along with the promises of the Open Web that Mozilla holds true. Yet, this is exactly what is happening right now on the mobile front.

(Stilling thinking about bring a full Firefox to iOS is important? IMO it brings more buzz than piratical use.)

Firefox OS has the potential to become not just browser OS for web platform but also a truly open platform. Think about a slightly exaggerated future, where desktops, OSes, and applications on it seize to exist. People would access information on the Internet without going through the Web (and HTTP) but using devices and site-specific applications using socket connections. In that future, there are better be a vendor that continue express interests of openness through technologies and end-user products, and let that vendor be Mozilla, even though the Web as we know it seize to exist. Firefox OS could be that end-user product, just like Firefox 1.0 did to the web almost 6 years ago. Firefox OS could ultimately transform itself beyond browser, or browser OS, but first Mozilla need to make a browser OS.

Thus, to Mozilla HQ: It’s about time to launch a Firefox OS Project.

Responsive Web Design

Ethan MarcotteResponsive Web Design布丁爸爸說這是 2010 上半年最重要的文章之一

內文主要是在闡述一個重要的 Idea:「Responsive Web Design」。隨著 Web 從 PC 螢幕移動到各式各樣的裝置,為每個裝置設計不同的網站版本(iPad 版、iPhone 版、手機版)是個 viable 但是不 scalable 的解決方法。作者認為,網站開發時如同「Responsive Architecture」的概念一樣,讓環境去適應使用者的存在 -- 像是自動調節室內溫度、將窗戶霧化以保護隱私等。網站設計不應該是平面出版的電子化,存在於固定的版面、文字大小、圖文配置;設計應該要自然的適應不同的裝置,自動調整版面的 flow,甚至是互動 UI 的大小等等

實作的細節,作者花了後半的篇幅在介紹 CSS media query。Media Query 是以前 CSS 2 的 media type 延伸,不同的是它不只是一組預先設定好的媒體(螢幕、紙本、點字、語音…),它可以讓開發者自行設定 CSS 規則適用的裝置類型、寬度等等。文章內提供了具體的範例,展示了使用 Media Query,作者可以指定當裝置的螢幕寬度小於多少、或是介於多少時,網頁可以隨之切換欄數、圖片寬度、圖文配置等等。

我自己把文章印了出來(地球對不起 > <),認真讀了一遍,滿有收穫的。雖然 CSS media query 是早就知道的東西,但是不了解前面的設計哲學與意義就不會有動機去玩它(現在就超有動機的哈)。作者的文筆讓人耳目一新,闡述概念的方式相當的生動,可以拿來練英文(真的)。

有個研伸的問題,作者也有簡略提到。CSS media query 解決了排版適應裝置畫面的問題,但如果開發者希望在不同裝置呈現不同的內容,甚至不同的互動時,多版本網站還是解法。如果只是幾行字,或許可以用 display 屬性開關切換掉,但總不會 Facebook 套了另一份 CSS 就變成 Facebook for touch devices:P

知識信用與 HTML5

Chris Blizzard 的文章 intellectual honesty and html5,正中我上篇文章講的 Apple 如何假裝開放實際上還是在做 vendor locked-in 的陰謀(陽謀?)。只是這次做的太明顯然後就翻船了。

Blizzard 主要的論點是 Apple 竟然大聲說他們喜歡創新的網路,那出來的產品跟作法就要言行一致 -- 尤其是 HTML5 這一系列的創新本身的目標之一就是互通性 -- 不能到處廣告說 Safari 支援 HTML5 然後故意把其他也支援的瀏覽器從示範網頁排除掉;這種顯然是沒有信用、不誠懇的傳遞知識的做為。

Mozilla 的 Sayre 做了一個很酸的 HTML5 demo,哈哈哈 (當然不代表 Mozilla 的立場)。

HTML5 File API + XmlHttpRequest = SWFUpload, now what?

So what should you do if you decided to ditch SWFUpload and embrace HTML5 solution for ajax file upload? In honor of the releases of Firefox 3.6 (with File API), I decided to just that in the GFX Firefox promotion site. (sounds perfectly reasonable to use Fx-only technology on such site, right?) Firefox now gives us the bricks (File API, binary XHR, and File drag-drop), but to build a house it still takes some work. The Mozilla Hacks demo works great but to work with the existing site I need:

  1. To create a SWFUpload-like button that opens file selection dialog instead of HTML form file input.
  2. To send the file as a ordinary file upload form – no need to change php backend to handle raw post
  3. Send the file by jQuery.ajax, firing global callbacks

I came up with these methods to solve them:

Continue reading

Firefox 的預設 Windows 中文字型預設值修改提議

如果您不想看這落落長的解釋,請往下捲看範例,分享一下您覺得哪個比較好看、容易閱讀。

Firefox 的預設中文字型設定存在 about:config 裡面的 font.name-list.*.zh-TW,裡面列出的字型在下列情況下會被套用在出現的文字上:

  • 文字是中文,且
  • 網頁沒有指定任何中文字型或指定 generic font name,且
  • HTML 元素的 lang 屬性
    • 設定在 zh-TW,或
    • 設定語言的 font.name 與 font.name-list 屬性沒有任何中文字型且 Firefox 為中文版

目前 sans-serif 和 serif 字型的預設值都放在 PMingLiu,也就是新細明體/細明體。既然 Microsoft 在最近的 Windows 與 Office 提供了新的字型「微軟正黑體」,或許我們可以考慮把這兩個預設值換過去。

Why fix something that is not broken?

是不是「broken」,要看您怎麼定義它 (^^;)。新細明體多年以來是網路設計師唯一的選擇(標楷體太醜了不考慮),在螢幕解析度隨著科技進步,我們再也不需要點陣字才能看清楚中文筆劃的時候,貼近作業系統廠商所提供的新功能是比較好的方向。

新的 Windows 瀏覽器,例如 Safari 與 Chrome,已經將設定換到正黑體了。新版的 Opera 也是。

那就直接改吧,有什麼問題呢?

有一些 pros and cons 需要釐清;雖說是大哉問,因為我們沒有量化的數據可以確定:

  • 正黑體在某些電腦上反而是比較難看的字型,例如沒有開 ClearType 的 Windows XP,或是開了卻沒有 tune 過。
    • 沒有正黑體的電腦不管預設值怎麼改都沒差。
    • 不確定「特別安裝了正黑體」的 Windows XP 的比率。或許約等於 Office 2007 的比率?
  • 必須在「使用者習慣」與「提供更好選擇」做抉擇。
    • 市場上只剩下 IE6/7/8 還是預設在新細明體呀,改到正黑體變成是產品差異化,但是使用者喜歡這個差異嗎?
    • 很多知名的網站會掉進上列的字型套用條件,對使用者的感受相當大。
  • 一般使用者很難找到這個設定值
    • 選項視窗裡面的字型是 font.name.*.zh-TW,當年因為不想讓語言屬性影響英文字的顯示,所以一直都放在 Arial 與 Times New Roman。
    • 中文字是因為那兩個字型沒有那些字所以才找 font.name-list 裡指定的字型的。
    • 如果使用者不喜歡,他無法從選項視窗改回來。

來個有圖有真相吧

簡單來說,如果大家覺得不錯,我們可以把 Windows XP 上的 Yahoo 奇摩首頁從這個樣子(點進去看完整圖):

yahoo-part-ming

變成這個樣子:

yahoo-part-hei

這兩個 screenshot 是在 Windows XP 上開 ClearType (沒有 tune 過)的結果。想要測試自己的電腦,請打開 about:config,輸入 zh-TW,修改兩個 font.name-list,從「PMingLiU, MingLiU」改成「微軟正黑體, PMingLiU, MingLiU」。歡迎提供 Vista 或是 7 上面的 screenshot (話說我還真的不知道有什麼不同)

Update: Windows 7 和 Vista 下面有回應回報 ClearType + 正黑體不會太細。

已知此設定會影響的網站有:Yahoo!奇摩首頁、Google 首頁、PIXNET 首頁、無名小站首頁、Facebook 英文版上的中文字(中文版把語言指到 zh 所以沒有影響)、GMail、Twitter、Plurk 預設模板

所以?

告訴我您認為哪個字型比較容易閱讀吧。網頁設計師如果有一些經驗和數據可以分享,也請不吝指教。

番外篇:那其他作業系統呢?

Mac OS X 的設定很歡樂的放在 LiGothic,而不是 Snow Leopard 萬惡的 Heiti TC。倒是在討論這件事情的過程我們發現 monospace.zh-TW 指定的字型是錯的,這個已經開 bug 報上去了(感謝 Irvin)。

Linux 則是完全沒有寫 font.name-list 預設值 … Firefox 會很合理的去拉 Gnome 與系統 fontconfig 所定義的 sans-serif 與 serif 字型。