MDA/MDD/TDD/DDD/DDDDDDD
posts - 536, comments - 111, trackbacks - 0, articles - 0
  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

1,与Light集成?
http://www.grails.org/Portal+Functionality

2,
This presentation describes a simple way to build a working framework for a user portal. This framework is built upon some very popular features in Grails and provides many examples of Grails plug-in integration and use of some of the more complex features of Grails such as integrating Ajax with Groovy Server Pages.

The presentation describes a step-by-step approach to using the convention based paradigm in Grails to create a simple User Portal. It walks through the process of creating a web flow based upon the Spring Web-Flow product included within Grails. The last topic focuses on implementing Grails user interface components and integrating them with the Grails Portal code. Each of these areas are presented by outlining the principles and the decision process involved in creating the components and then showing how to use the results of the work in a specific business case.

http://code.google.com/p/grailsportal

posted @ 2010-05-25 22:49 leekiang 阅读(528) | 评论 (0)编辑 收藏

public class UsersTest extends AbstractTransactionalDataSourceSpringContextTests {
    private IDatabaseTester databaseTester;

    @Override
    protected void onSetUp() throws Exception {
        databaseTester = new JdbcDatabaseTester("oracle.jdbc.driver.OracleDriver",
                "jdbc:oracle:thin:@localhost:1521:orcl", "test", "test");
        IDataSet dataSet = getDataSet();
        databaseTester.setDataSet(dataSet);
        databaseTester.onSetup();
    }

    @Override
    protected void onTearDown() throws Exception {
        databaseTester.onTearDown();
    }

    protected IDataSet getDataSet() throws Exception {
        String path = "users.xml";
        InputStream in = this.getClass().getResourceAsStream(path);
        return new FlatXmlDataSetBuilder().build(in);
    }
}

Unitils是一个简化测试开发,提高测试维护性的一个工具集
Dbdeploy是Thoughtworks公司开发的数据库工具,获得Jolt大奖

posted @ 2010-05-23 19:35 leekiang 阅读(413) | 评论 (0)编辑 收藏

因为要处理遗留代码,需要在 gog 中使用手工事务, 在 resources.groovy 中进行如下定义后

  1. testDataSourceTxManager(DataSourceTransactionManager){  
  2.     dataSource = ref('dataSource')  
  3. }  

 发现 service 中的事务没了。

 查了一下 Grails 的源码, 原来 grails 在进行事务管理器查找的时候,并不是用的 bean 名字去查找,而是查找 所有 是 TransactionManager 实例 的 Bean, 并从得到的数组中 取第一个作为事务管理器。

 因此要使用 spring 的 DataSourceTransactionManager 的, 就不能将这个 Manager 在 Context 中定义了。只能通过自己 new 一个 单例的 DataSourceTransactionManager, 然后将 DataSource 传入,这样就可以用了..........

来源:http://phoenix-clt.javaeye.com/blog/430400


http://osdir.com/ml/lang.groovy.grails.user/2008-04/msg00663.html

How to operate the partition table with Hibernate & GORM

Sorry I had been on a business trip for a few days
Although the Hibernate Shards has some urgent limitations, like 'Cross-Shard
Object Graphs' , it is a wonderful solution for this. But the Hibernate
Shards has implemented its own Session/SessionFactory(etc.), maybe bring
GROM some troubles.

Thanks for your reply. And to look forward to that GROM can support
Hibernate Shards.


To take an advantage of the Spring JDBC Template for any Grail application, the first thing you need to do, is to define the DataSource bean in resources.groovy , Don't forget to have the jdbc driver(.jar) corresponding to your backend database server under the lib folder of your grail application.


http://www.rimple.com/tech/2010/3/25/calling-postgresql-stored-procedures-from-grails-part-1-the.html

http://www.blogjava.net/rain1102/archive/2008/07/18/215891.html

posted @ 2010-05-23 04:57 leekiang 阅读(521) | 评论 (0)编辑 收藏

http://www.ibm.com/developerworks/cn/opensource/os-cn-shiro/index.html
grails-spring-security-core

posted @ 2010-05-23 00:34 leekiang 阅读(459) | 评论 (0)编辑 收藏

1,基于Flash图表组件Open Flash Chart的chart插件
http://svn.codehaus.org/grails-plugins/grails-ofchart
http://mybytes.wordpress.com/2009/03/09/grails-open-flash-chart-06-is-out/

posted @ 2010-05-21 00:55 leekiang 阅读(292) | 评论 (0)编辑 收藏

1.使用AbstractTransactionalSpringJbpmTestCase做测试时出错
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngine' defined in class path resource [applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [protected org.jbpm.api.ProcessEngine org.jbpm.pvm.internal.processengine.SpringHelper.createProcessEngine()] threw exception; nested exception is org.jbpm.api.JbpmException: no org.jbpm.pvm.internal.tx.SpringTransaction in current environment
解决办法:
在jbpm.cfg.xml的<transaction-context>里加上一行
<transaction type="spring" />

2.
 如果使用了
<bean id="springHelper" class="org.jbpm.pvm.internal.processengine.SpringHelper" />
<bean id="processEngine" factory-bean="springHelper" factory-method="createProcessEngine" />
就不需要通过Configuration构造了,可以通过spring里的依赖注入获得processEngine
包括什么repositoryService,taskService都不要进行bean配置了













https://jira.jboss.org/browse/JBPM-2710
http://jbpm.group.javaeye.com/group/topic/18352
http://ronghao.javaeye.com/blog/412956
http://xiaokaiye.javaeye.com/blog/413136
http://jbpm.group.javaeye.com/group/blog/375061
http://www.slideshare.net/ainze/spring-integration-with-jbpm4#
http://www.blogjava.net/vanlin/archive/2009/10/12/297903.html
http://n.tomek.bujok.info/index.php/Spring_integration_in_jBPM_4

posted @ 2010-05-17 18:02 leekiang 阅读(958) | 评论 (0)编辑 收藏

在windows上直接gem安装rmagick时报Building native extensions.   Error installing rmagick windows

1 从http://rubyforge.org/projects/rmagick/ 下载rmagick-win32 对应的zip包.没找到ruby1.8.7和1.9的,只好先下1.8.6的
2 解压zip到一个临时目录,在该目录中有一个ImageMagick的ext安装文件,安装。
3 开一个命令行窗口,cd到解压的临时目录,敲入命令: gem install rmagick.
4.ImageMagick 的安装路径放到path环境变量里面

可能出现的问题:
1.CORE_RL_magick_.dll找不到?
ImageMagick 的安装路径放到path环境变量里面去就OK了。
2.gem install rmagick 失败
更新gem的 版本( gem update --system)

参考http://wxmfly.javaeye.com/blog/216787

posted @ 2010-05-17 03:12 leekiang 阅读(417) | 评论 (0)编辑 收藏

数据仓库的出现,并不是要取代数据库。目前,大部分数据仓库还是用关系数据库管理系统来管理的。可以说,数据库、数据仓库相辅相成、各有千秋。
数据库是面向事务的设计,数据仓库是面向主题设计的。
数据库一般存储在线交易数据,数据仓库存储的一般是历史数据。
数据库设计是尽量避免冗余,一般采用符合范式的规则来设计,数据仓库在设计是有意引入冗余,采用反范式的方式来设计。 数据库是为捕获数据而设计,数据仓库是为分析数据而设计,它的两个基本的元素是维表和事实表。

简单的说:   
    1、事实就是你要关注的内容;   
    2、维度是描述事物特征的一个角度。例如门店销售情况需要分析商品销售的时间、地点、商品名等。这里的时间、地点、商品名就是门店销售情况的分析维度。
例如,某地区商品的销量,是从地区这个角度观察商品销量的。事实表就是销量表,维表就是地区表。

1、数据仓库是面向主题的,主题就是所要解决问题的领域
2、数据仓库是集成的,数据仓库的数据有来自于分散的操作型数据,将所需数据从原来的数据中抽取出来,进行加工与集成,统一与综合之后才能进入数据仓库;
3、相对稳定,数据仓库的数据主要供企业决策分析之用,所涉及的数据操作主要是数据查询,一旦某个数据进入数据仓库以后,一般情况下将被长期保留,也就是数据仓库中一般有大量的查询操作,但修改和删除操作很少,通常只需要定期的加载、刷新。
4、反映历史变化

数据仓库数据库
是整个数据仓库环境的核心,是数据存放的地方和提供对数据检索的支持。相对于操纵型数据库来说其突出的特点是对海量数据的支持和快速的检索技术。
数据仓库数据库的结构与一般的表结构不一样
元数据
   元数据是描述数据仓库内数据的结构和建立方法的数据。可将其按用途的不同分为两类,技术元数据和商业元数据。


数据仓库的解决方法包括:将决策支持型数据处理从事务型数据处理中分离出来。数据按照一定的周期(通常在每晚或者每周末),从事务型数据库中导入决策支持型数据库——既“数据仓库”。数据仓库是按回答企业某方面的问题来分“主题”组织数据的,这是最有效的数据组织方式。

信息化的实施,是没有终点的,它是一个持续优化的过程,BI的实施,尤其如此。随着业务系统的深入应用,流程会发生变化;随着管理的侧重点不同,领导关注的数据也会不同。这都需要重新修改数据仓库与分析模型
关键词一:时间维度
时间维度虽是数据仓库中的最核心的维度之一,但表面上来看,仅是日期而已,是非常简单的。很容易忽略一个很常见的问题:对于企业来说,通常会有两种时间:一种是自然日历时间,另一种则是财务使用的会计时间。有很多企业,因为上市的原因,采取某个4月1日至第二年3月31日来定义财年,或因为历史的习惯,每个月从26号到次月的25日为会计期间。在操作中,业务部门肯定是按自然时间来录入与查询信息,而财务部门则按照会计时间来进行记账与出报表,在这种情况下,就需要建立一种规则,来识别自然时间与会计时间的对应关系。
关键词三:增量更新
数据仓库的创建不是一次完成的,它必然要根据业务系统数据的更新而更新。如何实现增量更新?这是建立数据仓库时最大的技术难点。增量更新意味着它必须识别哪些数据发生过变化?如增加/修改了哪些客户资料?增加/修改了哪些订单?


数据仓库中的三种事实表
Transaction fact table(事务事实表),比如交易记录,
Periodic snapshot fact table(周期快照事实表),我觉得月累,年累就是属于这种类型
Accumulating snapshot fact table(累积快照事实表)累积快照事实表和周期快照事实表有些相似之处,它们存储的都是事务数据的快照信息。但是它们之间也有着很大的不同,周期快照事实表记录的确定的周期的数据,而累积快照事实表记录的不确定的周期的数据.对这个似懂非懂。

由于事实是一种度量,所以事实表中的这种指标往往需要具有数值化和可加性的特征。但是在事实表中,只有那些具有完全可加性的事实才能根据所有的维度进行累加而具有意义。而事实表有一些事实表示的是某种强度,这类事实就不具有完全加法性,而是一种半加法性。例如,账目余款反映的是某个时间点的数据,它可以按照地点和商品等大多数维度进行累加,但是对于时间维度则例外,将一年中每个月的账目余款进行累加是毫无意义的,而决策者则可能需要了解所有地区和所有商品账目余款的累加值。在事实表中还有一些事实是非加法性的,即这些事实具有对事实的描述特性,在这种情况下一般要将这些非加法性事实转移到维度表中。

数据仓库与数据集市
数据仓库是企业级的,能为整个企业各个部门的运行提供决策支持手段;而数据集市则是一种微型的数据仓库,它通常有更少的数据,更少的主题区域,以及更少的历史数据,一般只能为某个局部范围内的管理人员服务,因此也称之为部门级(工作组级)数据仓库。
数据仓库中数据结构采用规范化结构(第三范式),数据集市中的数据结构采用星型模式或雪片模式,通常仓库中数据粒度比集市的粒度要细
http://www.chinabi.net/blog/user1/105/archives/2006/388.html
http://blog.csdn.net/dreamwdt/archive/2008/03/19 /2197084.aspx

参考:
http://www.blogjava.net/sterning/archive/2007/12/14/167739.html
http://book.51cto.com/art/200710/58849.htm等

posted @ 2010-05-14 17:34 leekiang 阅读(507) | 评论 (0)编辑 收藏

Coverlipse是一个用于Cobertura 的Eclipse 插件,
Cobertura是一个基于jcoverage的代码覆盖率工具,它能够显示哪一部分代码被你的测试所覆盖,并可生成HTML或XML报告.
http://www.ibm.com/developerworks/cn/java/j-cobertura/
http://www.ibm.com/developerworks/cn/java/j-ap01117/

subclipse切换中英文
在eclipse\configuration\config.ini文件里加一行osgi.nl=en_US或osgi.nl=zh

posted @ 2010-05-13 11:58 leekiang 阅读(254) | 评论 (0)编辑 收藏

SQLAlchemy
SQLAlchemy是python的一个有名的数据库ORM,简单易用,功能强大,不需要什么xml,生成的SQL脚本干净简洁。
SQLAlchemy 的 ORM 遵从 DataMapping 设计模式,而 Elixir 则是在 SQLAlchemy 基础上的一层 ActiveRecord 模式的实现,它使用一套类似 RoR 的 ActiveRecord 系统的领域语言语法,从此开发者可以用一种更加简洁的方式对 SQLAlchemy 的强大功能进行访问

posted @ 2010-05-11 18:21 leekiang 阅读(289) | 评论 (0)编辑 收藏

仅列出标题
共54页: First 上一页 11 12 13 14 15 16 17 18 19 下一页 Last