云自無心水自閑

          天平山上白云泉,云自無心水自閑。何必奔沖山下去,更添波浪向人間!
          posts - 288, comments - 524, trackbacks - 0, articles - 6
            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

          Flex2.0與1.5的區別

          Posted on 2006-03-01 01:31 云自無心水自閑 閱讀(1298) 評論(3)  編輯  收藏 所屬分類: Flex

          Flex2.0不再僅僅是Web應用或者顯示服務器。它是一個框架。

          你不再需要象Flex1.5那樣需要一個Server,不需要在瀏覽器的URL中輸入mxml后綴的請求來查看。可以直接把SWF文件放到Web目錄下即可。這一句話是重點啊。

          這意味著什么呢? Flex開始免費了!!
          因為Flex將免費發布Flex SDK,即可以免費將mxml編譯生成swf
          在Flex2.0不需要再象1.5那樣需要Flex的Server了。

          Don't think of Flex as a web application or a presentation server any more. It isn't. Flex 2 is a lot more. And the heart of Flex 2 is the framework. 
          Flex Framework 2, as it's officially called, is a programming model, a set of components and class libraries that make building Rich Internet Applications easy. 
          This framework is included with the all new Eclipse-based Flex Builder 2 IDE. There is still a server component in the Flex 2 product line, 
          Flex Enterprise Services 2, but its capabilities are focused around messaging and enterprise data services. 

          You read that right. With Flex 2 you won’t need to purchase a server to build applications that use Flex Framework. 
          This might take a little getting used to, because you've been putting MXML files into a web directory and requesting them with a browser to see how they run. 
          Well, you don't need to do that anymore. What you do now is either run them from within Flex Builder 2 or use the command-line compiler mxmlc. 

          The end result is a SWF file that you deploy inside your favorite web server. 

          修改分為以下幾個部分:
          一.使用方法上2.0與1.5是不同的, 比如: Application.alert() 修改為 Alert.show()
          二.增加了存取限制符, 即public, private, ...  更加強化了OO的概念
          三.添加了類型限定. 所有的變量,屬性,方法,返回值都必須指定類型,
                  在1.5中: var s = "page"; 是可以的, 但是在2.0中必須寫成: public var s:String = "page";
          四.事件的修改
              派發自定義事件時必須new Event而不是使用通用對象, 比如: click="dispatchEvent(new Event('checkOut'))"
              監聽器不再需要Delegate了, 1.5中 b1.addEventListener(“click”, mx.utils.Delegate.create(this,myListener));
                  在2.0中可以改為:b1.addEventListener(MouseEvent.CLICK, myListener);
          五. 所有的ActionScript組件都要封裝到package中, 可以使用匿名package, 但是package語句必須是組件定義文件的第一行.
          package {
            public class MyClass {
            // Class definition
            }
          } // Close package
          六. RemoteObject在2.0中不能繼續使用了.
          七. 圖形組件, 在2.0中如果要使用圖形,必須下載單獨的swc

          八. ActionScript由2.0升級為3.0
          九. Flex Framework進行了升級修改, 部分類被新類所代替, 比如:MediaDisplay被VideoDisplay取代.






          評論

          # re: Flex2.0與1.5的區別   回復  更多評論   

          2006-03-29 17:25 by ola
          "六. RemoteObject在2.0中不能繼續使用了."
          是不是因為
          "你不再需要象Flex1.5那樣需要一個Server"
          而導致的

          因為RemoteObject還需要一個Server來支持
          好像是說RemoteObject還是可以用 不過他并不是免費的

          習慣了RemoteObject的說 沒有他還真是不習慣阿

          # re: Flex2.0與1.5的區別   回復  更多評論   

          2006-03-30 09:27 by 云自無心水自閑
          @ola
          是的. Flex2.0中把RemoteObject分離出來單獨成為一個組件, 如果想使用是要購買的.
          但好象也不是完全的收費.

          據了解好象是允許5個以下的RemoteObject訪問, 可以作為學習和試驗之用.

          # re: Flex2.0與1.5的區別   回復  更多評論   

          2006-04-01 15:24 by usherlight
          We're also going to release a free version of Flex Enterprise Services that will be limited by the number of connections it allows, and will only run on a single server. Of course, Flex Builder 2 and the full version of Flex Enterprise Services 2 won't be free

          FlexBuilder2和完整版的Flex Enterprise Service2(在Beta2中已經更名為Flex Data Services, 簡稱FDS)是不會免費的. 但是會提供一個限制連接數的版本, 而且只能一臺服務器上使用.
          主站蜘蛛池模板: 临洮县| 许昌县| 资溪县| 奎屯市| 钟山县| 舞钢市| 承德县| 商丘市| 融水| 淮安市| 隆回县| 镇康县| 渭源县| 长顺县| 三原县| 清水县| 白玉县| 民县| 同江市| 土默特右旗| 扶沟县| 福建省| 五峰| 泸水县| 卫辉市| 鹿泉市| 察雅县| 招远市| 河北省| 万源市| 肇州县| 尼木县| 抚顺县| 尼玛县| 大名县| 阿城市| 黑龙江省| 拜城县| 文化| 手游| 大石桥市|