颠覆软件

关注 : 架构与设计,敏捷,快速开发,项目管理,执行力,SSH,RoR

Archive for the ‘开发工具’ Category

Eclipse下的cvs

July 20, 2007

key words:eclipse cvs

好久没有用cvs了,前一段时间用的比较多的是subversion和starteam,有一些细节的地方和以前不一样。

在一个项目里可能有这样的需求,就是我个人编写的测试用的代码不希望纳入版本控制,那么可以通过如下措施。

1. 在Eclipse的 ” Window > Preferences > Team > Ignored Resources”中可以选择或略掉的文件,这是批量的处理方式

2.在新建的文件或文件夹属性里可以选择 derived让单个文件或文件夹脱离版本控制。

另外,在eclipse下是通过 “>”符号,”?”,黄色的矩形来分别表示文件的不同状态。

eclipse

VN:F [1.6.3_896]
Rating: 0.0/10 (0 votes cast)
VN:F [1.6.3_896]
Rating: 0 (from 0 votes)

workshop studio震撼你的开发效率 [bea world2006 归来,谈感受,发牢骚]

December 20, 2006

workshop studio震撼你的开发效率 [bea world2006 归来,谈感受,发牢骚]

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.

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

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

VN:F [1.6.3_896]
Rating: 0.0/10 (0 votes cast)
VN:F [1.6.3_896]
Rating: 0 (from 0 votes)

workshop studio震撼你的开发效率 [bea world2006 归来,谈感受,发牢骚]

December 20, 2006

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 IUserRoleService 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 UserRole 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 ZionRole 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 ZionUser 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. 记住,主动权永远在你自己手里,你想成为什么你就会变成什么. 当寒流到来时你是什么心态? 强者的逻辑是:来得更猛烈些,来年春天地上会堆满尸体.

VN:F [1.6.3_896]
Rating: 0.0/10 (0 votes cast)
VN:F [1.6.3_896]
Rating: 0 (from 0 votes)

在IDEA中集成VSS版本控制

September 21, 2006

key words: VSS IDEA

vss实在是太恶心了,提交各东西还不支此右键,要是要在开发一段时间后提交多个不同的目录下的文件费死劲了,我压根不知道哪个文件还没有提交,Fuck Microsoft!

至少,我们还有IDEA  :)   在开发工具里提交的一个好处就是直观和简便.Let’s go!

具体指导请看这里
你需要填写关于VSS的相关信息 ,截图如下:
vss.png

其中的vss project可能有点困难,属于vss自己的术语,你自己实际上是不知道的,方法是打开vss客户端,通过这个工具查找到你所在的项目的vss project到底是什么,右键项目名称,出现如下dialog

vss2.png
OK了

在IDEA里看看效果,截图如下:

vss3.png

Fine.

VN:F [1.6.3_896]
Rating: 0.0/10 (0 votes cast)
VN:F [1.6.3_896]
Rating: 0 (from 0 votes)

pd:怎么样使CODE不跟这改变?

August 26, 2006

反向工程生成的PDM,表中NAME和CODE都一样,现在要修改NAME.
在修改一个表的NAME属性时,CODE属性也会跟着一起改变,怎么样才能让CODE不跟着NAME变呢?

Tools->General Options->Dialog->Name to Code Mirroring (去掉)

VN:F [1.6.3_896]
Rating: 0.0/10 (0 votes cast)
VN:F [1.6.3_896]
Rating: 0 (from 0 votes)

IntelliJ IDEA Live Templates for Hibernate XDoclet-tags

March 16, 2006

keyword: Live Templates XDoclet

在IDEA中要写hibernate标签想不想用自动提示功能?  :)

Come on!

  1. 进入 这里
  2. 把hibernate.xml文本拷到本机

  3. 把hibernate.xml copy 到IDEA的config/templates目录下
  4. 重启IDEA
  5. 进入IDEA的设置里的Erros,找到Unknown javadoc tags,把以下代码copy进来


    hibernate.class,hibernate.discriminator,hibernate.subclass,  hibernate.query,hibernate.property,hibernate.component,  hibernate.id,hibernate.version,,hibernate.timestamp,  hibernate.many-to-one,hibernate.one-to-one,hibernate.set,  hibernate.bag,hibernate.list,hibernate.map,hibernate.array,  hibernate.primitive-array,hibernate.collection-key,  hibernate.collection-index,hibernate.collection-element,  hibernate.composite-element,hibernate.collection-many-to-many,  hibernate.collection-one-to-many

happy吧    :)

VN:F [1.6.3_896]
Rating: 0.0/10 (0 votes cast)
VN:F [1.6.3_896]
Rating: 0 (from 0 votes)