Discussions

Let me to introduce a new open source ORM framework for Java called Ujorm. I have created the ORM solution especially for a rapid development of persistent layer, however the first performance tests show that some types of SELECT query are very fast in comparison to its competitors. Next features are: the type safe parameters in the query, small memory footprint and the minimum size of the entire solution.
After the publication of UJO architecture it became clear that it would be difficult to gain the favor of developers, without more services. Therefore I started to form a new ORM solution that would evaluate its interesting features and I believe now this result has much to offer.
I hope that you will not be angry if I compare my solution with the popular Hibernate. The motivation presentation is here:
http://ujoframework.org/presentation/
The test results are listed in the presentation as well as a description of the test environment. See a description of test actions:

single select - a one big select for all order items (with a condition)

empty selects - 2000 selects with the empty result - where a condition contains different parameter values

multi select - many different selects to emulate a server application or statements with no optimization

Although I have no experience comparing different OR solutions on exactly the same database, I would expect that the database is the major factor in the performance.
Can you elaborate why Ujorm is faster than Hibernate/EclipseLink for example?
Peter Veentjer
Multiverse Software Transactional Memory.
PS:
I would remove the Google adds from the site. It reduces the professional appearance of the product imho.

I do not understand where you see the problem? Framework reads and writes data without a reflection. Verify it in the source code.

I think the point was that avoiding reflection is a questionable goal. A lot of work has been put into making reflection very fast in the JVM. From what I understand, the overhead of reflection is pretty small in even 1.4.

This may be a little off topic, but what is it with you developers lately? Is misusing articles the new 'hip' style of wRiTInG?
What about just: "The framework reads and writes data without reflection" ?

One of the reasons why Sun and the JSR/JCP process created JPA was to remove company-specific implementations and create a single standard that supported company-specific extensions. This allows companies to design to a single API (at least in theory, although in practice, you end up using specific extensions anyways, but JPA 2.0 hopefully will fix some of that). Not only does this make switching APIs easier, it also makes development easier when changing from one product to another that uses a different implementation.
As much as a improving performance is always a key point, unless it adheres to JPA, I don't think adoption will be strong. If you can adhere to the JPA spec and still gain performance, then I think the product definately has its value. Plus, existing products can more easily switch to take advantage of your product.

Being a standard (or a proposed one) is not per-se sufficient to justify its adoption. JDO/2 was also a candidate (a far better one, in my opinion) to be the standard ORM technology. It did not win the match vs. Hibernate and JPA is a shallow, lame, broken copy of Hibernate.

Standards have often been surpassed by independent research: dependency injection (PicoContainer, Spring, etc.) are a very good proof of this statement. JEE5 had to catch up with them, not the other way around.

JPA is bound to POJOs. The approach this framework attempts is instead to support other technologies. Dynamic SDOs are a nice example of where this framework could fit: SDO DMS, for example.

I like Ujorm. No XML, no bytecode generation at runtime, it's easy to understand and debug...
How would you do self-joins? I mean an join from a table to itself.
The Criterion API is good. In my own small ORM tool (JaQu, http://h2database.com/html/jaqu.html) I plan to implement 'decompile the condition'. Example:
final Person p = new Person();
db.from(p).where(new Filter() { public boolean where() {
return p.id == x && p.name.equals(y)); }}).selectCount();
(Unlike in regular Java, you could also use p.name == y). The 'decompile' approach is specially nice for Scala. Not so much for Java that doesn't support closures. JaQu already supports this syntax:
Customer c = new Customer();
List waCustomers = db.from(c).where(c.region).is("WA").select();

I cannot understand why a query should not be written in the Standard Query Language, but written in that manner!
IMHO it should be more readable and concise:
SELECT COUNT(*) FROM PERSON P WHERE P.ID =:X AND P.NAME = :Y
Than:
final Person p = new Person();
db.from(p).where(new Filter() { public boolean where() {
return p.id == x && p.name.equals(y)); }}).selectCount();
or not?
Hibernate support the getQuery() and getSQLQuery() functions, and it is very useful for people that likes the good old SQL.
Bye
Michele

Good question. It should be written in SQL (Structured Query Language). The problems are:
- auto-complete in the IDE
- type checking performed by the compiler
- protects against SQL injection
So the question is how to integrate the SQL DSL into the host language (Java for example). JaQu tries to do that, it is not perfect (only 80% LINQ). With Scala you could probably get 95% LINQ.

All database DML statements can be seen as temporary until they are committed. Ujorm supports commitment with the Ujorm Session.commit() . Method Session.rollback() is used to remove operations performed since the previous commit or rollback. Use this method when an exception occurs or when the program detects some error condition or error in the data.
For a parallel transaction use a next session.
See a JDBC 2.0 documentation for more information.

TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations technology projects - with its network of technology-specific websites, events and online magazines.