key words: bea world2006? ,workshop studio, 快速開發
bea world 2006 北京已經過去好幾天了,早就想記錄一下一直忙? :)
這次參會之行還是有所收獲,主題雖然是SOA,但是我對這個現在倒是沒什么特別的關注,畢竟這個和公司選用的產品有關系,我們這邊公司現在用的Oracle的比較多。
最吸引我的是它的一款開發工具 : workshop studio 3.2
這個工具基于Eclipse,同時集成了Spring,hibernate,Struts,JSF,Ajax,關鍵的是開發界面效果很棒,支持自動生成,運用Xray掃描技術,在頁面可以做到自動提醒。
我個人一直使用IntelliJ IDEA 5,感覺IDEA的編寫java代碼確實很強,包括xp能力,但是看他的jsp編寫能力實在是太弱了,雖然也支持語法級別的提示,但是這個是遠遠不夠的,我們需要的是WYSIWYG,這方面workshop studio給了我一個滿意的效果.
可以通過ResourceBundle切換界面語言

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

可以在DbXplorer界面里根據schema自動生成hibernate的O/R mapping文件,包括Domain,也包括dao接口以及實現哦:

看一下向導生成的dao實現 :

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;
????}
}我現在的策略基本上就是用IDEA開發后臺代碼,而pojo,dao,daoImpl的自動生成,以及web/jsp/ajax都是通過workshop studio來做,感覺不錯哦,你還不心動??? :)
詳情請參看官方網站? :
http://workshopstudio.bea.com/index.html再來一張在現場Bea的工程師Peter的一張照片,左邊的是me? :)

Peter給我留下了深刻的印象,技術嫻熟,為人熱情,互動也棒,說到興奮處來一個響指,讓你感覺到作開發也是如此的享受,和國內的開發氛圍截然不可同日而語。說到這就多羅嗦幾句,國內的開發氛圍我感覺就是半死不活,用如下幾個關鍵字做一個概括就是 : 不敬業,冷漠,不專業,不規范,無體系,不受重視,自己看不起自己,別人也看不起自己,自己認為自己像個傻B,結果自己真的變為一個傻B.
記住,主動權永遠在你自己手里,你想成為什么你就會變成什么.
當寒流到來時你是什么心態? 強者的邏輯是:來得更猛烈些,來年春天地上會堆滿尸體.