NetBeans 6 delivers great updates to the Matisse GUI builder. Spend a few minutes with Roman Strobl and get an expert briefing on what's new and what has changed. (sponsored)
In this, the third and final installation of Andres' Introduction to Groovy series, you learn about how Groovy handles variable numbers of arguments, named parameters, currying, and more about Groovy operators. Including, some new operators.
Swing Fuse (actually just Fuse), is a framework designed to make it easier to create your own custom desktop components. In this article, Daniel Spiewak shows you how to get started and provides sample source code you can download.
Willam Louth shows how he uses JXInsight Probes to investigate probable performance issues with code bases that he is not familiar with. He also highlights possible pitfalls in creating a benchmark, as well as in the analysis of results.
Re: iBATIS vs Hibernate - What causes one to be choosen over the other?
I use Hibernate, I gave a look at iBatis but I find it does not fit my way of working...
My humble opinion is that if you design your application starting from an object model, the database platform is a moving target, you have a complex object model with lots of different queries to perform, Hibernate is your choice.
On the contrary, if you think relational and the application is a by-product of the database design, then iBatis should be better. Althought I wonder a bit why, in this situation, people don't use directly the Rowsets...
Re: iBATIS vs Hibernate - What causes one to be choosen over the other?
I have using Hibernate and Ibatis for a year now, and I find myself switching twice from Hibernate to iBatis, not because one is better than the other, it's because of what preperations each framework needs.
In hibernate you need to have a proper plan to design your database, the database is controled by the hibernate roles and you spend time try to fullfill these rules, and if you go the other way (database->OO) it's harder.
With Ibatis I find myself getting the Job done faster, I create any POJO any set of tables, and I link them, much flixability in that field, but little extra work, building Queries and managing Maps (but hay, you spend time with hibernate maps too).
Both are good in a way with iBatis you finish the Job faster, which I like, but you won't have the big tools that hibernate provide, nor iBatis will provide the facility to generate the sql for you.
With Hibernate3 it maybe a different story, since allot of what can stop you in H2 and make you think of iBatis is there in H3, still iBatis is growing up.
ibatis:
-Simpler
-faster development time
-flixable
-Much smaller in package size
hibernate:
-generate SQL for you which means you don't spend time on SQL
-provide much more advance cache
-scalable
For now I use iBatis, but keeping my eyes on Hibernate3, by the way, you can always use iBatis to have a fast start, and move to hibernate on late stages if you want, iBatis provide special DAO framework for that.
Learn both, use both, and if you don't have time learn and use iBatis, you won't regret it.
-
JDO has at least two open source projects going.
Last time I looked at JPOX, for example, it was really easy to use and reliable. (Just some quick tests though)
JDO seems to be a little more convenient.
You can start out real quick with your domain model,
let JDO do a default mapping.
(Ok, for performance reasons you better understand the
principle mapping strategies before designing an ultra-fluffy domain model which won't perform)
Once you have something working you can think of optimizing
the database model by tuning the mapping.
This saves you a lot of time because the default mapping is perfectly fine for many domain classes.
Check it out: Once you got used to enhancing your classes,
you'll love JDO.
It is so simple to use; within a matter of minutes (especially, if you already have you database setup) you can have your maps generated and start getting productive with your real app logic.
Re: iBATIS vs Hibernate - What causes one to be choosen over the other?
I would consider iBatis the tool for any programmer comfortable with SQL. It's pretty easy to setup, and once that's done it's very flexible. iBatis seems to let me use the capabilities of my database more effectively instead of trying to hide its existence.
.adam
Re: iBATIS vs Hibernate - What causes one to be choosen over the other?
i prefer hibernate because i hate SQL, easpecially DB dependent SQL. Hibernate gives me more OO feeling. Granted it has HQL, but at least it is less "SQL like". Another reason is relative database independence. it is easier to change db in Hibernate (usually only 3 line config change..), and yes, for test, development and production different databases can be used (this is not a myth). But for cases thet using hibernate really makes sense, if your team is already poisoned with jdbc and SQL for years, it would be difficult to get into hibernate. ibatis might be a better choice, or stick with jdbc..
Re: iBATIS vs Hibernate - What causes one to be choosen over the other?
Thanks to everyone for their feedback. Since I am up against a well established database, I'll most likely use iBATIS.
I have the Hibernate (2.1.7) documentation printed out and maybe will incorporate it into my next new project that's just around the bend. The HQL part does scare me.....I don't like proprietary stuff....so what do you do, use interfaces so you can rip out Hibernate (or iBATIS for that matter)?
Thanks,
Tom Pridham
Technologist & Founder
Coastal Software Solutions Inc.
Tampa, FL USA
Regards,
Tom Pridham
Technologist & Founder
Coastal Software Solutions Inc.
office: 813.600.5053
Pridham@Mindspring.com
Re: iBATIS vs Hibernate - What causes one to be choosen over the other?
I use Spring, in particular the transaction/orm wrappers, in order to reduce even further the amount to code I have to write. As a by product, I get DAO's that I can switch from one tecnology to the other.
As for the HQL being "proprietary", I find this a bit funny since Hibernate it's open source. Anyway, Hibernate has been taken as the base for developing the EJB3 standard, so it may become a standard too (I don't know how profound is the influence of hibernate3 on the EJB3 standard)
All the posts I just read here 'forgot' to mention 'reverse enginering' tools for Hibernate.
In my current project (now 120+ DB tables and 100+ views), we have used the tool MiddleGen to generate the Hibernate mapping and object model from the database structure (including generating mapping objects for accessing data in the DB views). This have been done recursively 150+ times during the one year development period.
In addition, we also generated JSP pages that display lists of data from all tables, plus detail pages to perform CRUD operations on each database table.
The database was the master for all of this, but the JSP's was only generated once, and then manually tuned to fit each page's real demands/constraints.
The only 'downside' is that I had to spend a couple of weeks to initially set up this environment (Hibernate setup, MiddleGen setup, CodeGen setup), which is probably a higher startup time than when using most other tools.
The upside is that on new projects I can now get a complete and fully functional object model representing the data in no time at all (
<1 hour), and also in the same time get a semi-functioning prototype-like set of JSP's that operate on this object model.
Re: iBATIS vs Hibernate - Important additional info!!
also:
Some of the earlier posters said that they chose Hibernate to avoid SQL, or chose iBatis so that they could better take advantage of SQL.
I find both of these statements to be based on lack of knowledge of one or the other product.
- You can only use Hibernate in quite simple (DB-query-wise) applications without using HQL, which effectively is a more database-agnostic SQL.
- I also cannot really see much functionality that is accessible from SQL, and not from HQL - unless you use very specialised vendor-specific SQL. (And of course you can also execute vendor-specific SQL from within Hibernate - you just can't port the application to another database 'at the switch of a button').
The only thing i REALLY missed from my experience with Hibernate, is support for stored procedures. Luckily I had already written utility code to call stored procedures, and map SQL resultsets into better suited data structures before I started using Hibernate, so I just continued to use that code for those means.
Re: iBATIS vs Hibernate - What causes one to be choosen over the other?
At my company, we have used iBatis and EJB-CMP.
On the time where the development was started, two years ago, the development team hasn't knowledge about hibernate; it's nor was known and steady as today.
So, our choice was to use EJB-CMP for CRUD operations for "simplicity" and iBatis for batch processing because of the necessity of persistence with high-performance and complex query.
The system has held well, although CMP cause some problems and some modifications in iBatis had been needed
At the present moment, we are evaluating the Hibernate to substitute EJB-CMP. The main reason is a simplicity of object-relational mapping in Hibernate and because HQL is much more eficient that EJB-QL. With Hibernate to implement inheritance and aggregation is very simple.
In some performance test, we have got an interesting result. Hibernate was
better then iBatis in query processing, but, it was worse then iBatis in persistence and batch-insert, exactly cause it doesn't make batch-insert.
In this case, the use of iBatis guarantees the requirement of high-performance (at this time, our requirements is to processing 3000 itens by minute).
Talking about iBatis, that is my expirience, I can say that is very
simple and eficient. The mechanism of dynamic query is very good and the object materialization is possible through lazy-load.
I think that each case must be evaluated carefully. Advantages and Disadvantages exists in both frameworks.
Hibernate is closest to the Object-Oriented development; iBatis allows to make specific SQL queries for a data base manager system and is closest to the relational data base. Many others advantages or disadvantages can be enumerated.
For everyone that want to developer software using entity-relationship model or that want to support legacy system that was developed in entity-relationship model, where is need to make queries in others system, iBatis is a good framework.
For a full object-oriented development, where do you want to use object-relational mapping to database, Hibernate is a right choice. (I'm comparing just hibernate with iBatis).
Learn both (and others if as possible). It's the best way to correct choice.
Re: iBATIS vs Hibernate - What causes one to be choosen over the other?
I have an application using hibernate that we want to use to seed a new project. My technical people want to use ibatis instead of hibernate because its simpler and we will be using Oracle. The new application must be high-performance.
Re: iBATIS vs Hibernate - What causes one to be choosen over the other?
For myself, I almost always look for the easy way out. Most of the work of any programmer is maintainance. While it's fun to design, the real world is maintainance. I would only say look at your requirements, do your data modeling, do your class modeling, and then see which one fits.
Personally, I like ibatis because it is very simple. A sql map, everything in one place, done.
iBATIS vs Hibernate - What causes one to be choosen over the other?
At 11:31 PM on Dec 30, 2004, Tom Pridham wrote:
Fresh Jobs for Developers Post a job opportunity
Anyone ever done a project with one of those technologies then switched to the other....and what was "the good, the bad, and the ugly"?
17 replies so far (
Post your own)
Re: iBATIS vs Hibernate - What causes one to be choosen over the other?
I use Hibernate, I gave a look at iBatis but I find it does not fit my way of working...My humble opinion is that if you design your application starting from an object model, the database platform is a moving target, you have a complex object model with lots of different queries to perform, Hibernate is your choice.
On the contrary, if you think relational and the application is a by-product of the database design, then iBatis should be better. Althought I wonder a bit why, in this situation, people don't use directly the Rowsets...
Re: iBATIS vs Hibernate - What causes one to be choosen over the other?
I have using Hibernate and Ibatis for a year now, and I find myself switching twice from Hibernate to iBatis, not because one is better than the other, it's because of what preperations each framework needs.In hibernate you need to have a proper plan to design your database, the database is controled by the hibernate roles and you spend time try to fullfill these rules, and if you go the other way (database->OO) it's harder.
With Ibatis I find myself getting the Job done faster, I create any POJO any set of tables, and I link them, much flixability in that field, but little extra work, building Queries and managing Maps (but hay, you spend time with hibernate maps too).
Both are good in a way with iBatis you finish the Job faster, which I like, but you won't have the big tools that hibernate provide, nor iBatis will provide the facility to generate the sql for you.
With Hibernate3 it maybe a different story, since allot of what can stop you in H2 and make you think of iBatis is there in H3, still iBatis is growing up.
ibatis:
-Simpler
-faster development time
-flixable
-Much smaller in package size
hibernate:
-generate SQL for you which means you don't spend time on SQL
-provide much more advance cache
-scalable
For now I use iBatis, but keeping my eyes on Hibernate3, by the way, you can always use iBatis to have a fast start, and move to hibernate on late stages if you want, iBatis provide special DAO framework for that.
Learn both, use both, and if you don't have time learn and use iBatis, you won't regret it.
-
Don't forget JDO
JDO has at least two open source projects going.Last time I looked at JPOX, for example, it was really easy to use and reliable. (Just some quick tests though)
JDO seems to be a little more convenient.
You can start out real quick with your domain model,
let JDO do a default mapping.
(Ok, for performance reasons you better understand the
principle mapping strategies before designing an ultra-fluffy domain model which won't perform)
Once you have something working you can think of optimizing
the database model by tuning the mapping.
This saves you a lot of time because the default mapping is perfectly fine for many domain classes.
Check it out: Once you got used to enhancing your classes,
you'll love JDO.
Remember, there's also Cayenne
If you are looking for an ORM solution, you might also want to consider cayenne [http://www.objectstyle.org/cayenne/]It is so simple to use; within a matter of minutes (especially, if you already have you database setup) you can have your maps generated and start getting productive with your real app logic.
Re: iBATIS vs Hibernate - What causes one to be choosen over the other?
I would consider iBatis the tool for any programmer comfortable with SQL. It's pretty easy to setup, and once that's done it's very flexible. iBatis seems to let me use the capabilities of my database more effectively instead of trying to hide its existence..adam
Re: iBATIS vs Hibernate - What causes one to be choosen over the other?
i prefer hibernate because i hate SQL, easpecially DB dependent SQL. Hibernate gives me more OO feeling. Granted it has HQL, but at least it is less "SQL like". Another reason is relative database independence. it is easier to change db in Hibernate (usually only 3 line config change..), and yes, for test, development and production different databases can be used (this is not a myth). But for cases thet using hibernate really makes sense, if your team is already poisoned with jdbc and SQL for years, it would be difficult to get into hibernate. ibatis might be a better choice, or stick with jdbc..Re: iBATIS vs Hibernate - What causes one to be choosen over the other?
Thanks to everyone for their feedback. Since I am up against a well established database, I'll most likely use iBATIS.I have the Hibernate (2.1.7) documentation printed out and maybe will incorporate it into my next new project that's just around the bend. The HQL part does scare me.....I don't like proprietary stuff....so what do you do, use interfaces so you can rip out Hibernate (or iBATIS for that matter)?
Thanks,
Tom Pridham
Technologist & Founder
Coastal Software Solutions Inc.
Tampa, FL USA
Tom Pridham
Technologist & Founder
Coastal Software Solutions Inc.
office: 813.600.5053
Pridham@Mindspring.com
Re: iBATIS vs Hibernate - What causes one to be choosen over the other?
I use Spring, in particular the transaction/orm wrappers, in order to reduce even further the amount to code I have to write. As a by product, I get DAO's that I can switch from one tecnology to the other.As for the HQL being "proprietary", I find this a bit funny since Hibernate it's open source. Anyway, Hibernate has been taken as the base for developing the EJB3 standard, so it may become a standard too (I don't know how profound is the influence of hibernate3 on the EJB3 standard)
iBATIS vs Hibernate - Important additional info!!
All the posts I just read here 'forgot' to mention 'reverse enginering' tools for Hibernate.In my current project (now 120+ DB tables and 100+ views), we have used the tool MiddleGen to generate the Hibernate mapping and object model from the database structure (including generating mapping objects for accessing data in the DB views). This have been done recursively 150+ times during the one year development period.
In addition, we also generated JSP pages that display lists of data from all tables, plus detail pages to perform CRUD operations on each database table.
The database was the master for all of this, but the JSP's was only generated once, and then manually tuned to fit each page's real demands/constraints.
The only 'downside' is that I had to spend a couple of weeks to initially set up this environment (Hibernate setup, MiddleGen setup, CodeGen setup), which is probably a higher startup time than when using most other tools.
The upside is that on new projects I can now get a complete and fully functional object model representing the data in no time at all ( <1 hour), and also in the same time get a semi-functioning prototype-like set of JSP's that operate on this object model.
Re: iBATIS vs Hibernate - Important additional info!!
also:Some of the earlier posters said that they chose Hibernate to avoid SQL, or chose iBatis so that they could better take advantage of SQL.
I find both of these statements to be based on lack of knowledge of one or the other product.
- You can only use Hibernate in quite simple (DB-query-wise) applications without using HQL, which effectively is a more database-agnostic SQL.
- I also cannot really see much functionality that is accessible from SQL, and not from HQL - unless you use very specialised vendor-specific SQL. (And of course you can also execute vendor-specific SQL from within Hibernate - you just can't port the application to another database 'at the switch of a button').
The only thing i REALLY missed from my experience with Hibernate, is support for stored procedures. Luckily I had already written utility code to call stored procedures, and map SQL resultsets into better suited data structures before I started using Hibernate, so I just continued to use that code for those means.
Re: iBATIS vs Hibernate - What causes one to be choosen over the other?
At my company, we have used iBatis and EJB-CMP.On the time where the development was started, two years ago, the development team hasn't knowledge about hibernate; it's nor was known and steady as today.
So, our choice was to use EJB-CMP for CRUD operations for "simplicity" and iBatis for batch processing because of the necessity of persistence with high-performance and complex query.
The system has held well, although CMP cause some problems and some modifications in iBatis had been needed
At the present moment, we are evaluating the Hibernate to substitute EJB-CMP. The main reason is a simplicity of object-relational mapping in Hibernate and because HQL is much more eficient that EJB-QL. With Hibernate to implement inheritance and aggregation is very simple.
In some performance test, we have got an interesting result. Hibernate was
better then iBatis in query processing, but, it was worse then iBatis in persistence and batch-insert, exactly cause it doesn't make batch-insert.
In this case, the use of iBatis guarantees the requirement of high-performance (at this time, our requirements is to processing 3000 itens by minute).
Talking about iBatis, that is my expirience, I can say that is very
simple and eficient. The mechanism of dynamic query is very good and the object materialization is possible through lazy-load.
I think that each case must be evaluated carefully. Advantages and Disadvantages exists in both frameworks.
Hibernate is closest to the Object-Oriented development; iBatis allows to make specific SQL queries for a data base manager system and is closest to the relational data base. Many others advantages or disadvantages can be enumerated.
For everyone that want to developer software using entity-relationship model or that want to support legacy system that was developed in entity-relationship model, where is need to make queries in others system, iBatis is a good framework.
For a full object-oriented development, where do you want to use object-relational mapping to database, Hibernate is a right choice. (I'm comparing just hibernate with iBatis).
Learn both (and others if as possible). It's the best way to correct choice.
Re: iBATIS vs Hibernate - What causes one to be choosen over the other?
I have an application using hibernate that we want to use to seed a new project. My technical people want to use ibatis instead of hibernate because its simpler and we will be using Oracle. The new application must be high-performance.Any comments will be appreciated.
John Mahan
john.mahan@isg.com
Re: iBATIS vs Hibernate - Important additional info!!
Erik,How do you handle store procedure with Hibernate?
Re: iBATIS vs Hibernate - What causes one to be choosen over the other?
For myself, I almost always look for the easy way out. Most of the work of any programmer is maintainance. While it's fun to design, the real world is maintainance. I would only say look at your requirements, do your data modeling, do your class modeling, and then see which one fits.Personally, I like ibatis because it is very simple. A sql map, everything in one place, done.