TypeKit and Web Fonts

For the project I currently come across is a very stylished corporation website. The site’s designer intends to use special font-face to empharise the brand feeling. This allows me find out something call TypeKit and Web Fonts.

In early web development period, whenever web designer need to use special font face, they may require people to download and install that particular font to client machine. When CSS turns out to a more widely used pratice for web layout control, we use font-family for assigning the font-face we use. But these techniques not yet help web designer to achieve something they want: the use of special, non-widely adopted font face, to their web product.

TypeKit and Web Fonts come to the place for this purpose, with the evolution of cloud service development. TypeKit and Web Fonts acts as a font provider for online purpose. They work in this way:

  1. Web designer sign up for the online font service
  2. Select font face that provided by TypeKit/Web Fonts and define CSS selector for assign font-face effect
  3. Generate JavaScript Snipplet for the fonts service
  4. Put the snipplet to designated web page so as to provides necessary font resource to the web page the snipplet was adopted. Designated CSS selector will take effect with the web font

Therefore, without explicitly storing the font raw file, no installation step on client side. By this mean, web designer can use their ideal font and client side can enjoy the visual effect without any extra font installation.

TypeKit does not provide as many font as Fonts.com Web Fonts provides. And as a Chinese, what I can observe is that TypeKit does not provide any chinese font-face.

Making good use of this technique can definitely help enhancing web layout while not affecting the site SEO concern, say no longer need to use image replacement to show special font design in some case.

Typekit: http://typekit.com/

Fonts.com Web Fonts: http://webfonts.fonts.com/

Cross Browser Compatibility & Progressive Enhancement

隨著網路的發展,網頁所包含的不單止有文字圖案,不同種類的多媒體應用漸漸被應用於一些尖端前衛的網站上,固有的瀏覽器未必能應付這樣的需求。由Internet Explorer vs Netscape 的年代開始,瀏覽器的戰爭自此沒有停過。林林種種的瀏覽器出現,Firefox, Chrome, Safari, Opera等等,對用家來說是多了選擇,對Web Developer來說分分鐘是惡夢的開始。

假如各門路的瀏覽器能夠把任何一個網頁都一致地呈現,這是最理想的情況。但事實上各家各有自己對網頁的編譯方法,甚至運行上的不同做法,都使 Web Developer 再神勝不過。意思說,作為 Web Developer ,有責任的話,他需要讓其製作的網頁能在絕大部份的瀏覽器 / 視窗平台中順利運行,這就是所謂 Cross Browser Compatibility 。要做到這點,並不是把一切基本網頁編寫的 HTML,JavaScript 學會就是了。還得要從各個瀏覽器的特性方面著手。由標準HTML (W3C Standard HTML)學起,到逐步了解不同瀏覽器對 HTML 的演譯方法,接著學寫標準的JavaScript,並且查找某些JavaScript在不同瀏覽器中編寫文法的例外,到較後學習如何利用CSS對版面作改動,與及留意不同瀏覽器所支援的 CSS 版本,為網頁作出適當的 CSS 調整。

從前 Cross Browser Support 主要依賴人手在各個瀏覽器上作測試,而現在坊間有說多途徑去減化這些測試動作。這個網站羅列了數個測試方法:

7 Fresh and Simple Ways to Test Cross-Browser Compatibility | FreelanceFolder

詳細的不說了,重點就是作為 Web Developer ,對自己所製作的網站傑作,都應該執行 Cross Browser Compatibility 測試,好使自己的作品不會在某些執行環境中出洋相。

當然,在云云瀏覽器存在的世代,正如我說不同瀏覽器對網頁的呈現會有不同的演譯方法,然而強行要將一個網頁完全順利一式一樣的在各個瀏覽器呈現,並不是沒可能,只是不夠實制。比方說,對不同瀏覽器對網頁中的元作執位方面會有偏差,這個還不算太難應對。但對一些網站運用了許多視覺優化,如圓角表單、文字陰影、背景漸變等等,從前人們會用 Table、Div或背景圖來規劃一些組件來製作相關效果。但隨著 CSS 的廣泛應用,CSS版本進展到CSS3,利用它能夠將許多效果實現。這些進化了的效果在較舊的瀏覽器上當然未能完整呈現,但呈現出的結果因背後有 Backward Compatibility 的概念而也不算太強差人意。這個網站有提出一個例子解釋:

When Should You Use Progressive Enhancement

嗯,本文另一個字眼出現了:「Progressive Enhancement」。其大意是一個網頁的表現結果在各個瀏覽器都大致一樣,唯獨對新技術有所支援的瀏覽器中,會展示較好的呈現結果。以上網站顯示了一個表單資料的顯示情況。用較新的瀏覽器觀看網站,會得到較漂亮的版面,然而在較舊的瀏覽器中,亦不失其功能上的表現。當然,對於一些不明白上文所述的一切,又要要求 Web Developer 把網頁做到在任何網站一式一樣的老闆來說,那只有苦了該 Web Developer 去花心機時間做盡一切方法將其老闆的想法實現。

HTML5 vs Flash

算不上是什麼 web development 方面的技術差異的偉大分享,以上純綷是個人對 FLASH 和 HTML5 的一點看法。

雖然花了一段時間學習 HTML5 ,算不上上手,而另一方面則利用 ActionScript 寫了數年 FLASH。老實說,當初還使用著Pentium II 有256MB記憶體的年代,我對FLASH頗有微言。每每遇著一些無謂的網站開場動畫,光飛了些字然後才能進入網站,這些多餘的步驟其FLASH動畫經已耗掉我那台電腦的大部份資源,該些網頁看下去也沒意思。可是,當慢慢接觸多些比較有深度,可看出製作時花了不少心思的FLASH SITE(整個站台也是FLASH建構),與及隨著科技日新月異而多番昇級電腦機件,才能漸漸意會 FLASH 能帶給網路使用者更高層次的視覺享受和使用經歷(Site User Experience)。

無疑,FLASH 的確對其運行的電腦有一定的資源需求。很公平,有華麗效果當然需要相對的運算能力來造就。就正如你也不可能期望飛機能單靠那四個引擎飛上大空,總得附上兩三節推進器來看離地球擺脫地心吸力吧。然而在 HTML5 漸露頭角,人們一窩峰清算 FLASH 如何耗能,預測 HTML5 如何能替代 FLASH 的地位,我倒覺得這還有一段很長的路途。因為就算 HTML5 配搭 JavaScript 可達到編程層次來呈現互動效果,但單靠各家的瀏覽器來作為運行介面,總比不上 FLASH 利用自家經優化運行的 FLASH PLAYER 來執行運算程序來呈現效果來得可靠。FLASH PLAYER 對不同平台為 FLASH 檔案提供相對應的優化,有 ADOBE 來進行技術圍護和發展,這是 FLASH 能由簡單的動畫短片表現界系進化到站台開發與及互聯網應用軟體應用這一個廣域應用。

在細小的網站開發,HTML5可能讓網頁開發員花一點小功夫來把網站變得較美觀和添加互動元素。但論及大型網站開發,現階段 FLASH 仍然勝於 HTML5,至少Flash IDE 能提供一個比較完善的開發介面。

這寫分享其實出於為 FLASH 抱不平的心態,一些人對 FLASH 反感實在只是出於偏見。然而人們若能夠以開放的心態去了解 FLASH 這一門和學習如何好好應用 FLASH 來弄網站,這才能真正讓網頁開發的將來大放異彩。

Move from PHP to JSP, the starting point of learning thing in all new

It has been around 8 years I work with PHP + MySQL, with additional technique like ActionScript 2.0/3.0 and Flex, jQuery, Ajax to enhance the front-end design, I start exploring a new era in my life recently, the JSP and related knowledges.

When talking JSP, JAVA is involved as well. I didn’t learn JAVA with a complete course, so does JSP. At first I think ‘they are just programming language, it shouldn’t be hard to master it as long as it is Object-Oriented Programming language. But the more I read about JSP/JAVA, the more unclearness I encountered, and it really a tough stuff to master, especially there are many new concepts that are different from PHP or MC++.

The first step to master JAVA/JSP is to setup an environment for running your test script/sample script. Setting ‘JAVA_HOME’ is not difficult, but for some package code, it is far from easy to make the stuffs work finally. ‘Servlet, JavaBean’ those are new idea to me. Server like Tomcat/jBoss keep surrounding my mind without figuring them out clearly. It makes me more agree with that, despite the scalability of JAVA is far stronger than PHP, PHP make rich internet application development much easier.

I am still on the path of learning JAVA, JSP, Servlet. Hope to see anyone who skillful in PHP can provide easier way in mastering JSP.

What should a Front End Web Developer be?

Previouly I was a guy being called as Interactive Developer, help previous boss making his cool stuffs from concept into similar real visualization, no matter using ActionScript 3 to write Flash or using jQuery to write XHTML. Now come to a new job titled as Front End Web Developer, I try to look deeper in what the role should a Front End Web Developer be.
Continue reading What should a Front End Web Developer be?