back to article The database abstraction framework strikes back

In my last article, I looked at one of the differences between the C++ and Java communities; the availability of application development frameworks that have a profound effect on programmer productivity. I mentioned specifically the Java example of Hibernate and tried to identify reasons why the Java community is more innovative …

COMMENTS

This topic is closed for new posts.
  1. kartoffelsack

    You'll need refection

    Your replacing the reflection that hibernate uses to map classes to the database (with help of mapping file) with a code generator that generates the classes out of a mapping file.

    This may have advantages over the hibernate solution because mapping an file are consistant but it also has a major drawback:

    you cannot just write your classes and - at any point when your programmlogic is at some state - go over and start thinking about persistence. You would have to write a mapping that generates the classes you have written before - nobody will like this work.

    I'm afraid as long c++ doesn't provide a reasonable reflection system languages such as Java are - in those special problem domains - better because it is possible to write better libraries and frameworks.

    Perhaps a c++ reflection library could solve this problem. There are some (http://seal-reflex.web.cern.ch/seal-reflex/) but this comes to the next c++ drawback: its just more complicated to get a library to run it with the compiler you use(compile and link as debug and release-Versions, as dynamic and static library). But thats another topic ...

  2. Lionel Gotti

    A matter of trends?

    Thanks Daniel for this enlightening essay.

    I believe one can be astonished by Java being more popular than C++ amongst the framework developers because both languages first appear to be quite similar in their main paradigm (object oriented). If you have a look at an elementary piece of code (say a Java class), you'll notice that you could turn it into C++ in 2 sec, the two syntaxes being so close.

    Nonetheless, this naive observation must not hide the distinctions between Java and C++. The 'sexiest' part of Java is to be a cross-platform language (at least on the developer side). The application/framework developer does not have to worry about porting issues. Java virtual machines are done for that purpose. If you combine the native support of threads, this looks pretty much appealing. Now, what I like about C++ merely lies on the technical ground: generic programing with templates for instance. In a project management perspective, I believe it's more difficult to justify the choice of C++ (especially now that JVMs are more and more performant).

    This said, I'm not sure there is a lot of stuff that you could achieve with Java and not with C++. Reflection is cool, but is it mandatory for any projects? Would the project development be cheaper though, if you could use reflection? That's probably one of the questions that drive the language choice. Still, I reckon it is most often a matter of sector, its constraints and also its trends.

    Finally, I think your article will encourage the C++ enthusiasts to prove that useful, widely used frameworks that already exist in Java can just as well be written in C++.

This topic is closed for new posts.