每日一得

不求多得,只求一得 about java,hibernate,spring,design,database,Ror,ruby,快速开发
最近关心的内容:SSH,seam,flex,敏捷,TDD
本站的官方站点是:颠覆软件

  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  220 随笔 :: 9 文章 :: 421 评论 :: 0 Trackbacks
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切换界面语言

workshop-studio-english.jpg

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

workshop-studio.jpg


可以在DbXplorer界面里根据schema自动生成hibernate的O/R mapping文件,包括Domain,也包括dao接口以及实现哦:
workshop-studio-hibernate.jpg


看一下向导生成的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  :)

bea_peter.JPG


Peter给我留下了深刻的印象,技术娴熟,为人热情,互动也棒,说到兴奋处来一个响指,让你感觉到作开发也是如此的享受,和国内的开发氛围截然不可同日而语。说到这就多罗嗦几句,国内的开发氛围我感觉就是半死不活,用如下几个关键字做一个概括就是 : 不敬业,冷漠,不专业,不规范,无体系,不受重视,自己看不起自己,别人也看不起自己,自己认为自己像个傻B,结果自己真的变为一个傻B.

记住,主动权永远在你自己手里,你想成为什么你就会变成什么.

当寒流到来时你是什么心态? 强者的逻辑是:来得更猛烈些,来年春天地上会堆满尸体.

posted on 2006-12-20 11:39 Alex 阅读(2632) 评论(10)  编辑  收藏 所属分类: web技术

评论

# re: workshop studio震撼你的开发效率 [bea world2006 归来,谈感受,发牢骚] 2006-12-20 17:01 quietywind[匿名]
MyEclipse也是一样可以做的,BEA我也去了,感觉大部分都是在忽悠。
在讲workshop studio的时候,居然把自动纠错都当作是自己的特色了,无语了。
不过感觉Peter讲的确实挺不错的,很有激情,知识也很丰富。  回复  更多评论
  

# re: workshop studio震撼你的开发效率 [bea world2006 归来,谈感受,发牢骚] 2006-12-20 18:02 anonymous
整个一大杂烩,基本上装一些开源插件就有差不多的效果。看看netbeans的visual webpack吧。  回复  更多评论
  

# re: workshop studio震撼你的开发效率 [bea world2006 归来,谈感受,发牢骚] 2006-12-20 19:06 BeanSoft
Bea 收购的 M7... Bea 跟 Google 一样, 善于收购潜力股. Netbeans 的 Visual Webpack 偶觉得比起 WTP 来, 貌似含金量要多一点点.  回复  更多评论
  

# re: workshop studio震撼你的开发效率 [bea world2006 归来,谈感受,发牢骚] 2006-12-21 10:05 Alex
关于自动纠错你误解了,他不是一般的方法调用语法的纠错,是字符串的纠错,比如你在struts下的jsp里写<form action="myAction" >里的时候他的Xray会根据struts的配置文件检查你的恶myAction是不是存在,如果不存在会提示,而一般的开发工具不支持,因为它仅仅知道是个字符串,只有在运行的时候才会检查。 这个应该很人性化的.

关于netbeans也有一些问题,现在在开发工具界netbeans出境比较尴尬,因为总体来看eclipse是主流,已经成为了某种意义上的通用平台(尽管有许多人不服),所以从这个觉得上看bea在战略上还是处于主动的  回复  更多评论
  

# re: workshop studio震撼你的开发效率 [bea world2006 归来,谈感受,发牢骚] 2006-12-21 11:56 hejianhuacn
缺的就是好的示例代码  回复  更多评论
  

# re: workshop studio震撼你的开发效率 [bea world2006 归来,谈感受,发牢骚] 2006-12-22 10:22 keith
workshop studio很久以前就用了,感觉一级棒。纠错的确是它的亮点,这点在你使用时就可以体会到了。
更好的是它整合了主流的框架,struts、spring、hibernate等等。
值得一提的还有它的Xray  回复  更多评论
  

# re: workshop studio震撼你的开发效率 [bea world2006 归来,谈感受,发牢骚] 2006-12-22 12:56 Alex
目前每个都有示例代码,不过不是本地的,你必须通过向导从bea的官方站点download,我刚开始的时候下了N次都没有下好,跟peter说他在自己机器上试是好的,后来我回去又试了几次,居然好了 :)  回复  更多评论
  

# re: workshop studio震撼你的开发效率 [bea world2006 归来,谈感受,发牢骚] 2006-12-24 20:32 zhangyafei
不敬业,冷漠,不专业,不规范,无体系,不受重视,自己看不起自己,别人也看不起自己,自己认为自己像个傻B,结果自己真的变为一个傻B.

。。。。。。。

当寒流到来时你是什么心态? 强者的逻辑是:来得更猛烈些,来年春天地上会堆满尸体.



特别有意思。  回复  更多评论
  

# re: workshop studio震撼你的开发效率 [bea world2006 归来,谈感受,发牢骚] 2007-01-23 17:33 jane_wu
看了照片我恍然大悟,原来就是你:)  回复  更多评论
  

# re: workshop studio震撼你的开发效率 [bea world2006 归来,谈感受,发牢骚] 2007-05-13 15:39 亮亮
请问楼主workshop 用hibernate 的时候如何自己生成DAO?我怎么只能生成model?  回复  更多评论
  


只有注册用户登录后才能发表评论。


网站导航: