锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲精品乱码久久久久久,国产日韩成人亚洲丁香婷婷,亚洲人成人77777网站不卡http://m.tkk7.com/steeven/archive/2006/06/19/53836.htmlsteevensteevenMon, 19 Jun 2006 10:15:00 GMThttp://m.tkk7.com/steeven/archive/2006/06/19/53836.htmlhttp://m.tkk7.com/steeven/comments/53836.htmlhttp://m.tkk7.com/steeven/archive/2006/06/19/53836.html#Feedback0http://m.tkk7.com/steeven/comments/commentRss/53836.htmlhttp://m.tkk7.com/steeven/services/trackbacks/53836.htmldb4o鐩墠榪樻病鏈塽nique index/primary key鏈哄埗銆?5.4)

聽聽聽聽 public static void 聽main(String[]聽args)聽 {
聽聽聽聽聽聽聽聽ObjectContainer聽db聽
= 聽Db4o.openFile( " test.yap " );
聽聽聽聽聽聽聽聽db.set(
new 聽User( " abc " , 234 ));
聽聽聽聽聽聽聽聽db.set(
new 聽User( " abc " , 234 ));
聽聽聽聽聽聽聽聽ObjectSet
< User > 聽list聽 = 聽db.query(User. class );
聽聽聽聽聽聽聽聽System.out.println(list);
聽聽聽聽聽聽聽聽db.close();聽
// halt聽without聽this聽line聽in聽5.2
聽聽聽聽}

涓婇潰鐨勪緥瀛愪細瀛樺偍涓や釜鍚屾牱鐨刄ser瀵硅薄銆?br />浠呮湁鐨処D鏄竴涓瓨鍌ㄦ枃浠朵腑鐨処D, 緇忚繃紕庣墖鏁寸悊涔嬪悗浼氬彂鐢熷彉鍖栵紝鏄劇劧涓嶉傜敤銆?br />瑕佸疄鐜頒竴涓猘uto_increament鐨勪富閿亹鎬曡鑷瀹炵幇銆傛垨鑰呯敤宸叉湁鐨刄UID瀹炵幇銆?br />
鍙兘db4o澶勾杞葷殑鍏崇郴錛岀洰鍓嶈繕娌℃湁鏀彺榪欎簺鍔熻兘銆傚緩璁敤@Annotation鏉ュ疄鐜般傚茍涓旀帶鍒跺瓨鍌ㄣ?br />@ID
@Unique
@Index
鍦‥JB3閲岄潰宸茬粡鏈夌幇鎴愮殑瀹氫箟鍙互鍙傝冦?img src ="http://m.tkk7.com/steeven/aggbug/53836.html" width = "1" height = "1" />

steeven 2006-06-19 18:15 鍙戣〃璇勮
]]>
YY涓涓嬫湭鏉ョ殑鐢ㄦ埛鐣岄潰http://m.tkk7.com/steeven/archive/2006/06/18/53657.htmlsteevensteevenSun, 18 Jun 2006 14:57:00 GMThttp://m.tkk7.com/steeven/archive/2006/06/18/53657.htmlhttp://m.tkk7.com/steeven/comments/53657.htmlhttp://m.tkk7.com/steeven/archive/2006/06/18/53657.html#Feedback3http://m.tkk7.com/steeven/comments/commentRss/53657.htmlhttp://m.tkk7.com/steeven/services/trackbacks/53657.html
寰蔣榪欏洖钃勫娍寰呭彂xaml鏈夊寮哄ぇ鍛紵3d錛堟劅瑙変笉澶熺函綺癸級錛忓己澶х殑鏁版嵁緇戝畾錛忓姩鐢伙紡澶氬獟浣撴敮鎸侊紟錛庯紟
榪欓噷鍙曠殑涓嶄粎浠呮槸妗嗘灦錛岃繕鏈夐厤濂楃殑GUI寮鍙戝伐鍏鳳紟鏈夎叮鐨勬槸Interactive Designer鎹灝辨槸鐢╳pf寮鍙戠殑錛?br />xaml鍙槸涓獂ml鎻忚堪鏂囦歡錛岄噷闈㈠彲浠ュ寘鍚唬鐮侊紝緙栬瘧鎴怳I鐣岄潰錛庢墍鏈夌殑鐣岄潰鍐呭涔熷彲浠ョ敱紼嬪簭鍔ㄦ佽繍琛岋紟
榪欐牱鏈潵榪愯鍦╞rowser閲岄潰鐨刄I涓嶆槸澶嶆潅鐨刟jax錛屾槸鍜屽悗鍙頒竴鑷寸殑鎵樼浠g爜錛?br />
Java鎬庢牱搴斿鍛紵Java+Flash? 寮鍙慴s閮藉洶闅鵑噸閲嶏紟闄ら潪Flash鑳芥斁寮僡s錛岀洿鎺ュ悓java緇撳悎錛屾垨鑰呬袱涓叕鍙稿悎浣滃紑鍙戜竴涓柊妗嗘灦錛庤繖涓柊妗嗘灦搴旇鏄粈涔堟牱瀛愬憿錛熷畬鍏ㄧ殑3D瑙嗚錛屾椂闂磋醬鎺у埗錛庯紟錛庨噸婕攃#鍚庢潵灞呬笂鐨勫巻鍙詫紟

Java鍦⊿un鐨勬墜閲屼竴鐩村崐姝諱笉媧伙紝鐪熷笇鏈涜兘璧跺揩琚玤oogle騫惰喘錛屾垨鑰卻un涓誨姩鎶妀ava鎹愯禒鍑烘潵錛?br />
濡傛灉娌℃湁錛傛剰澶栵紓錛屽湪wpf姝e紡鍙戣浠ュ悗錛屾闈㈠簲鐢ㄥ皢閫愭榪囨浮鍒皐pf寮鍙戯紟HTML鐢變簬鍏惰法騫沖彴錛屽彲鑳戒細騫沖垎縐嬭壊錛?br />
闈㈠wpf錛屽浣曞弽鎶楋紵java.net鏄お鐩戯紝鍦?net闃佃惀閲岄潰榪炰簩濂墮兘涓嶇畻錛岀瓑浜庢姇闄嶏紟
鍒╃敤xaml? xaml琚紪璇戝姞杞斤紝鍏舵墽琛屾鏋惰繕鏄?net錛屾満浼氫技涔庝笉澶э紟鍦ㄦ祻瑙堝櫒涓婂彲鑳戒細鏈夌被浼糽asszlo鐨勭粍鍚堬紟

浣滀負Java鐖卞ソ鑰咃紝紲堢シ濂囪抗鍙戠敓鍚э紝榪樺ソ鍦↗ava涓栫晫涓榪規槸瀹跺父渚塊キ :)

steeven 2006-06-18 22:57 鍙戣〃璇勮
]]>
gwt鍜宔cho2鐨勫姣?/title><link>http://m.tkk7.com/steeven/archive/2006/06/01/49502.html</link><dc:creator>steeven</dc:creator><author>steeven</author><pubDate>Thu, 01 Jun 2006 03:32:00 GMT</pubDate><guid>http://m.tkk7.com/steeven/archive/2006/06/01/49502.html</guid><wfw:comment>http://m.tkk7.com/steeven/comments/49502.html</wfw:comment><comments>http://m.tkk7.com/steeven/archive/2006/06/01/49502.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://m.tkk7.com/steeven/comments/commentRss/49502.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/steeven/services/trackbacks/49502.html</trackback:ping><description><![CDATA[ <p>鍓嶉潰杞創Liebeck(echo鐨勪富瑕佸紑鍙戣咃紝鎴戠殑鍋跺儚)鍏充簬echo2鍜実wt鐨勫姣?http://m.tkk7.com/steeven/archive/2006/06/01/49379.html<br /><br />浠婂ぉ浠旂粏鍋氫簡涓浜涚瑪璁幫紝騫朵笖鍔犲叆浜嗕竴浜涜嚜宸辯殑鎯蟲硶錛屼緵閫夊瀷鑰呭弬鑰冿細<br /><br />緇煎悎瀵規瘮錛?br />1. 涓や釜閮芥槸闈炰紶緇熺殑b/s妗嗘灦錛岄兘鏄敤AJAX鏉ユ瀯閫犲姩鎬佺綉绔欍傜紪紼嬭繃紼嬮兘鍜孲WT/Swing宸笉澶氥?br />2. 鍖哄埆鍦ㄤ簬涓涓繍琛屼簬瀹㈡埛绔紝涓涓繍琛屼簬鏈嶅姟鍣?/p> <div>3. gwt鎶婁唬鐮佺紪璇戜負html+js, 鐩墠鍙敮鎸乯ava1.4瑙勮寖銆俥cho娌¤繖闄愬埗銆?/div> <div>4. gwt鍙互榪愯浜庝換浣晈eb server, echo鍒欓渶瑕佷紶緇熺殑servlet瀹瑰櫒銆傦紙鎰忎箟涓嶅ぇ錛岀幇鍦ㄥ摢鏈夐潤鎬佺綉绔欏晩錛屽悗鍙頒氦浜掕偗瀹氳繕鏄渶瑕佺殑錛?/div> <div>5. echo2鐨勫鎴風寮曟搸閫氳繃ajax鎻愪氦鐢ㄦ埛鍔ㄤ綔錛屽鐢ㄦ埛鐣岄潰澧為噺鏇存柊銆?/div> <div>聽</div> <div>鎬ц兘錛?/div> <div>1. gwt鐨勯〉闈ogic閮藉湪嫻忚鍣ㄤ笂錛屾墍浠ュ緢蹇備絾鏄鏋滈渶瑕佸拰涓棿灞備氦浜掞紝灝變細紕板埌鍚屾牱鐨勭綉緇滈棶棰樸?/div> <div>2. echo2鐨勪唬鐮佽窇鍦╯erver涓婏紝鎵浠ユ墍鏈夌殑浜や簰閮介渶瑕佸弽棣堢粰server銆俥cho2鍦ㄨ璁′笂灝介噺鍑忓皯榪欑浜や簰錛屾瘮濡傚鎴峰鏂囨湰鐨勪慨鏀歸兘鏄歡榪熷彂閫佸埌鏈嶅姟鍣?鑰屾湇鍔″櫒鍙彂閫侀〉闈㈢殑鍙樺寲閮ㄥ垎鍒版祻瑙堝櫒銆?/div> <div>3. gwt搴旂敤琚紪璇戞垚涓涓〉闈紝铏界劧搴旂敤鐨勫鏉傚寲錛岃繖涓紪璇戠粨鏋滀篃闅忎箣鍙樺緱鍙曘傘傘?涓漢璁や負闅忕潃緙栬瘧鍣ㄧ殑鍙戝睍錛屼笉鍚岀殑欏甸潰鍙互鍋氬埌lazy load)</div> <div>4. echo鐨刯s妯″潡鏄痩azy鍔犺澆鍒版祻瑙堝櫒鐨勶紝鐣岄潰涓婂憟鐜板摢浜涙帶浠舵墠鍘誨姞杞藉茍涓旂紦瀛樺搴旂殑js妯″潡銆傚彂閫佸埌瀹㈡埛绔殑涓嶆槸閫昏緫浠g爜錛屽彧鏈夌敤鎴風姸鎬侊紙涓漢璁や負echo2鐜板湪榪囦簬lazy錛屽鑷村垵濮嬪寲闃舵澶氭璁塊棶server鍔犺澆涓浜涘熀鏈殑js妯″潡錛屽簲璇ユ弶鍚堝埌涓璧楓傚彟澶栵紝鍥犱負echo閫昏緫浠g爜鍦ㄦ湇鍔″櫒涓婏紝鐩稿鏉ヨ鍙互闃叉鐩楃増錛?/div> <div>聽</div> <div>涓棿灞傚拰鏁版嵁璁塊棶錛?/div> <div>1. 濡傛灉瑕佽闂暟鎹紝gwt榪樻槸瑕佸洖鍒頒紶緇熺殑妯″紡錛岄氳繃rpc璁塊棶servlet銆俫wt鎻愪緵鎶婅繙紼嬫湇鍔¢忔槑鐨勫寘瑁呰搗鏉ワ紝涓棿浼犻乸ojo. 灝界鍖呰浜嗭紝涓棿鐨勫畨鍏ㄥ拰鍜屾牎楠岃繕鏄繀欏昏寮鍙戣呰冭檻銆?/div> <div>2. echo鏀寔SOA錛屼絾鏄笉蹇呴』銆傚ぇ澶氭暟鎯呭喌涓嬪畨鍏ㄤ笉鏄棶棰橈紝鍥犱負鏁版嵁鍜岄昏緫閮戒笉浼氭毚闇插埌嫻忚鍣ㄤ笂銆?浠ュ墠緇檈cho鎻愯繃寤鴻錛屾祻瑙堝櫒鐢ㄦ埛寰堝彲鑳藉幓妯℃嫙涓涓disabled鎸夐挳鎻愪氦錛岃繖縐嶉棶棰樼幇鍦ㄦ棤闇鑰冭檻錛?/div> <div>聽</div> <div>榪愯鐜錛?/div> <div>1. gwt榪愯鍦ㄦ祻瑙堝櫒涓婏紝騫墮潪鎵鏈夌殑java綾婚兘鑳界紪璇戞垚js.銆gwt鐜板湪鍙敮鎸乯ava.lang/java.util涓嬮潰鐨勪竴涓瓙闆?鐗堟湰聽1.0.21)錛?7 classes, 11 interfaces, and 18 exception(榪欒浜烘兂璧蜂簡j2me寮鍙?. 涓浜涚幇鏈夌殑綾誨簱灝卞埆鎯充簡銆?/div> <div>聽</div> <div>璋冭瘯錛?/div> <div>1. gwt璋冭瘯闇瑕佷竴濂楀拰榪愯鏃跺畬鍏ㄤ笉鍚岀殑鐜錛欻OST妯″紡錛屼唬鐮佷綔涓虹湡姝g殑java鍦ㄨ繍琛屻?涓漢璁や負榪欓噷鍥犱負鏄函java璋冭瘯錛屾瘮echo鐨剋eb璋冭瘯瑕佺◢寰柟渚夸竴浜涖傚仛鍗曞厓嫻嬭瘯涔熸洿鏂逛究浜涳紝浣嗕笉鏄鏈緇坆rowser鐨勬祴璇曪級</div> <div>2. echo璋冭瘯灝辨槸浼犵粺鐨剆ervlet璋冭瘯銆?/div> <div>聽</div> <div>鎺堟潈錛?/div> <div>1. gwt鐨刟pi鏄紑婧愮殑錛岀紪璇戝櫒鍜宧ost妯″紡嫻忚鍣ㄤ笉鍏紑銆傛暣浣撴潵璇達細free. 錛堜釜浜鴻涓猴紝濡傛灉瑕佹墿鍏単wt鍙兘浼氶亣鍒伴夯鐑︼級</div> <div>2. echo2寮婧愶紝mozilla public license. free(涓漢璁や負錛歟chostudio涔焒ree灝卞ソ浜嗐俷extapp姣曠珶瑕佺敓瀛橈級</div> <div>聽</div> <div>搴旂敤錛?/div> <div>1. gwt鍙互宓屽叆浼犵粺鐨勯潤鎬乭tml, 涔熻兘浣滀負涓涓畬鏁村簲鐢ㄣ傚仛澶у簲鐢ㄨ鑰冭檻緙栬瘧鍚庣殑閲嶉噺銆佹湰鍦板寲銆佸簱鏀寔絳夐棶棰橈紙鍏充簬18n, 鍙互鍦╣wt鏀寔璁哄潧涓婃悳绱18n,浼間箮宸茬粡鏈夋柟妗堬級</div> <div>2. echo2鎴愮啛寰楀彲浠ラ傜敤鍚勭搴旂敤錛屼絾鏄笉鑳戒綔涓洪潤鎬侀〉闈㈢殑涓閮ㄥ垎浣跨敤銆傦紙鏈夌偣鍚圭墰錛屽湪澶ц闂噺涓嬶紝鏈嶅姟鍣ㄧ殑鍘嬪姏鑲畾涓嶄細灝忥級</div> <div>聽</div> <div>聽</div> <div>聽</div> <div> <div>涓漢緇撹錛?br />1. 寮鍙戞柟寮忛兘寰堜紭縐錛岀敤綰痡ava寮鍙慴/s<br />2. gwt鍙敤浜庡ぇ鍨嬬綉绔欙紝鎶婂帇鍔涜漿瀚佺粰瀹㈡埛绔?br />3. echo鍙敤浜庡揩閫熷紑鍙戝鏉傜殑浼佷笟搴旂敤錛屾妸鍘嬪姏涓㈢粰鏈嶅姟鍣?浼佷笟閲岄潰鏈娓呴棽鐨勫氨鏄墠鍙板拰鏈嶅姟鍣?<br /><br />涓や釜浜у搧閮藉緢浼樼錛孏WT鏄?006騫寸殑IT椋撻錛屾嘗鍙婂悗闈㈠嚑騫淬侻$鐨勬棩瀛愯闅捐繃浜? GOOGLE鐨勭‘鏄釜浠や漢澶寸棝鐨勫鎵嬨?br /><div><br />鐒惰岋紝榪樻湁姣攇wt/echo2鏇寸編濂界殑鏈潵鍚楋紵</div><div>鏈夛紒鎶婁粬浠殑杈撳嚭鍙樻垚flash錛岀敤java寮鍙慺lash搴旂敤銆傚幓騫存帰绱㈣繃涓孌墊椂闂達紝鍘熷瀷宸茬粡鍑烘潵錛屽洜涓篺lash寮鍙戣皟璇曞おugly, 娌℃湁緇х畫涓嬪幓銆?br />鍙﹀錛屽井杞殑WPF(AVALON)鐩稿綋鍊煎緱鍏蟲敞銆?br /></div></div> </div> <img src ="http://m.tkk7.com/steeven/aggbug/49502.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/steeven/" target="_blank">steeven</a> 2006-06-01 11:32 <a href="http://m.tkk7.com/steeven/archive/2006/06/01/49502.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>杞創錛欳omparing the Google Web Toolkit to Echo2 http://m.tkk7.com/steeven/archive/2006/06/01/49379.htmlsteevensteevenWed, 31 May 2006 16:55:00 GMThttp://m.tkk7.com/steeven/archive/2006/06/01/49379.htmlhttp://m.tkk7.com/steeven/comments/49379.htmlhttp://m.tkk7.com/steeven/archive/2006/06/01/49379.html#Feedback0http://m.tkk7.com/steeven/comments/commentRss/49379.htmlhttp://m.tkk7.com/steeven/services/trackbacks/49379.html Google Web Toolkit 铏界劧榪樻槸beta鐗堟湰錛屽拰google鐨勫叾浠栦駭鍝佷竴鏍鳳紝鍒氬嚭鐢熷氨娉ㄥ畾涓嶅嚒錛屼篃璁稿皢褰卞搷鍚庨潰鍑犲勾鐨刡/s寮鍙戙?br />
gwt鍒╃敤浜唈ava寮鍙戠殑涓鍒囨垚鐔熸潯浠訛紝鍖呮嫭Unit test, refactor, IDE(eclipse...)錛屼紶緇熺殑b/s framework蹇呭皢鍙楀埌閲嶅垱錛屾í鎵繃鍚庯紝JSF/ECHO絳塖erver side framework鍙兘騫稿瓨銆傚鏋滃摢澶ゞoogle鍔犱笂serverside鏀寔錛堜粠鍖呭懡鍚嶄笂鐪嬫槸鐣欐湁浣欏湴鐨勶級銆傘傘傝櫧鐒秅wt鐩墠榪樻槸灝忔牱涓涓紝浣嗘槸鑳屽悗绔欑殑鏄噸閲忕駭鐨刧oogle錛屽己澶х殑璧勬簮鍜屾暟涓嶅畬鐨勯摱瀛愩傘傘傘?br />
鐪嬪埌榪欑帺鎰忛鍏堟兂鍒扮殑鏄痚cho2, 瀹㈡埛绔妧鏈兘鏄痑jax, 緙栫爜閮芥槸java. 涓嶅悓鐨勬槸gwt鍙戣鏃剁紪璇戞垚HTML+JS錛孍cho2鍒欐槸瀹屽叏鐨勬湇鍔″櫒绔敓鎴?鏇存柊銆俫wt璺焥erver绔氦浜掍緷闈犵被浼間簬ws鐨剆ervice鎶婂墠鍚庡彴瀹屽叏鍖哄垎寮銆?br />
鍦╡cho鐨勮鍧涢噷闈㈠凡緇忔湁浜哄湪璁ㄨ榪欑帺鎰忎簡錛屽茍涓斿叓鍗︿簡涓涓媑wt鐨勫墠韜技涔庢槸Morfik鐨勪竴閮ㄥ垎錛堝緟璇佸疄錛?br />浠庡師鐞嗕笂錛宔cho鐨勫紑鍙戣呬綔鍑轟簡瀵規瘮錛岃繖涓綉绔欎技涔庤灝侀攣錛岃繖閲岃漿璐翠竴涓?


錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛濓紳錛?br />http://echotwo.blogspot.com/聽浣滆卼od liebeck

Comparing the Google Web Toolkit to Echo2
The Google Web Toolkit (GWT) is being compared to Echo2 quite frequently. Some of these comparisons have been fairly accurate, while others contain bits of misinformation. This article, written by the lead developer of Echo2, discusses the similarities and differences between these two frameworks.

Overview

The Google Web Toolkit and Echo2 definitely make for an interesting comparison. Both of these frameworks take a non-traditional approach toward web application development, even considering the latest crop of "AJAX-based frameworks" available today.

The most obvious similarity between GWT and Echo2 is that they both enable the developer to create dynamic, AJAX-driven web user interfaces using only Java. In both projects, UIs are developed in a fashion similar to SWT or Swing: by assembling hierarchies of components and registering event handlers. Neither project requires the developer to work with HTML, JavaScript, or XML.

The most obvious difference between GWT and Echo2 is that all of your GWT code is executed on the client, whereas your Echo2 code is executed on the server. There are advantages and disadvantages to both of these approaches, which will be highlighted throughout the article.

GWT's defining attribute is the Java-to-JavaScript compiler. This compiler allows you to develop the web interface to your application in Java, then compile it to JavaScript. GWT limits the developer to a subset of the Java 1.4 libraries. GWT applications can be served by any web server, such as Apache, without the need for server-side processing.

Echo2 applications are compiled to Java byte code and run on a Java server. Their Java code is executed by Echo2's "Web Application Container" layer, which sits atop a Java Servlet. On the web browser, the Echo2 "Client Engine" communicates user input to the Web Application Container via AJAX requests, with the server responding with directives to perform incremental updates to the state of the client web browser.

User Interface Performance

With GWT, all of your user interface code exists on the client browser. In operations that do not require server communication--that is, that do not require retrieving data from the middle tier--this configuration results in response times that are not dependent on the server. When data must be retrieved from the application's middle tier or business logic layer, the response time is subject to the same criteria as any other AJAX application, i.e., network latency, bandwidth, and server performance.

Echo2 application code is run on the server, so for each user interaction that requires a call to the middle tier or immediate execution of the application's Java code, an AJAX connection is made to the server. Echo2 components are designed to minimize the client/server communication as much as is possible, limiting it to times when the server must be notified immediately of events. For example, simple events such as user input to a TextField component will not result in server contact. The server's response is the minimum set of instructions to incrementally update the client to reflect the new screen state.

GWT applications are served to the client as a single HTML/JavaScript file, containing the entirety of the user interface. The size of this file will be proportional to the size of your user interface code and the toolkit libraries used by your application.

Echo2 JavaScript modules are lazy-loaded to the client, and thereafter cached. A module will be retrieved when a component first appears on-screen that requires it. Application code is never sent to the client, only the state of the user interface.

Middle Tier / Data Retrieval

To access business data or perform a business process, a GWT user interface makes a remote procedure call (RPC) from the browser to a Servlet. GWT provides a mechanism to make the RPC invocation transparent to the developer, allowing the developer to build the application with "Plain Old Java Objects" (POJOs). However, any application that provides an RPC capability is a distributed application -- even when the RPC is accomplished transparently to the developer. Distributed applications in businesses and enterprises usually have security considerations and the remote objects serving the GWT clients must be designed with a focus on security to deflect attacks from imitated or hostile client applications.

Echo2 applications support, but do not require, the use of distributed application logic or a Service Oriented Architecture (SOA). Alternatively, Echo2 applications can be built to run entirely within a single JVM instance, backed by a POJO-based middle tier. This allows Echo2 developers to build applications without the security concerns of distributed application logic -- and leverage the many strong frameworks built around POJO development such as the Spring Framework and Hibernate. Echo2 accomplishes this by keeping the state of a user's web interface on the server so that no remote objects need to be exposed.

Run-time Environment

GWT has some limitations due to the fact that applications are run on the client browser. First, GWT applications are limited to using a subset of the core Java class libraries, consisting of 27 classes, 11 interfaces, and 18 exception types found in the java.util and java.lang packages (as of GWT 1.0.21). This limitation prevents GWT applications from linking to most existing Java libraries. Additionally, all Java code must be compliant with the Java 1.4 specification; 1.5 is not supported. Localization-related portions of the Java API are not provided.

Debugging

GWT provides an alternate deployment environment for applications to facilitate debugging. The environment, called "Hosted Mode", allows a GWT application to be run as Java byte code in a local JVM, to which an IDE's debugger can be connected. In this mode, the application's user interface is displayed in a special web browser (a Mozilla/Firefox derivative).

Echo2 applications may be debugged in the conventional manner, by connecting an IDE's debugger to a JVM running a Servlet container.

Licensing

The primary component of GWT, the Java-to-JavaScript cross-compiler, is proprietary, binary-only software. The Java API libraries are open source software, distributed under the Apache License. The API libraries have essentially no value without the proprietary compiler. The (non-critical) hosted-mode browser is also under the proprietary license. GWT is provided free of charge.

Echo2 is open source software, licensed under the Mozilla Public License, and provided free of charge.

Applicability

GWT can be used as a means of creating AJAX components to embed in traditional web applications (or even in static web pages) as well as for creating complete application user interfaces. There are some issues to using it for the creation of large applications, where downloading an entire application to a client web browser in one shot would not be practical. The lack of localization and full Java API support also presents a problem for larger solutions.

Echo2 is practical for creating web applications of any size. It is however not intended to scale downward to function as a platform for simply creating AJAX components in traditional web frameworks (or static web sites).

More Information

Google Web Toolkit:
Home Page, Example Applications, Getting Started Guide, Developer Guide

Echo2:
Home Page, Example Applications, Tutorial
posted by Tod Liebeck at 5:13 AM | 0 comments聽聽

======================================
姣曠珶gwt榪樻槸灝廱aby, 浠ュ悗鎬庝箞鍙戝睍榪橀毦璇達紝鐜板湪涓嬬粨璁哄お鏃┿傝繖涓ゅぉ璇曠敤涓涓嬶紝鏈夌┖浠庣粏鑺備笂瀵規瘮涓涓嬨?br />



steeven 2006-06-01 00:55 鍙戣〃璇勮
]]>
緙栫▼浣跨敤SDO[EMF鍏勫紵綃嘳http://m.tkk7.com/steeven/archive/2006/05/15/46266.htmlsteevensteevenMon, 15 May 2006 11:00:00 GMThttp://m.tkk7.com/steeven/archive/2006/05/15/46266.htmlhttp://m.tkk7.com/steeven/comments/46266.htmlhttp://m.tkk7.com/steeven/archive/2006/05/15/46266.html#Feedback0http://m.tkk7.com/steeven/comments/commentRss/46266.htmlhttp://m.tkk7.com/steeven/services/trackbacks/46266.html涓昏鐗圭偣錛氾紙涓漢鐞嗚В錛?br />鍙獙璇?br />寮虹被鍨?br />鍙彇鍑哄畬鏁存暟鎹拰宸紓銆?br />
鐢熸垚SDO浠g爜鍜孍MF澶у悓灝忓紓錛屼富瑕佹槸鍦╩y.genmodel鐨勭涓涓妭鐐圭殑鍙抽敭鑿滃崟涓夋嫨錛歋et SDO defaults.

浣撻獙錛?br />1. 鐢熸垚Editor鍚庯紝鎵ц鐢熸垚鐨凟ditor Plugin
2. 鏂板緩Example EMF Model Creation Wizards->Data Graph Model
3. 鍦–hanges鑺傜偣涓奡tart Loggin, 鐒跺悗緙栬緫鏁版嵁鍗沖彲鐪嬪埌鑷姩鐢熸垚鐨勫樊寮傘?br />
緗戜笂鎵嬪伐鎿嶄綔SDO鐨勭ず渚嬩唬鐮佹瘮杈冨皯錛岃繖閲岀畝鍗昫emo濡備笅錛?br />
import聽java.util.Iterator;

import聽org.eclipse.emf.ecore.EObject;
import聽org.eclipse.emf.ecore.sdo.EDataGraph;
import聽org.eclipse.emf.ecore.sdo.SDOFactory;
import聽org.steeven.family.FamilyFactory;
import聽org.steeven.family.涓漢;
import聽org.steeven.family.瀹跺涵;

import聽commonj.sdo.ChangeSummary;
import聽commonj.sdo.DataGraph;
import聽commonj.sdo.DataObject;

publicclass聽Server聽{

聽聽聽聽
publicstaticvoid聽main(String[]聽args)聽{
聽聽聽聽聽聽聽聽
//聽client聽side
聽聽聽聽聽聽聽聽EDataGraph聽graph聽=聽loadGraph();
聽聽聽聽聽聽聽聽graph.getChangeSummary().beginLogging(); // important!
聽聽聽聽聽聽聽聽瀹跺涵聽family聽
=聽(瀹跺涵)聽graph.getRootObject();
聽聽聽聽聽聽聽聽family.setTitle(
"my聽family");
聽聽聽聽聽聽聽聽涓漢聽baby聽
=聽FamilyFactory.INSTANCE.create涓漢();
聽聽聽聽聽聽聽聽baby.set濮撳悕(
"sophie");
聽聽聽聽聽聽聽聽family.get鍏斿唇瀛?).add(baby);
聽聽聽聽聽聽聽聽graph.getChangeSummary().endLogging();
聽聽聽聽聽聽聽聽saveGraph(graph);
聽聽聽聽聽聽聽聽update(graph);
聽聽聽聽}


聽聽聽聽
//server聽side
聽聽聽聽publicstatic聽EDataGraph聽loadGraph()聽{
聽聽聽聽聽聽聽聽瀹跺涵聽family聽
=聽FamilyFactory.INSTANCE.create瀹跺涵();聽//聽or聽load聽from
聽聽聽聽聽聽聽聽
//聽database
聽聽聽聽聽聽聽聽EDataGraph聽graph聽=聽SDOFactory.eINSTANCE.createEDataGraph();
聽聽聽聽聽聽聽聽graph.setERootObject((EObject)聽family);
聽聽聽聽聽聽聽聽
return聽graph;
聽聽聽聽}


聽聽聽聽
//server聽side聽full聽save
聽聽聽聽publicstaticvoid聽saveGraph(EDataGraph聽graph)聽{
聽聽聽聽聽聽聽聽System.out.println(graph.getRootObject());
聽聽聽聽}


聽聽聽聽
//server聽side聽update聽changed聽objects
聽聽聽聽publicstaticvoid聽update(DataGraph聽dataGraph)聽{
聽聽聽聽聽聽聽聽ChangeSummary聽changeSummary聽
=聽dataGraph.getChangeSummary();
聽聽聽聽聽聽聽聽
for聽(Iterator聽it聽=聽changeSummary.getChangedDataObjects().iterator();聽it
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽.hasNext();)聽
{
聽聽聽聽聽聽聽聽聽聽聽聽DataObject聽changedObject聽
=聽(DataObject)聽it.next();
聽聽聽聽聽聽聽聽聽聽聽聽System.out.println(
"Update聽for聽"+聽changedObject);
聽聽聽聽聽聽聽聽聽聽聽聽
for聽(Iterator聽settingIt聽=聽changeSummary.getOldValues(changedObject)
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽.iterator();聽settingIt.hasNext();)聽
{
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽ChangeSummary.Setting聽changeSetting聽
=聽(ChangeSummary.Setting)聽settingIt
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽.next();
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽System.out.println(
"聽(changed聽"
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
+聽changeSetting.getProperty().getName()聽+"聽from聽\""
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽+聽changeSetting.getValue()聽+"\"聽to聽\""
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
+聽changedObject.get(changeSetting.getProperty())
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
+"\")");
聽聽聽聽聽聽聽聽聽聽聽聽}

聽聽聽聽聽聽聽聽}

聽聽聽聽}

}

杈撳嚭錛?br />
org.steeven.family.impl.瀹跺涵Impl@9664a1聽(title:聽my聽family)
Update聽for聽org.steeven.family.impl.涓漢Impl@1729854聽(濮撳悕:聽sophie,聽鎬у埆:聽鐢?
Update聽for聽org.steeven.family.impl.瀹跺涵Impl@9664a1聽(title:聽my聽family)
聽(changed聽title聽from聽"null"聽to聽"my聽family")
聽(changed聽鍏斿唇瀛惵爁rom聽"[]"聽to聽"[org.steeven.family.impl.涓漢Impl@1729854聽(濮撳悕:聽sophie,聽鎬у埆:聽鐢?]")

SDO鐢熸垚鐨勪唬鐮佷技涔庢洿鍔犵函鍑涓鐐癸紝娌℃湁寰堝鐨別Xxxx()鏂規硶錛堟湁闇瑕佺殑涔熷彲浠ュ彇鍒幫級銆?br />鎹log鐨勫紑閿姣旇緝澶э紝涓嶅緩璁澶ч噺鏁版嵁浣跨敤銆?img src ="http://m.tkk7.com/steeven/aggbug/46266.html" width = "1" height = "1" />

steeven 2006-05-15 19:00 鍙戣〃璇勮
]]>
EMF緙栫▼浣跨敤http://m.tkk7.com/steeven/archive/2006/05/14/46129.htmlsteevensteevenSun, 14 May 2006 13:27:00 GMThttp://m.tkk7.com/steeven/archive/2006/05/14/46129.htmlhttp://m.tkk7.com/steeven/comments/46129.htmlhttp://m.tkk7.com/steeven/archive/2006/05/14/46129.html#Feedback3http://m.tkk7.com/steeven/comments/commentRss/46129.htmlhttp://m.tkk7.com/steeven/services/trackbacks/46129.html鐪嬪埌eclipse3.2閲岄潰鐨凣MF, 瑙夊緱姣旇緝鏈夎叮,搴曞眰榪樻槸鐢ㄥ埌浜咵MF. 鑺變簡涓ゅぉ鏃墮棿浠旂粏鐮旂┒浜嗕互涓婨MF,鐨勭‘鏄釜濂戒笢瑗?

EMF鏍規嵁ecore寤烘ā(鍙互鍜宻chema鐨剎sd鐩鎬簰杞崲)鐢熸垚寮虹被鍨嬬殑EMF浠g爜. 榪欎釜寮虹被鍨嬫洿寮虹殑鍦版柟鏄彲浠ュ彇寰梞eta淇℃伅,浠庤屽彲浠ョ敤浜庢牎楠屽拰鐣岄潰杈呭姪淇℃伅鐨勭敓鎴?綾諱技浜庡姩鎬乥ean,灞炴т篃鍙互鏍規嵁鍚嶇О鍔ㄦ佸彇寰?

浠ュ墠鑰冭檻榪囩敤xsd鎻忚堪鐣岄潰, 浣嗘槸鏁版嵁杞戒綋鍙兘鏄痻ml, 鍗充嬌鍒╃敤apache鐨剆chema緙栬瘧宸ュ叿鐢熸垚寮虹被鍨嬬殑綾?鍚庡彴浠g爜涔熸槸xml. 涓嶅埄浜庢寔涔呭寲. emf鍦ㄤ唬鐮佺敓鎴愬紩鎿庢瘮杈冩櫤鑳?鍙互鏍囪鍑虹敤鎴蜂唬鐮佸拰鑷姩鐢熸垚浠g爜.涓嶄細鏈夌敓鎴愯鐩栭棶棰?

榪欓噷鍋氫釜綆鍗曠ず渚?
1. Ecore:
鍙互鏂板緩Ecore, 寤虹珛濂戒互鍚庣敤GMF鍙鍖栫紪杈?Eclipse3.2RC2)

2. 鐢熸垚Model:
鐐瑰嚮my.ecore鏂囦歡,鑿滃崟:File->New->Other->Eclipse Modeling Framework->EMF Model
3. 鎵撳紑鐢熸垚鐨刴y.genmodel, 閫夋嫨鏍戦《鐐圭殑:Generate Model Code
鐢熸垚鐨勪唬鐮侀噷闈細鏈変竴涓紪璇戦敊璇? 鏄腑鏂囩紪紼嬬殑闂, 涓枃娌℃湁澶у皬鍐?鍏堝ぉ涓嶈凍鍟?,緇撴灉鎬у埆榪欎釜鎴愬憳鍙橀噺鍜屾у埆綾誨悕娣鋒穯,鍑洪敊.鍦ㄩ敊璇唬鐮佸墠闈㈠姞涓婂寘鍏ㄥ悕鍗沖彲.
4. 鍒╃敤鐢熸垚鐨勪唬鐮佹瀯寤轟竴涓搴?杈撳嚭xml騫朵笖鏍¢獙涔?

import 聽java.io.IOException;
import 聽java.util.Iterator;

import 聽org.eclipse.emf.common.util.Diagnostic;
import 聽org.eclipse.emf.common.util.URI;
import 聽org.eclipse.emf.ecore.EObject;
import 聽org.eclipse.emf.ecore.resource.Resource;
import 聽org.eclipse.emf.ecore.util.Diagnostician;
import 聽org.eclipse.emf.ecore.xmi.XMLResource;
import 聽org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
import 聽org.steeven.family.FamilyFactory;
import 聽org.steeven.family.浜虹墿;
import 聽org.steeven.family.瀹跺涵;
import 聽org.steeven.family.鎬у埆;

public class 聽TestMy聽 {

聽聽聽聽
public static void 聽main(String[]聽args)聽 throws 聽IOException聽 {
聽聽聽聽聽聽聽聽testFamily();
聽聽聽聽}


聽聽聽聽
private static void 聽testFamily()聽 throws 聽IOException聽 {
聽聽聽聽聽聽聽聽瀹跺涵聽family聽
= 聽FamilyFactory.eINSTANCE.create瀹跺涵();
聽聽聽聽聽聽聽聽family.setTitle(
" steeven瀹?/span> " );
聽聽聽聽聽聽聽聽family.set鑰佸叕(FamilyFactory.eINSTANCE.create浜虹墿());
聽聽聽聽聽聽聽聽family.get鑰佸叕().set濮撳悕(
" steeven " );
聽聽聽聽聽聽聽聽family.set鑰佸﹩(FamilyFactory.eINSTANCE.create浜虹墿());
聽聽聽聽聽聽聽聽family.get鑰佸﹩().set濮撳悕(
" stella " );
聽聽聽聽聽聽聽聽family.get鑰佸﹩().set鎬у埆(鎬у埆.濂砡LITERAL);
聽聽聽聽聽聽聽聽浜虹墿聽sophie聽
= 聽FamilyFactory.eINSTANCE.create浜虹墿();
聽聽聽聽聽聽聽聽sophie.set濮撳悕(
" sophie " );
聽聽聽聽聽聽聽聽sophie.set鎬у埆(鎬у埆.濂砡LITERAL);
聽聽聽聽聽聽聽聽family.get鍏斿唇瀛?).add(sophie);
聽聽聽聽聽聽聽聽dump(family);
聽聽聽聽聽聽聽聽validate(family);
聽聽聽聽}


聽聽聽聽
private static void 聽validate(EObject聽family)聽 {
聽聽聽聽聽聽聽聽Diagnostic聽diagnostic聽
= 聽Diagnostician.INSTANCE.validate(family);
聽聽聽聽聽聽聽聽System.out.println(diagnostic);
聽聽聽聽聽聽聽聽
for 聽(Iterator聽it聽 = 聽diagnostic.getChildren().iterator();聽it.hasNext();)聽 {
聽聽聽聽聽聽聽聽聽聽聽聽Diagnostic聽diag聽
= 聽(Diagnostic)聽it.next();
聽聽聽聽聽聽聽聽聽聽聽聽System.out.println(diag.getMessage());
聽聽聽聽聽聽聽聽}

聽聽聽聽}


聽聽聽聽
private static 聽Resource聽dump(EObject聽objs)聽 throws 聽IOException聽 {
聽聽聽聽聽聽聽聽
// 聽ResourceSet聽rs聽=聽new聽ResourceSetImpl();
聽聽聽聽聽聽聽聽
// 聽rs.getResourceFactoryRegistry().getExtensionToFactoryMap().put(
聽聽聽聽聽聽聽聽
// 聽Resource.Factory.Registry.DEFAULT_EXTENSION,
聽聽聽聽聽聽聽聽
// 聽new聽XMIResourceFactoryImpl());
聽聽聽聽聽聽聽聽
// 聽Resource聽resource聽=聽rs.createResource(URI
聽聽聽聽聽聽聽聽
// 聽.createFileURI("c:\\temp\\test.xml"));
聽聽聽聽聽聽聽聽XMLResource聽resource聽 = new 聽XMLResourceImpl(URI
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽.createFileURI(
" c:\\temp\\test.xml " ));
聽聽聽聽聽聽聽聽resource.setEncoding(
" GBK " );
聽聽聽聽聽聽聽聽
for 聽(EObject聽obj聽:聽objs)
聽聽聽聽聽聽聽聽聽聽聽聽resource.getContents().add(obj);聽
// 聽鐩墠鐗堟湰涓嶅姞鍏esource楠岃瘉浼氭姤singling寮傚父
聽聽聽聽聽聽聽聽resource.save(System.out,聽 null );
聽聽聽聽聽聽聽聽
return 聽resource;
聽聽聽聽}

}

榪愯緇撴灉濡備笅:

<? xml聽version="1.0"聽encoding="GBK" ?>
< family: 瀹跺涵聽xmlns:family ="http://org.steeven/family" 聽title ="steeven瀹? 聽鑰佸叕 ="/" 聽鑰佸﹩ ="/" 聽鍏斿唇瀛?/span> ="/" />
Diagnostic聽ERROR聽
The聽feature聽'鑰佸叕'聽of聽'org.steeven.family.impl.瀹跺涵Impl@f6a746{file:/c:/temp/test.xml#/}'聽contains聽a聽dangling聽reference聽'org.steeven.family.impl.浜虹墿Impl@6eb38a{#//}'
The聽feature聽'鑰佸﹩'聽of聽'org.steeven.family.impl.瀹跺涵Impl@f6a746{file:/c:/temp/test.xml#/}'聽contains聽a聽dangling聽reference聽'org.steeven.family.impl.浜虹墿Impl@1cd2e5f{#//}'
The聽feature聽'鍏斿唇瀛?聽of聽'org.steeven.family.impl.瀹跺涵Impl@f6a746{file:/c:/temp/test.xml#/}'聽contains聽a聽dangling聽reference聽'org.steeven.family.impl.浜虹墿Impl@19f953d{#//}'

鍙杈撳嚭鐨剎ml涓病鏈夊寘鍚漢鐗╃殑鍏蜂綋淇℃伅. 淇敼my.ecore涓佸叕/鑰佸﹩/鍏斿唇瀛愬睘鎬х殑containment灞炴т負true,閲嶆柊鐢熸垚浠g爜鍚庤繍琛岀粨鏋滃涓?
<?xml聽version="1.0"聽encoding="GBK"?>
<family:瀹跺涵聽xmlns:family="http://org.steeven/family"聽title="steeven瀹?>
聽聽
<鑰佸叕聽濮撳悕="steeven"/>
聽聽
<鑰佸﹩聽鎬у埆="濂?聽濮撳悕="stella"/>
聽聽
<鍏斿唇瀛惵犳у埆="濂?聽濮撳悕="sophie"/>
</family:瀹跺涵>
Diagnostic聽OK


====================
EMF鍗曠嫭榪愯鎴愬姛~

榪欓噷ECORE浼間箮涓嶆敮鎸佸祵濂楀畾涔?涓嶅儚schema閭f牱涓涓猚omplexType澹版槑閲岄潰鍙互瀹氫箟鐨勫緢澶嶆潅, 涔熶笉鍍廕ava鐨勫唴閮ㄧ被. 浼間箮琚綔浜嗙畝鍖? 鏇村儚鍏崇郴鏁版嵁搴撹〃涔嬮棿鐨勫叧緋?

寰呮眰璇侀棶棰?
1. EMF鐨勬牎楠屼俊鎭槸鍚︽敮鎸佸浗闄呭寲.
2. EMF鏁版嵁鐨勮兘鍚︽洿鏂逛究鐨勪繚瀛樺埌鏁版嵁.

EMF鐨勭伒媧誨拰寮哄ぇ宸茬粡楠岃瘉榪? 鐢ㄤ簬C/S榪樻槸B/S搴旇閮戒笉鏄棶棰?


steeven 2006-05-14 21:27 鍙戣〃璇勮
]]>
Java鐗?006鏂版槬紲濈http://m.tkk7.com/steeven/archive/2006/01/12/27697.htmlsteevensteevenThu, 12 Jan 2006 03:33:00 GMThttp://m.tkk7.com/steeven/archive/2006/01/12/27697.htmlhttp://m.tkk7.com/steeven/comments/27697.htmlhttp://m.tkk7.com/steeven/archive/2006/01/12/27697.html#Feedback1http://m.tkk7.com/steeven/comments/commentRss/27697.htmlhttp://m.tkk7.com/steeven/services/trackbacks/27697.html鍋秏sn鍚嶅瓧鏄細Year y2006 = /*happy*/ new Year(2006);
涓涓湅鍙嬪彈鍒板惎鍙戯紝緇欏伓鍐欎簡涓孌電紱忎唬鐮侊紝紼嶅井鏀圭紪涓涓嬮佺粰澶у

for(Blogger blogger :  BlogFarm.getInstance["BlogJava"].getBloggers()){
    blogger.setHealth(
Health.good);
    blogger.getFamily().setHappy(blogger.getFamily().getHappy() 
1);
    blogger.setMoney(blogger.getMoney 
* 10);
}

澶囨敞錛?BR>1.鏈崟鍏冩祴璇?BR>2. 鎰熻涓嶅c#鐗堟柊鏄ョ紱?/A>浼橀泤涓浜?BR>



steeven 2006-01-12 11:33 鍙戣〃璇勮
]]>
濂㈣皥鏈潵鐨刯ava璇█銆傘傘?http://m.tkk7.com/steeven/archive/2005/12/29/25904.htmlsteevensteevenThu, 29 Dec 2005 09:01:00 GMThttp://m.tkk7.com/steeven/archive/2005/12/29/25904.htmlhttp://m.tkk7.com/steeven/comments/25904.htmlhttp://m.tkk7.com/steeven/archive/2005/12/29/25904.html#Feedback5http://m.tkk7.com/steeven/comments/commentRss/25904.htmlhttp://m.tkk7.com/steeven/services/trackbacks/25904.htmlJava鏄釜鎵朵笉璧風殑闃挎枟錛宻un鍦ㄨ耽浜嗗井杞殑瀹樺徃浠ュ悗浼間箮鍦ㄥ繖浜庡垎綰紝鐩稿浜庣孩綰㈢伀鐏殑.net涓栫晫錛宻un鍑犱箮鍦ㄥ潗浠ュ緟姣欙紝嫻垂鏃犳暟寮婧愮埍濂借呯殑鎰熸儏銆?BR>matrix灞曟湜2006鐨刯ava錛屼技涔庡彧鑳界湅鍒板紑婧愮埍濂借呯殑涓鑵旂儹琛銆?BR>
鏈潵鐨刯ava搴旇鏄粈涔堟牱瀛愬憿錛熶笅闈㈡槸鎴戞湡鏈涳細 

    /**
     * 1. 絀烘寚閽堟姂鍒?lt;br>
     * JVM鏀寔鐨凴untime絀烘寚閽堟姂鍒訛紝鏍規嵁鏂規硶鐨刐Nullable]鏍囪<br>
     * java閲岄潰鏈夊お澶氱殑NullPointer寮傚父錛岀粡甯擱渶瑕佸鏉傜殑媯嫻嬶紝嫻垂娌″繀瑕佺殑浠g爜銆?BR>     
*/

    [Nullable]
    
public void testNullable(A a){
        
return a.b().c.d(); //濡傛灉鐢╥f else鍐欓渶瑕佸灝戜唬鐮侊紵
    }

    
    
/**
     * 2. 鍔ㄦ佸睘鎬ф敮鎸?lt;br>
     * 綾諱技鑼冨瀷鐨勫疄鐜幫紝鐢辯紪璇戝櫒鏀寔鍗沖彲銆?lt;br>
     * 
@param a: A implements DynamicBean,娌℃湁瀹氫箟c灞炴?BR>     */

    
public void dynamicProperty(A a){
        
assert a != null;
        a.b.c 
= "abc"//絳夋晥浜巃.getProperty("b").setProperty("c","abc");
        ResultSet rs; //for database:
        String name = rs.name; //if ResultSet defined getStringProperty(): String name = rs.getStringProperty("a");
        Element order; //for xml, element auto-created in getProperty() method.
        order.address.phone = "1234"//order.getProperty("address").setProperty("phone","1234");
    }

    
    
    
/**
     * 3. 鍔ㄦ佹柟娉曟敮鎸?lt;br>
     * 鐢辯紪璇戝櫒鏀寔鍗沖彲銆?lt;br>
     * 
@param a: A implements DynamicInvoke,娌℃湁瀹氫箟b()鏂規硶
     
*/

    
public void dynamicMethod(A a){
        a.b(
1,"x"); //緙栬瘧涓篴.invoke("b",new Object[]{1,"x"]);
    }

    
    
/**
     * 4. 蹇熷弽灝?lt;br>
     * 鐢辯紪璇戝櫒鏀寔鍗沖彲銆備究浜庣紪璇戞湡闂撮敊璇鏌?lt;br>
     * 
@param a: A 瀹氫箟浜哹(),c鍙橀噺
     
*/

    
public void fastReflection(A a){
        Annotation[] mas 
= a.b().class.getAnnotations(); //a.getClass().getMethod("b").getAnnotations();
        Annotation[] mas = a.c.class.getAnnotations(); // a.getClass().getField("c").getAnnotations();
    }

    
    
/**
     * 5. 绱㈠紩鍣?lt;br>
     * 綾諱技.net鐨勭儲寮曞櫒錛岃娉曠畝媧併傜紪璇戞湡闂存敮鎸佸嵆鍙?lt;br>
     * 
@param a: A 瀹炵幇浜哃ist鎺ュ彛錛孧ap鎺ュ彛
     
*/

    
public void indexVisit(A a){
        Element order ; 
//xml element
        Element first = order[0]; //order.get(0);
        Element address = order["address"]; //order.get("address")
    }


    
/**
     * 6. AOP<br>
     * JVM鍐呯疆鏀寔AOP鏍囪<br>
     * Trace鏄敤鎴瘋嚜琛屽畾鍒剁殑Attribute, Trace.Interceptor鎸囧畾鎷︽埅鍣?nbsp;
     
*/

    [Trace]
    [Role(
"admin")][Transactional]
    
public void jvmAOP(A a){
        
    }

    
    
/**
     * 7. 鏉′歡緙栬瘧<br>
     * 緙栬瘧鍣ㄦ敮鎸丆ondition鏍囪,鍙互鐢ㄤ簬鎵鏈夊厓绱狅紝鐢氳嚦package<br>
     * 鐢ㄤ簬嫻嬭瘯鏈熼棿銆佽皟璇曟湡闂寸紪璇戝嚭涓嶅悓鐨勭粨鏋?BR>     
*/

    
    
/**
     * 8. Schema錛孌ataBase緙栬瘧鏀寔<br>
     
*/

    
public static void schemaSupport() {
        [Schema(url
="file://test.xsd")]
        Document doc;
        Element c 
= doc.a.b.c; //鏍規嵁schema緙栬瘧鏈熼棿媯鏌?/SPAN>
    }

    
    
/**
     * 9. 鍐呯疆瀵硅薄鏁版嵁搴擄紝鏀寔綾諱技璁板繂鐨勯仐蹇樻ā寮忎互鑺傜渷絀洪棿
     
*/

    
public void databaseSupport(){
        Database.
default.find("");
    }

    
    
/**
     * 10. 騫沖彴鏀寔<br>
     * 緙栧啓windows鐨勬湇鍔★紝璋冪敤windows鐨勬敞鍐岃〃/log/ad/schedule/鑿滃崟銆佸伐鍏鋒潯銆佹闈€傘傘?BR>     
*/

    
public void platformSupport(){
        PlatformRegistry.getString(
".");
    }



甯屾湜sun鏃╂棩鎶妀ava鎹愯禒鍒板紑婧愮ぞ鍖猴紝璞clipse涓鏍風剷鍙戦潚鏄ャ?



steeven 2005-12-29 17:01 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 亚洲精品成人网站在线播放 | 亚洲欧美国产欧美色欲| 麻豆精品国产免费观看| 思思久久99热免费精品6| 久久亚洲精品成人综合| 青青在线久青草免费观看| 丰满妇女做a级毛片免费观看| 亚洲国产精品无码一线岛国| 18国产精品白浆在线观看免费| 青娱乐在线免费观看视频| 国产亚洲精品国产| 成人免费午夜在线观看| 三根一起会坏掉的好痛免费三级全黄的视频在线观看 | 性感美女视频在线观看免费精品 | 免费乱码中文字幕网站| 久久久久高潮毛片免费全部播放| 福利片免费一区二区三区| 久久久亚洲欧洲日产国码二区| 免费jlzzjlzz在线播放视频| 99re这里有免费视频精品| 男女污污污超污视频免费在线看| 亚洲福利一区二区三区| 国内精品99亚洲免费高清| 在线观看免费大黄网站| 日韩免费视频一区二区| 深夜A级毛片视频免费| 亚洲av产在线精品亚洲第一站| 亚洲熟妇av一区二区三区| 国产区卡一卡二卡三乱码免费| 免费在线观看h片| a级毛片高清免费视频| 免费一级毛片在线播放放视频 | 日本二区免费一片黄2019| 最近免费最新高清中文字幕韩国 | 国产成人精品日本亚洲11| 亚洲国产精品一区二区久久hs| 日韩精品电影一区亚洲| 日本成人免费在线| 最近最好的中文字幕2019免费| 2015日韩永久免费视频播放| 羞羞视频免费网站在线看|