每日一得

          不求多得,只求一得 about java,hibernate,spring,design,database,Ror,ruby,快速開發(fā)
          最近關(guān)心的內(nèi)容:SSH,seam,flex,敏捷,TDD
          本站的官方站點(diǎn)是:顛覆軟件

            BlogJava :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
            220 隨筆 :: 9 文章 :: 421 評(píng)論 :: 0 Trackbacks
          key words: bea world2006? ,workshop studio, 快速開發(fā)

          bea world 2006 北京已經(jīng)過去好幾天了,早就想記錄一下一直忙? :)

          這次參會(huì)之行還是有所收獲,主題雖然是SOA,但是我對(duì)這個(gè)現(xiàn)在倒是沒什么特別的關(guān)注,畢竟這個(gè)和公司選用的產(chǎn)品有關(guān)系,我們這邊公司現(xiàn)在用的Oracle的比較多。

          最吸引我的是它的一款開發(fā)工具 : workshop studio 3.2

          這個(gè)工具基于Eclipse,同時(shí)集成了Spring,hibernate,Struts,JSF,Ajax,關(guān)鍵的是開發(fā)界面效果很棒,支持自動(dòng)生成,運(yùn)用Xray掃描技術(shù),在頁面可以做到自動(dòng)提醒。

          我個(gè)人一直使用IntelliJ IDEA 5,感覺IDEA的編寫java代碼確實(shí)很強(qiáng),包括xp能力,但是看他的jsp編寫能力實(shí)在是太弱了,雖然也支持語法級(jí)別的提示,但是這個(gè)是遠(yuǎn)遠(yuǎn)不夠的,我們需要的是WYSIWYG,這方面workshop studio給了我一個(gè)滿意的效果.

          可以通過ResourceBundle切換界面語言

          workshop-studio-english.jpg

          也可以在界面切換到中文:

          workshop-studio.jpg


          可以在DbXplorer界面里根據(jù)schema自動(dòng)生成hibernate的O/R mapping文件,包括Domain,也包括dao接口以及實(shí)現(xiàn)哦:
          workshop-studio-hibernate.jpg


          看一下向?qū)傻膁ao實(shí)現(xiàn) :

          public?class?UserRoleSpringService?implements?IUserRoleService?{
          ????
          /**
          ?????*?The?dao?instance?injected?by?Spring.
          ?????
          */

          ????
          private?IUserRoleDao?dao;
          ????
          /**
          ?????*?The?service?Spring?bean?id,?used?in?the?applicationContext.xml?file.
          ?????
          */

          ????
          private?static?final?String?SERVICE_BEAN_ID?=?"UserRoleService";
          ????
          ????
          public?UserRoleSpringService()?{
          ????????
          super();
          ????}

          ????
          /**
          ?????*?Returns?the?singleton?<code>IUserRoleService</code>?instance.
          ?????
          */

          ????
          public?static?IUserRoleService?getInstance(ApplicationContext?context)?{
          ????????
          return?(IUserRoleService)context.getBean(SERVICE_BEAN_ID);
          ????}


          ????
          /**
          ?????*?Find?an?entity?by?its?id?(primary?key).
          ?????*?
          @return?The?found?entity?instance?or?null?if?the?entity?does?not?exist.
          ?????
          */

          ????
          public?UserRole?findUserRoleById(Integer?id)?throws?MyException?{
          ????????
          try?{
          ????????????
          return?getDao().findUserRoleById(id);
          ????????}
          ?catch?(RuntimeException?e)?{
          ????????????
          throw?new?MyException("findUserRoleById?failed?with?the?id?"?+?id?+?":?"?+?e.getMessage());
          ????????}

          ????}

          ????
          /**
          ?????*?Return?all?persistent?instances?of?the?<code>UserRole</code>?entity.
          ?????
          */

          ????
          public?List?findAllUserRoles()?throws?MyException?{
          ????????
          try?{
          ????????????
          return?getDao().findAllUserRoles();
          ????????}
          ?catch?(RuntimeException?e)?{
          ????????????
          throw?new?MyException("findAllUserRoles?failed:?"?+?e.getMessage());
          ????????}

          ????}

          ????
          /**
          ?????*?Return?the?persistent?entities?matching?the?given?example?entity.
          ?????
          */

          ????
          public?List?findUserRolesByExample(UserRole?userRole)?throws?MyException?{
          ????????
          try?{
          ????????????
          return?getDao().findByExample(userRole);
          ????????}
          ?catch?(RuntimeException?e)?{
          ????????????
          throw?new?MyException("findUserRolesByExample?failed:?"?+?e.getMessage());
          ????????}

          ????}

          ????
          /**
          ?????*?Make?the?given?instance?managed?and?persistent.
          ?????
          */

          ????
          public?void?persistUserRole(UserRole?userRole)?throws?MyException?{
          ????????
          try?{
          ????????????getDao().persistUserRole(userRole);
          ????????}
          ?catch?(RuntimeException?e)?{
          ????????????
          throw?new?MyException("persistUserRole?failed:?"?+?e.getMessage());
          ????????}

          ????}

          ????
          /**
          ?????*?Remove?the?given?persistent?instance.
          ?????
          */

          ????
          public?void?removeUserRole(UserRole?userRole)?throws?MyException?{
          ????????
          try?{
          ????????????getDao().removeUserRole(userRole);
          ????????}
          ?catch?(RuntimeException?e)?{
          ????????????
          throw?new?MyException("removeUserRole?failed:?"?+?e.getMessage());
          ????????}

          ????}


          ????
          /**
          ?????*?Find?an?entity?by?its?id?(primary?key).
          ?????*?
          @return?The?found?entity?instance?or?null?if?the?entity?does?not?exist.
          ?????
          */

          ????
          public?ZionRole?findZionRoleById(Integer?id)?throws?MyException?{
          ????????
          try?{
          ????????????
          return?getDao().findZionRoleById(id);
          ????????}
          ?catch?(RuntimeException?e)?{
          ????????????
          throw?new?MyException("findZionRoleById?failed?with?the?id?"?+?id?+?":?"?+?e.getMessage());
          ????????}

          ????}

          ????
          /**
          ?????*?Return?all?persistent?instances?of?the?<code>ZionRole</code>?entity.
          ?????
          */

          ????
          public?List?findAllZionRoles()?throws?MyException?{
          ????????
          try?{
          ????????????
          return?getDao().findAllZionRoles();
          ????????}
          ?catch?(RuntimeException?e)?{
          ????????????
          throw?new?MyException("findAllZionRoles?failed:?"?+?e.getMessage());
          ????????}

          ????}

          ????
          /**
          ?????*?Return?the?persistent?entities?matching?the?given?example?entity.
          ?????
          */

          ????
          public?List?findZionRolesByExample(ZionRole?zionRole)?throws?MyException?{
          ????????
          try?{
          ????????????
          return?getDao().findByExample(zionRole);
          ????????}
          ?catch?(RuntimeException?e)?{
          ????????????
          throw?new?MyException("findZionRolesByExample?failed:?"?+?e.getMessage());
          ????????}

          ????}

          ????
          /**
          ?????*?Make?the?given?instance?managed?and?persistent.
          ?????
          */

          ????
          public?void?persistZionRole(ZionRole?zionRole)?throws?MyException?{
          ????????
          try?{
          ????????????getDao().persistZionRole(zionRole);
          ????????}
          ?catch?(RuntimeException?e)?{
          ????????????
          throw?new?MyException("persistZionRole?failed:?"?+?e.getMessage());
          ????????}

          ????}

          ????
          /**
          ?????*?Remove?the?given?persistent?instance.
          ?????
          */

          ????
          public?void?removeZionRole(ZionRole?zionRole)?throws?MyException?{
          ????????
          try?{
          ????????????getDao().removeZionRole(zionRole);
          ????????}
          ?catch?(RuntimeException?e)?{
          ????????????
          throw?new?MyException("removeZionRole?failed:?"?+?e.getMessage());
          ????????}

          ????}


          ????
          /**
          ?????*?Find?an?entity?by?its?id?(primary?key).
          ?????*?
          @return?The?found?entity?instance?or?null?if?the?entity?does?not?exist.
          ?????
          */

          ????
          public?ZionUser?findZionUserById(Integer?id)?throws?MyException?{
          ????????
          try?{
          ????????????
          return?getDao().findZionUserById(id);
          ????????}
          ?catch?(RuntimeException?e)?{
          ????????????
          throw?new?MyException("findZionUserById?failed?with?the?id?"?+?id?+?":?"?+?e.getMessage());
          ????????}

          ????}

          ????
          /**
          ?????*?Return?all?persistent?instances?of?the?<code>ZionUser</code>?entity.
          ?????
          */

          ????
          public?List?findAllZionUsers()?throws?MyException?{
          ????????
          try?{
          ????????????
          return?getDao().findAllZionUsers();
          ????????}
          ?catch?(RuntimeException?e)?{
          ????????????
          throw?new?MyException("findAllZionUsers?failed:?"?+?e.getMessage());
          ????????}

          ????}

          ????
          /**
          ?????*?Return?the?persistent?entities?matching?the?given?example?entity.
          ?????
          */

          ????
          public?List?findZionUsersByExample(ZionUser?zionUser)?throws?MyException?{
          ????????
          try?{
          ????????????
          return?getDao().findByExample(zionUser);
          ????????}
          ?catch?(RuntimeException?e)?{
          ????????????
          throw?new?MyException("findZionUsersByExample?failed:?"?+?e.getMessage());
          ????????}

          ????}

          ????
          /**
          ?????*?Make?the?given?instance?managed?and?persistent.
          ?????
          */

          ????
          public?void?persistZionUser(ZionUser?zionUser)?throws?MyException?{
          ????????
          try?{
          ????????????getDao().persistZionUser(zionUser);
          ????????}
          ?catch?(RuntimeException?e)?{
          ????????????
          throw?new?MyException("persistZionUser?failed:?"?+?e.getMessage());
          ????????}

          ????}

          ????
          /**
          ?????*?Remove?the?given?persistent?instance.
          ?????
          */

          ????
          public?void?removeZionUser(ZionUser?zionUser)?throws?MyException?{
          ????????
          try?{
          ????????????getDao().removeZionUser(zionUser);
          ????????}
          ?catch?(RuntimeException?e)?{
          ????????????
          throw?new?MyException("removeZionUser?failed:?"?+?e.getMessage());
          ????????}

          ????}


          ????
          /**
          ?????*?Called?by?Spring?using?the?injection?rules?specified?in?
          ?????*?the?Spring?beans?file?"applicationContext.xml".
          ?????
          */

          ????
          public?void?setDao(IUserRoleDao?dao)?{
          ????????
          this.dao?=?dao;
          ????}

          ????
          public?IUserRoleDao?getDao()?{
          ????????
          return?this.dao;
          ????}

          }


          我現(xiàn)在的策略基本上就是用IDEA開發(fā)后臺(tái)代碼,而pojo,dao,daoImpl的自動(dòng)生成,以及web/jsp/ajax都是通過workshop studio來做,感覺不錯(cuò)哦,你還不心動(dòng)??? :)

          詳情請(qǐng)參看官方網(wǎng)站? : http://workshopstudio.bea.com/index.html



          再來一張?jiān)诂F(xiàn)場(chǎng)Bea的工程師Peter的一張照片,左邊的是me? :)

          bea_peter.JPG


          Peter給我留下了深刻的印象,技術(shù)嫻熟,為人熱情,互動(dòng)也棒,說到興奮處來一個(gè)響指,讓你感覺到作開發(fā)也是如此的享受,和國內(nèi)的開發(fā)氛圍截然不可同日而語。說到這就多羅嗦幾句,國內(nèi)的開發(fā)氛圍我感覺就是半死不活,用如下幾個(gè)關(guān)鍵字做一個(gè)概括就是 : 不敬業(yè),冷漠,不專業(yè),不規(guī)范,無體系,不受重視,自己看不起自己,別人也看不起自己,自己認(rèn)為自己像個(gè)傻B,結(jié)果自己真的變?yōu)橐粋€(gè)傻B.

          記住,主動(dòng)權(quán)永遠(yuǎn)在你自己手里,你想成為什么你就會(huì)變成什么.

          當(dāng)寒流到來時(shí)你是什么心態(tài)? 強(qiáng)者的邏輯是:來得更猛烈些,來年春天地上會(huì)堆滿尸體.

          posted on 2006-12-20 11:39 Alex 閱讀(2669) 評(píng)論(10)  編輯  收藏 所屬分類: web技術(shù)

          評(píng)論

          # re: workshop studio震撼你的開發(fā)效率 [bea world2006 歸來,談感受,發(fā)牢騷] 2006-12-20 17:01 quietywind[匿名]
          MyEclipse也是一樣可以做的,BEA我也去了,感覺大部分都是在忽悠。
          在講workshop studio的時(shí)候,居然把自動(dòng)糾錯(cuò)都當(dāng)作是自己的特色了,無語了。
          不過感覺Peter講的確實(shí)挺不錯(cuò)的,很有激情,知識(shí)也很豐富。  回復(fù)  更多評(píng)論
            

          # re: workshop studio震撼你的開發(fā)效率 [bea world2006 歸來,談感受,發(fā)牢騷] 2006-12-20 18:02 anonymous
          整個(gè)一大雜燴,基本上裝一些開源插件就有差不多的效果。看看netbeans的visual webpack吧。  回復(fù)  更多評(píng)論
            

          # re: workshop studio震撼你的開發(fā)效率 [bea world2006 歸來,談感受,發(fā)牢騷] 2006-12-20 19:06 BeanSoft
          Bea 收購的 M7... Bea 跟 Google 一樣, 善于收購潛力股. Netbeans 的 Visual Webpack 偶覺得比起 WTP 來, 貌似含金量要多一點(diǎn)點(diǎn).  回復(fù)  更多評(píng)論
            

          # re: workshop studio震撼你的開發(fā)效率 [bea world2006 歸來,談感受,發(fā)牢騷] 2006-12-21 10:05 Alex
          關(guān)于自動(dòng)糾錯(cuò)你誤解了,他不是一般的方法調(diào)用語法的糾錯(cuò),是字符串的糾錯(cuò),比如你在struts下的jsp里寫<form action="myAction" >里的時(shí)候他的Xray會(huì)根據(jù)struts的配置文件檢查你的惡myAction是不是存在,如果不存在會(huì)提示,而一般的開發(fā)工具不支持,因?yàn)樗鼉H僅知道是個(gè)字符串,只有在運(yùn)行的時(shí)候才會(huì)檢查。 這個(gè)應(yīng)該很人性化的.

          關(guān)于netbeans也有一些問題,現(xiàn)在在開發(fā)工具界netbeans出境比較尷尬,因?yàn)榭傮w來看eclipse是主流,已經(jīng)成為了某種意義上的通用平臺(tái)(盡管有許多人不服),所以從這個(gè)覺得上看bea在戰(zhàn)略上還是處于主動(dòng)的  回復(fù)  更多評(píng)論
            

          # re: workshop studio震撼你的開發(fā)效率 [bea world2006 歸來,談感受,發(fā)牢騷] 2006-12-21 11:56 hejianhuacn
          缺的就是好的示例代碼  回復(fù)  更多評(píng)論
            

          # re: workshop studio震撼你的開發(fā)效率 [bea world2006 歸來,談感受,發(fā)牢騷] 2006-12-22 10:22 keith
          workshop studio很久以前就用了,感覺一級(jí)棒。糾錯(cuò)的確是它的亮點(diǎn),這點(diǎn)在你使用時(shí)就可以體會(huì)到了。
          更好的是它整合了主流的框架,struts、spring、hibernate等等。
          值得一提的還有它的Xray  回復(fù)  更多評(píng)論
            

          # re: workshop studio震撼你的開發(fā)效率 [bea world2006 歸來,談感受,發(fā)牢騷] 2006-12-22 12:56 Alex
          目前每個(gè)都有示例代碼,不過不是本地的,你必須通過向?qū)腷ea的官方站點(diǎn)download,我剛開始的時(shí)候下了N次都沒有下好,跟peter說他在自己機(jī)器上試是好的,后來我回去又試了幾次,居然好了 :)  回復(fù)  更多評(píng)論
            

          # re: workshop studio震撼你的開發(fā)效率 [bea world2006 歸來,談感受,發(fā)牢騷] 2006-12-24 20:32 zhangyafei
          不敬業(yè),冷漠,不專業(yè),不規(guī)范,無體系,不受重視,自己看不起自己,別人也看不起自己,自己認(rèn)為自己像個(gè)傻B,結(jié)果自己真的變?yōu)橐粋€(gè)傻B.

          。。。。。。。

          當(dāng)寒流到來時(shí)你是什么心態(tài)? 強(qiáng)者的邏輯是:來得更猛烈些,來年春天地上會(huì)堆滿尸體.



          特別有意思。  回復(fù)  更多評(píng)論
            

          # re: workshop studio震撼你的開發(fā)效率 [bea world2006 歸來,談感受,發(fā)牢騷] 2007-01-23 17:33 jane_wu
          看了照片我恍然大悟,原來就是你:)  回復(fù)  更多評(píng)論
            

          # re: workshop studio震撼你的開發(fā)效率 [bea world2006 歸來,談感受,發(fā)牢騷] 2007-05-13 15:39 亮亮
          請(qǐng)問樓主workshop 用hibernate 的時(shí)候如何自己生成DAO?我怎么只能生成model?  回復(fù)  更多評(píng)論
            

          主站蜘蛛池模板: 惠来县| 喜德县| 桦甸市| 五莲县| 涟源市| 巴中市| 阿克陶县| 陈巴尔虎旗| 清苑县| 桓台县| 临邑县| 南澳县| 宁波市| 华蓥市| 凯里市| 原平市| 山阴县| 常宁市| 天全县| 宁夏| 阿拉善右旗| 吉安县| 景宁| 肇州县| 凤山市| 星子县| 罗定市| 横山县| 滦南县| 萍乡市| 茂名市| 来凤县| 三穗县| 团风县| 康马县| 东兴市| 舒城县| 抚宁县| 定边县| 福建省| 阿城市|