Jaxor 2.2 O/R Mapping Tool Released

Discussions

News: Jaxor 2.2 O/R Mapping Tool Released

  1. Jaxor 2.2 O/R Mapping Tool Released (29 messages)

    The 2.2 version of Jaxor is out and ready for download. In simple usages, Jaxor allows developers to painlessly insert, update, and delete rows from tables. However, these simple beginnings can be expanded through an extensible mapping layer to create a full domain model that transparently maps to database tables.

    Check out Jaxor.

    More info
    ------------------
    The mapping files look very similar to java files with imports, declarations, and methods. Composition or inheritance can be used to merge the generated data classes with business logic.

    Example mapping file -> http://jaxor.sourceforge.net/src/net/sourceforge/jaxor/example/domain/Order.jaxor

    Jaxor features include:
    - Lazy Loading of all table relations
    - Generation of Persistence Logic AND implementation classes
    - SQL Query Caching
    - Support for Unit Of Work for transparent persistence of inserts, updates, and deletes.
    - Ant Integration for Code Generation
    - Mapping Validation tool to ensure mappings and database are synchronized.
    - Pluggable, Dynamic XML Parser

    Threaded Messages (29)

  2. Can anyone using Jaxor compare this with other open-source O/R tools like Hibernate?

    /c
  3. Hibernate's persistence is reflection based, while Jaxor uses pure code generation. This allows Jaxor the advantage to be able to detect modifications at the moment of modification. Reflection based systems rely on pre and post transaction state comparisons.

    Also, since all objects are generated, you never have to worry about keeping the objects and the mappings in synch.
  4. Jaxor 2.2 O/R Mapping Tool Released[ Go to top ]

    "However, these simple beginnings can be expanded through an extensible mapping layer to create a full domain model that transparently maps to database tables."

    don't you mean design model instead of domain model?
  5. Jaxor 2.2 O/R Mapping Tool Released[ Go to top ]

    How jaxor compares with castor?
  6. Jaxor 2.2 O/R Mapping Tool Released[ Go to top ]

    and ofcourse ojb bridge

    (wich seems to be the best of the lot)
  7. Jaxor vs OJB[ Go to top ]

    OJB is another persitence layer similar to hibernate. It's architecture consists of xml mapping files that are used during runtime to persist classes. With Jaxor, you only write the mapping files, the classes are all generated for you.

    Mike
  8. Jaxor vs OJB[ Go to top ]

    I like hibernate better because the xml mappings are much cleaner. In Jaxor the getters/setters have to be defined in the config/xml with lots of CData sections...erghhhhh. Domain classes should be standard java written in an IDE which also help you in code navigation/refactoring. But again, its me. You may like it perfectly suitable to your needs.

    /c
  9. Jaxor vs OJB[ Go to top ]

    Actually, getters and setters are all generated. When you define a mapping to a database column. The getter, setter, and instance variable are all generated. Furthermore, the get/set methods are added to a generated interface. The inlined get/set definitions you are referring to, simply allow a simple way to extend the object with simple methods if needed. You can write this functionality in your favorite IDE, then use the "extends" attribute in Jaxor to extend the object with whatever functionality you wish.

    Here is another example mapping file that shows how simple a mapping can be.

    http://jaxor.sourceforge.net/src/net/sourceforge/jaxor/example/domain/Address.jaxor
  10. Castor vs. Jaxor[ Go to top ]

    Jaxor is a pure O/R mapping tool, so it possesses more features specific to O/R mapping. Castor is more of a multipurpose tool including XML and O/R support. While Castor has more overall features, it lacks many common O/R features.

    Mike Rettig
  11. O/R Domain Model[ Go to top ]

    I was speaking in terms of Fowler's definition of a Domain Model from his upcoming book.

    http://www.martinfowler.com/isa/domainModel.html
  12. Jaxor 2.2 O/R Mapping Tool Released[ Go to top ]

    Here is a list of tools I know. I dont know which ones
    are good, never got time to evaluate.

    Torque http://jakarta.apache.org/turbine/torque/index.html
    ObJectRelationalBridge http://jakarta.apache.org/ojb/
    Castor http://castor.exolab.org/
    FreeFORM http://www.chimu.com/projects/form
    JRelationalFramework http://jrf.sourceforge.net/
    VBSF http://www.objectmatter.com/
    JGrinder http://sourceforge.net/projects/jgrinder
    Hibernate http://hibernate.sourceforge.net/

    Expresso http://www.jcorporate.com/product/expresso.html
    (This used to be OR mapping layer and free, now it has
    evolved to something ocmpletely different and isnt free
    anymore)

    Can anybody compare all these?
  13. Jaxor 2.2 O/R Mapping Tool Released[ Go to top ]

    I've been using hibernate for a couple of weeks now and I can say that it has really been great. It has all the features i like in a software product: Open source, flexible, simple & clean (both the API and the configuration), intuitive and even well-documented.

    I have, however, not used any other java O/R mappers out there (excpet CMP EJB:s which is just plain awful) so I cannot make any comparisons.
  14. O/R tool Comparison[ Go to top ]

    A good place to start if you want to evaluate O/R tools is on the wiki.

    http://www.c2.com/cgi/wiki?CayenneVsOther

    The wiki can be edited by anyone, so if you know a particular product well, you can add to the discussion.
  15. O/R tool Comparison[ Go to top ]

    Entity Engine from www.ofbiz.org is Good one. The mailing list is also very active.
    give it a try...
  16. O/R tool Comparison[ Go to top ]

    I did a comparison of all the "no license fee" options
    listed at http://www.c2.com/cgi/wiki?CayenneVsOther
    and made a spreadsheet with all the features.
    It is very clear that folloing two options have
    emerged as the ones having most features.

    Hibernate - http://hibernate.sourceforge.net
    Jakarta ORB - http://jakarta.apache.org/ojb

    However the page does not give a review of other
    tools I mentioned earlier, namely - Torque, FreeForm,
    JRelationalFramework, VBSF and JGrinder.

    I presume that since they are not as famous, they are
    probably lacking in the features/usability to be
    mainstream.
  17. O/R tool Comparison[ Go to top ]

    It is a great comparison and from the list I think Hibernate has the most functionality and is free.

    I think I really have to try it out.
  18. Jaxor 2.2 O/R Mapping Tool Released[ Go to top ]

    Do you have to go through "code -> ant build -> test" cycle when using jaxor, or it can generate the persistence code for a particular type when an object of that type is being sent to the jaxor persistence layer ?

    thanks
  19. Experience with Castor[ Go to top ]

    I tried Castor about one week ago, and I was not very satisfied with it. To have auto code generation, I had to write an xsd file, and to have java class map to db, I had to write a mapping.xsl file. These two are very much the same. It puzzles me why I could not do the two things in one shot. I was also not satisfied with the poor documentation. For example, I did not find a good description of how I can do OQL. What if I need to sort, group?

    I tried a simple example of porting data from an xml file into a database. Even though finally I did it, the pain in between was just way too much. Castor may be a jewel. Without good documentation, it is nothing.

    I am trying out Hibernate. It seems to be much better than Castor. Good documentation, and easy usage. The only thing it lacks compare to Castor is conversion from XML to java databean, and data validation. None of them are essential for OR mapping.

    Just my two cents.
  20. Experience with Castor[ Go to top ]

    my advice is not to put too high hopes into these tools, unless you have really (!) tried them and found them to be useful for you. Just the fact that a product is listed under the apache/jakarta brand, for example, does not really mean much. I have found OJB to be deficient in many areas - one of them being the fact that it suffers from the so-called 1+n loading problem, in that loading all objects in a collection of n elements results in n+1 SQL statements being executed. This is absolutely unacceptable in most production systems, IMO.
    I found Castor to be unstable and obscurely coded. This was almost 2 years ago, but the version number has not risen significantly since then.
    Buying a good commercial tool may easily end up being less expensive, if you're in a tight project situation.

    my2c
    Christian
  21. Experience with Castor[ Go to top ]

    Used Castor in May, June 2002 - was still unstable (the danger was that a small percentage of the updates of related tables were not done correctly - was hard to find).
  22. Experience with Castor[ Go to top ]

    <quote>
    I have found OJB to be deficient in many areas - one of them being the fact that it suffers from the so-called 1+n loading problem, in that loading all objects in a collection of n elements results in n+1 SQL statements being executed.
    </quote>

    This issue has been solved some months ago. OJB now supports prefetching of 1:n associations.
    This feature does only require 2 SQL statements!

    OJB also supports several other optimization techniques to reduce overhead for loading object nets.

    Thomas Mahler
    (OJB developer)
  23. Experience with Castor[ Go to top ]

    OJB seems to have a solid architecture, but I hate the fact that you have create seperate tables to manage state, etc. PLus, the database creation scripts in all of the distributions that I have downloaded have not been very well organized. I want to be able to download a jar file, pop it into my classpath, and start coding. My 2 cents.
  24. Experience with Castor[ Go to top ]

    You can run OJB without setting up any tables.

    You only have to setup special tables if you want to use certain features like OJB generated Sequencenumbers.

    OJB uses Jakarta Torque scripts to setup the DB. The scripts are organized in a very clear way.
    The structure of the scripts is also well documented.
  25. Experience with Castor[ Go to top ]

    Great! I shall have to take another look at it. I don't think the documentation that I read made that clear (not needing tables). One thing I always like to see on every project is a quickstart for dummies which gives in simple steps the quickest way to configure a sample app in your environment, like a shell example or drop in jar. I went through the examples in the distr and they aren't bad ( it has been some time now ) but for some reason, I had trouble finding an intuitive guide to getting going quickly.
    Thanks!
  26. Experience with Castor[ Go to top ]

    I have a dream. That all you talented and concerned java programmers in the universe collaborate in the true spirit of Objects and produce A SOLUTION. I plead for a website or forum where we clarify the array of java technologies that germinate everyday in fields like: OR Mapping, App Servers, Development Environments, Web App Frameworks, API implementations, Web Services implementation, blah, blah, blah.

    There will be categories like:

    Definition of technology
    Comparison to other technologies
    List of available implementations
    List of features of each implementation
    Readable and Dynamic comparison of each implementation
    Relationships between each implementation
    Combining the implementations

    Let's create a single simple complete point of convergence where everything has one meaning.

    I have a dream.

    Bioye
  27. Experience with Castor[ Go to top ]

    hi... talking about commercial products (although i think this one for free) has anyone used TopLink from Oracle? any comments?
  28. Experience with Castor[ Go to top ]

    TopLink should be a reasonably safe bet, as it is has been around for a long time, and can be regarded as the market leader (anyone object? go ahead). Formerly, it came with a hefty price tag - I'd be amazed if it was for free now..

    Christian
  29. Experience with Castor[ Go to top ]

    Silly me... the fact that u can download it for free doesn't mean it is :-\ I just checked the Oracle Store and TopLink sells for as much as 7k
  30. Jaxor 2.2 O/R Mapping Tool Released[ Go to top ]

    I posted a question to my local java users group about recommendations for opensource o/r tools and someone replied back if i had tried: Prevayler http://www.prevayler.org/index.html

    I was wondering if anyone here has tried Prevayler and what they thought of it. What is the stableness of it?

    Thanks