Tuesday, November 20, 2007

GWT and Android: A marriage made in heaven?

The Google Web Toolkit has many awesome advantages for developing AJAX applications: Reuse of your favorite toolchain features (IDE, codeassist, debugger, refactor, build, etc), as well as producing much more compact Javascript code than any JS compiler/obfuscator can ever hope for. But one feature that initially caught our eye was the ability to reuse code in multiple environments.

Chronoscope started as two separate projects. The first, a prototype server-side renderer for Timepedia using the very capable JFreeChart. The second, a pure-JS canvas version written to test the ability to do AJAX charts without Flash. The JFreeChart version then became the version which would be used for static chart icons, sparklines, fallback for older browsers, and export to PDF/SVG.

Immediately, we encountered the problem that the two code bases had different features, different rendering style, which required laborious coding to keep them matched as close as possible. Over time, as the feature sets evolved, it became harder and harder to keep the JS client charts and server-side charts in sync.

Then Google released GWT and it immediately offered a solution: Write one chart library, in Java, and deploy to Servlet, Applet, Browser JS, and maybe J2ME and Flash. It was an enormous promise, and we initially adopted GWT for this purpose without realizing the other tremendous benefits that GWT provides for developing large JS codebases.

Early on, we produced prototypes of GWT Chronoscope running in servlet and applet environments, but with the release of the Android SDK, the initial promise has been fulfilled: GWT code running in a mobile environment.

The following is a screencast demo showing Chronoscope, with no changes to the core codebase running in the Android SDK emulator natively (not in the web browser).



It required about 8 hours to get this working. Most of the time was spent finding the Android equivalents of Java2D calls, and writing 6 Java classes (the Chronoscope Canvas abstraction layered over Android Graphics API)

At this point, we've only touched the tip of the iceberg. Future enhancements in GWT may allow this portability to go even further, such as compiling to ActionScript.

If your attending the GWT Conference on December 3-6, feel free to track down Ray Cromwell or Shawn O'Connor for a live demo.


p.s. There are no ticks or axis labels being shown in the sceencast to maximize screen real estate as well as performance. Android SDK text rendering is a drag on performance at the moment.

5 comments:

dflorey said...

Wow! This looks very promising. So you use the GWT-compiler to generate the Android code instead of Javascript?

Paweł Sołyga said...

@dflorey: Both GWT and Android apps are written in Java. It's more like porting Java code written for GWT to Android SDK so it works nice on Dalvik virtual machine.

Anonymous said...

(法新社倫敦四日電) 英國情色大亨芮孟的公司a片下載昨天說,芮孟日前成人光碟去世,享壽八十二歲;這位身價上億的房地產a片開發商,曾經在倫敦推出第一場脫成人電影衣舞表成人影片演。


a片下載孟的財產估計達六億五千萬英鎊情色電影(台部落格幣將近四百億),由於他名下事業大多分布在倫情色電影敦夜生活區蘇成人活區,因此擁有「蘇活之sex王」的稱號。
av女優
部落格
他的公部落格司「保羅芮孟集團成人影片」旗下發a片行多種情色雜誌成人電影,包括「Raav女優zzle」、「男性世成人網站界」色情影片以及「M色情ayfair」成人


芮孟本名傑福瑞.安東尼.奎恩情色,父親為搬運承包商。芮孟十五歲離開學校,矢言成人影片要在表演av事業留avav,起先色情a片表演讀心術,後來成為巡迴歌舞雜耍表演的a片製作人。


許多評論家日本av認為,他把情色表演帶進主流社會情色,一九五九年主持破天荒的脫衣色情舞表演,後來更靠著在蘇活a片區與倫敦西成人網站區開色情發房地產賺得大筆財成人網站富。
AV片

av女優有人情色視訊形容芮孟是英國的海夫納,avavdvd位等同美國的「花花公子」創辦人海夫納。

Anonymous said...

守護甜心影片女藝人素顏照女藝人素顏照女藝人素顏照女藝人素顏照女藝人素顏照女藝人素顏照女藝人素顏照女藝人素顏照女藝人素顏照女藝人素顏照亞洲禁果影城短片亞洲禁果影城短片亞洲禁果影城短片亞洲禁果影城短片亞洲禁果影城短片亞洲禁果影城短片亞洲禁果影城短片亞洲禁果影城短片亞洲禁果影城短片亞洲禁果影城短片歐美成人短片區歐美成人短片區歐美成人短片區歐美成人短片區歐美成人短片區歐美成人短片區歐美成人短片區歐美成人短片區歐美成人短片區歐美成人短片區美女網友自拍分享區美女網友自拍分享區美女網友自拍分享區美女網友自拍分享區美女網友自拍分享區美女網友自拍分享區美女網友自拍分享區美女網友自拍分享區美女網友自拍分享區美女網友自拍分享區蕃薯藤交友 - 成人聊天區蕃薯藤交友 - 成人聊天區蕃薯藤交友 - 成人聊天區蕃薯藤交友 - 成人聊天區蕃薯藤交友 - 成人聊天區蕃薯藤交友 - 成人聊天區蕃薯藤交友 - 成人聊天區蕃薯藤交友 - 成人聊天區蕃薯藤交友 - 成人聊天區蕃薯藤交友 - 成人聊天區即時通交友 - PC交友區即時通交友 - PC交友區即時通交友 - PC交友區即時通交友 - PC交友區即時通交友 - PC交友區即時通交友 - PC交友區即時通交友 - PC交友區即時通交友 - PC交友區即時通交友 - PC交友區即時通交友 - PC交友區藝人偷拍走光 - 走光露點藝人偷拍走光 - 走光露點藝人偷拍走光 - 走光露點藝人偷拍走光 - 走光露點藝人偷拍走光 - 走光露點藝人偷拍走光 - 走光露點藝人偷拍走光 - 走光露點藝人偷拍走光 - 走光露點藝人偷拍走光 - 走光露點藝人偷拍走光 - 走光露點電愛交友 - 視訊交友區aa片免費看微風論壇080哈啦聊天室6k聊天室成人聊天室上班族捷克論壇大眾論壇plus論壇080視訊聊天室520視訊聊天室尋夢園上班族聊天室成人聊天室上班族 a片a片影片免費情色影片免費a片觀看小弟第貼影片區免費av影片免費h影片試看 H漫 - 卡通美女短片小魔女貼影片免費影片觀賞無碼a片網美女pc交友相簿美女交友-哈啦聊天室中文a片線上試看免費電影下載區免費試看a短片免費卡通aa片觀看女優影片無碼直播免費性感a片試看日本AV女優影音娛樂網日本av女優無碼dvd辣妹視訊 - 免費聊天室美女交友視訊聊天室080免費視訊聊天室尋夢園聊天室080苗栗人聊天室a片下載日本免費視訊美女免費視訊聊天

Anonymous said...

(法新社a倫敦二B十WE四日電) 「情色二零零七」情趣產品大產自二十三日起av女優AV倫敦的肯辛頓奧林匹亞展覽館舉行,倫敦人擺a片下載脫對性的保守態度踴躍參觀,許多穿情色電影皮衣與塑膠緊身衣的好色之徒擠進這項世界規模最大的成人生活展,估計三天展期可吸引八萬多好奇民眾參觀。

活動計畫負責人米里根承諾:「要搞浪漫、誘惑人、玩虐待,你渴望的我們都有。」

A片下載說:「時髦的設計與華麗女裝,從成人網站吊飾到束腹情色電影到真人大小的成人影片雕塑,是我們由今年展出的數千件A片產品精選出的一部分,參展產品還包括時尚服飾、貼身女用內在美、鞋子、珠寶、玩具、影片、藝術、a片圖書及遊戲,更不要說性愛輔具及馬術裝備。成人影片AV女優

參觀民眾遊覽兩百五十多個攤位,色情有性感服裝、玩具及情色食品,色情影片迎合各種品味。

大舞台上表演的是美國野情色蠻搖滾歌手瑪莉蓮曼森的前妻─全世界頭牌脫衣舞孃黛塔范提思,這是她今年在英國唯一一場色情表演。

成人電影以一九四零年代風格演出的黛a片塔范提思表演性感的天堂成人電影鳥、旋轉木馬及情色羽扇等舞蹈。

參展攤位有成人網站的推廣情趣用品,有的公開展示av人體藝術和人體雕塑,也有情色藝術家工會成員提供建議。