第二节课主要是讲GI的事件,这部分比较抽象,因此用图形来说明问题。
http://www.felixwoo.com/wp-content/uploads/attachments/200803/19_060908_event.jpg

GI之父Luke每周的培训讲座是这次来美国难得的收获,把每节课的总结发表出来和大家分享。第一节课主要内容是GI的Box模型,因为要跟整个团队分享,所以用英文写的,大家凑合着看吧。

1, What is GI?
The definition of GI on TIBCO's website is "TIBCO General Interface™ Builder is the award winning AJAX solution for rapidly building and easily deploying Rich Internet Applications (RIA), AJAX components and portlets that look and feel like desktop software." Actually, this definition focuses on what GI can do but not what GI is. Technically speaking, GI is a client-side server which also has the Model, View and Controller as the same as server application. The general server application generates data for client side, but GI generates the data and page for browser. In fact, the core of GI is a Page Server which takes charge of rendering data and view for web browser.

2, Outside-In & Inside-Out
Different web browsers have different understanding on the same HTML and CSS. Generally, there are two types of HTML box model explaining, one is Outside-In, another one is Inside-Out. For example, the code <span style="width:100;height:100;padding:10;border:10 solid"/> illustrate a box in the browser. In the Outside-In model, the real width and height are both 100, and the border and padding are painted inside the box. However, in the Inside-Out model, the real width and height of box are both 140. Because the Inside-Out model is document-centered, that is to say the content in the box possess the 100 width and height, and the padding and border are expanded outward by the content (See the picture below).

The Inside-Out model is friendly for content, but not easy for size controlling and not suitable for the web application. Therefore, GI chosen the Outside-In model. The problem is different browsers draw different boxes according to the same HTML code (e.g. IE6 is Outside-In, but IE7/8/Firefox are Inside-Out). So, what GI has to do is translating the box definition to make all the web browsers behave the same. For example, if you want to get a box with 100*100 dimension, 10px border and padding inside in Firefox. GI will generate <span style="width:60;height:60;border:10 solid; padding:10;"> for Firefox, and "width:100;height:100" for IE6.

http://www.felixwoo.com/wp-content/uploads/attachments/200803/19_060258_boxmodel.jpg

3, How is a GI box painted?
Every GI box model is extended from the object model which owns the basic property, such as id, name, etc. And the box model has some more properties which illustrate how the box looks like. Then, the GI will generate the HTML according to the box definition by executing paint method. Finally, the browser display the box on screen.
http://www.felixwoo.com/wp-content/uploads/attachments/200803/19_060358_boxmodel2.jpg

4, How does a GI box resize?
When the browser window size is changed, the outside parent block will notify the inside child block that “My size is changed, your space is also changed.” Then, the parent tell child how much space the child has. Finally, GI repaint the child according to the new size.

TIBCO AJAX大赛终于落下帷幕,由于我是公司内部员工,因此无缘和公司外的众多高手一绝高下,不过还是获得了大赛的特别奖。
另外我的参赛作品glickr已经发布在了http://www.glickr.cn ,英文版可以访问http://www.glickr.cn/#l=en_US ,也可以在欢迎界面上切换语言。虽然glickr是为大赛而生,不过我更希望把他做成一款产品,因此glickr还会持续更新。关于glickr的介绍可以浏览http://www.felixwoo.com/article.asp?id=295 和http://www.felixwoo.com/article.asp?id=292

非常荣幸的得到了GI之父Luke Birdeau对glickr的评价:

Felix,
I just got a chance to see your glickr application for the first time yesterday. It's great. I really like site concept (pictures/geography) and how you expressed it. Your execution is especially nice. I like the spacing, colors, usability, etc. Your source code is clean, well-documented and efficient.
I'm really impressed.
--Luke Birdeau

TIBCO用户体验组架构师Joel对glickr的评价:

Wow, Felix!
I'm very impressed! Very nice app. :) Congratulations, it is well-earned. I especially like the full-view mode of the photos. The left and right mouse clicks to navigate is nice...I like the mouse-over on the header triggering the full description overlay on the picture...that was a very excellent idea.
Are you planning to continue further devleopment on this? If so, I'd love to give some feedback on ideas for it.
--Joel

把证书发上来秀一下 [taste]
http://www.felixwoo.com/wp-content/uploads/attachments/200801/17_202558_ajax2.jpg

最近用TIBCO General Interface(GI)开发了一个mashup应用,整合了Google Map和Flickr,所以起名glickr。
glickr用法很简单,在地图上单击鼠标可以显示出当地的照片,也可以通过搜索关键字浏览各地的照片。每张照片都会在地图的相应经纬度坐标上显示出来。单击小的缩略图还可以放大显示。自动播放功能可以自动显示列表中的照片,并在地图上显示动画效果。

使用说明
1) 在地图上单击显示当地照片(可设定选择区域大小)
2) 搜索关键字
3) 自动播放照片列表(可调整播放速度)
4) 单击缩略图放大显示(大图模式下鼠标左键显示下一张,右键显示上一张)

访问glickrhttp://www.glickr.cn
欢迎大家积极反馈并提出宝贵建议。

http://www.felixwoo.com/wp-content/uploads/attachments/200711/22_080502_glickr1.jpg
http://www.felixwoo.com/wp-content/uploads/attachments/200711/22_080516_glickr2.jpg

http://www.felixwoo.com/wp-content/uploads/attachments/200709/22_075903_logo_power.gif
最近公司正在筹划AJAX国内挑战赛The Power of You,要求用TIBCO的GI(General Interface)开发一款AJAX的Web应用程序,大奖高达35,000人民币,相当具有诱惑力。做为全球会用GI的仅有的几位开发者之一(汗-_-!!不过我们老板都是这么介绍的),做为公司的一名有志青年,为了这35k的奖金,我难以抑制参赛的冲动。不过,相信民间也不乏GI的高手,希望大家踊跃参加,积极交流,这对于GI在中国的推广大有裨益。为了这次比赛,我们Team还准备在国内各大高校举办技术宣传活动和讲座,希望高校的同学们看到后积极与我联系。

比赛官方网站:http://www.tibco.com/contest/china/index.html
参赛时间:2007年9月10 -- 2007年12月31日
奖项:一等奖1名,35000 RMB;二等奖4名,8000 RBM;

另外,我很荣幸的成为了GI论坛中文板块的版主,希望大家踊跃踢馆。

http://power.tibco.com/forums/forum.jspa?forumID=124

以下是Michelle同学制作的GI介绍Flash,不知道GI的朋友可以先了解一下:

http://media.tibco.com/contest/gi_v1/tibco_gi_preso.html

The purpose of creating sustained messages is to provide totally loosely coupled architecture. In the case of sustained messages the UI components can be loaded asynchronously in any arbitrary order. As soon as a component that subscribes to a subject is loaded (first after a sustained message with the same subject is published) the event dispatcher will publish again the same message to the subscriber. Consider that this is a 1 to 1 publishing so that an already existing subscriber dose not receives same message multiple times. However, this pub sub mechanism differs from GI pub sub only in the persisting the messages. It is the responsibility of developer to unsubscribe an object or function from an event published by this object if it is not needed any more. Subscribing an object or function to a type of event multiple times causes that the function is executes multiple times if a message is published.

京ICP备05053527号
经过26次查询历时0.385秒终于生成了此页面
Powered by WordPress & Designed by Felix © 2012