In fact,i never want to replace the hibernate,ojb or other persistence layers.
The first reason i developed it is just avoiding the resource management.I don't want the programmers to manage resource,just like session.begintTransaction and so on.
I use callback to avoid the transaction management.I developed this dao in 2003 or 20004.
I can't remember it exactly.At that time,the ojb did't release 1.0.So i use dao to manage resource and to avoid the api change.
Later,a comapny buy a product of our company.But they used hibernate2.0,i don't want much change to our code.And it's absolutely a wrose idea to use hibernate and ojb together. So i write a implemetation for hibernate and test it.
That's the reason why the dao support ojb and hibernate.It's beyond my intention.
Recently,our company get a project to up
date a
old software.It used jdbc,so i just choose ibatis as the dao accessor.But i don't want our programmers to manage resource and write sql.So I try to write a ibatis implementation to support the dao.Just a try.I don't want to 100% cross-persistence platform.But as possible as can,I want our programmers know more details about the low-level.
And my design and opinions is just based on the small and medium projects, i think some time it's reasonable.
At last,i want to talk about the "criteria" and "sql"(I don't think there is much difference between sql and hql or ojbql).
I know sql can do everything the criteria can do,but in reverse ,the answer is not.Sql is powerful as you said.But criteria has it's advantages over sql.I think the example code in my previous email just tell it.As you see,hibernate,ojb and jdo also support "criteria ".
Also criteria is not powerful as
sql,but
for my projects, I can use criteria instead of hql in most projects.And i think most time,it's simpler than sql.(Just for small and medium projects,there are no much complicated sql to write.)
Anyway,everybody has his position, there is no good design for every context.
Thanks for the ibatis develop team for this excellent library.
I like it and hope it increse the usability as soon as possible.
I am always waiting for it.
Wang Lei,
I can appreciate what you are doing. But, I don't understand why you
are spending time integrating persistence layers into your solution. I
think what you are trying to accomplish needs to be done on a much
more core level to all the java persistence tools. As each persistence
tool increases it's usability and addresses the deficiencies that you
are identifying it will cause your wrapper solution to be a) a
constant maintenance for you b) eventually outdated c) an additional
layer that is not needed.
I also find it odd that you are attempting to be cross-persistence
compatible. Which truly is humorous in some sense because the whole
idea of jdbc and persistence solutions was to make an application
cross database compatible. So, now the world needs to write specific
implementations for the persistence layer? That means we have come
full circle with an extra burden.
The iBatis team is working to make our API more usable when it comes
to simple CRUD. We know that coding simple SQL can be redundant and
annoying. However, we also beleive in the power of SQL. The idea of
SQLMaps will be central to anything we do in the future because we are
"value and SQL" based and not "object id and table" based.
In the end I would recommend that you pick a persistence tool and work
with it for "what it is" and not "what you want it to be". I think
your ideas are good. I also appreciate your opinion on what is lacking
in usability. I just think these issues need to be handled at a lower
level than your "code generation/rules" tool. Utlimately we'd like to
be able to code as much in java as we can and reduce the amount of
xml. However, these issues are being addressed.
Thanks for sharing on your endeavors,
Brandon
On 2/13/06, wang lei <[EMAIL PROTECTED]>wrote:
> I had used ibator, and my plugin referenced it a lot.
> But I still choose to "rewheel",why!
>
> it don't support relation, for small projects,managing the relation is
> boring.
> as i said in "dynamic Sql and two-level parameter" , a good dao for small
> projects is more convenient.
> The plugin i develops includes many ORM(ojb,Hibernate),so i want ib atis to
> be included too.
> I always think "Rule" over "Configuration"(中文:约定俗成好于 配置)。So i want put more
> rules on the generated xml and code ,so the coders can use DAO as simple as
> can.
>
>
>
>
>
>
>
>
> 我知道有一个支持iBatis插件,叫做ibator,我们使用过,感觉可以。可以参考。同时服务器选择国
> 内话,稳定的可能也不好寻找吧。
>
>
> 祝你成功!
>
> ken.
>
>
> 在06-2-13,wang lei < [EMAIL PROTECTED]> 写道:
> >
> >
> > I am developing a opensource eclipse plugin for support ORM.
> > The main just include:
> >
> >
> > Database modeler: visualization entity and generate ddl. (Under Beta)
> > OJB,generate Ojb configuration xml and java code. (Under Test)
> > Hibernate,generate Hibernate configuration xml and java code. (Under Test)
> > IBatis,,g enerate IBatis configuration xml and java code. (Under Test)
> > Web CRUD:including Wicket(I like it).Struts,Tapestry. (Under Develop)
> > The attachment is the xml files g enerated by this plugin.
> > I need more suggestions before i beign to release milestone version.
> >
> > Addtionally:
> > At first i want to located in sourceforge.But i am lived in china.
> > The speed is not good enough.
> > So i still try to find one location.
> > Any suggestions are welcome.
> > ________________________________
> 雅虎1G免费邮箱百分百防垃圾信
> > 雅虎助手-搜索、杀毒、防骚扰
> >
> >
>
>
>
> --
> RenZenggang
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> MSN:[EMAIL PROTECTED]
>
>
>
雅虎1G免费邮箱百分百防垃圾信
雅虎助手-搜索、杀毒、防骚扰
