Slashdot Mirror


Object-Relation Mapping without the Container

Justin Powell writes "If you follow the latest developer buzz then you've likely heard of IOC (Inversion of Control) containers and AOP (aspect-oriented programming). Like many developers, however, you may not see where these technologies fit into your development efforts. Learn where they can fit with a hands-on introduction to using Hibernate and Spring to build a transactional persistence tier for your enterprise applications."

7 of 49 comments (clear)

  1. Yeehoo, more tools....... by MrIrwin · · Score: 3, Interesting

    After all, Java development environments are well known for thier conciseness and simple nature. Let's throw another couple of tools into the works....

    --

    And if you thought that was boring you obviously havn't read my Journal ;-)

    1. Re:Yeehoo, more tools....... by bay43270 · · Score: 4, Interesting

      After all, Java development environments are well known for thier conciseness and simple nature. Let's throw another couple of tools into the works....

      Your comment seems to sum up J2EE fairly well. This is why Spring was created. A container should provide a framework for containing things. period. If you want persistence, add a persistence framework. If you want transactions, add a transaction framework. If you think you need all the extra complexity, feel free to add it.

      J2EE, however is complex by default. Spring tries to get away from that. Whether Spring itself can replace J2EE has yet to be shown, but it's philosophy will (at least in those companies flexible enough to change).

      J2EE was a good first step, I suppose. They combined all the complex middleware software of the early to mid 90's into one giant all-inclusive spec. Anyone with a couple million man hours could implement the spec and join the market. I guess it made sense at the time.

      Now we have a handful of application servers each costing tens of thousands of dollars (not including two very nice open source implementations). Most companies opt to spend $20k on WSAD just for transaction support, or just so they can use the app server's security. They never stop and ask if they need all the power their buying. Spring (and the light weight containers that are sure to follow) will give people an alternative.

    2. Re:Yeehoo, more tools....... by haystor · · Score: 2, Interesting

      I have to explain to Java people what mod_perl does. I usually get blank stares. The general opinion seems to be that Perl is interpreted in the way that Basic was interpreted long ago, line by line. I'm serious, lots of java people think this.

      Java is less programmer friendly that Python, Perl and LISP. It's that simple. Look no further than all the nice things they are putting into 1.5. All things that are in C# apparently that Sun used to say weren't necessary until C# showed up. I promise autoboxing was discussed years ago, why does it only show up now?

      I didn't say Java is all hype, I said it was "all about hype". If you weren't programming it in '96 or so, perhaps you don't remember. Companies were sending secretaries to learn Java since it was going to change the world. They lead with marketing and delivered parts of promises later. That's just unpopular here.

      As for not grokking Java, I've been programming Java and Perl since '96. I'm currently an Architect on a major enterprise level project. I do just fine with it regardless of how I like it.

      As for my comments that it needs things: It does need basic things that I take for granted after working with Perl, Python or LISP. Regexes and flexible data structures come to mind.

      I'm not sure how windows stands, but I've always had a list of things I have to install immediately upon getting a new system. Winzip used to be #1 priority but I believe the finally put zip capability into windows xp. There are other things like grep, pdf viewer, email client and of course emacs that don't come with windows. I realize that's a pretty programmer centric view of things but this is the developers section of slashdot and this thread was discussing why java is unpopular (hence a programmer centric view isn't unreasonable).

      Oh, and as far as programs bending to the programmer's will, I've seen a lot of programs that started as concept in Perl or Python, caught fire and ended up in production *making money* for the company. I can't say I've seen the same phenomenon with java. Java seems mired in endless requirements gather for perfect architecture goals that are always 6 months down the road. Perl, Python and LISP express what is in the Programmer's mind today. I have experience with all of these and success with all of these. Never has Java been the tool of choice for the creative.

      Proove me wrong. (or just call me stupid, childish and whiny again)

      --
      t
  2. aspect-oriented programming by Mr+Very+Angry · · Score: 2, Interesting

    Is AOP (Aspect-Oriented Programming) simply evidence that OO (Object-Orientation) has some fundamental design problems?

  3. A lament to Java. by Roman_(ajvvs) · · Score: 3, Interesting
    I used to promote Java as "the tool" for development, but after 2 1/2 years of not being able to justify the use of my formerly favourite language in a single commercial project, I can only sigh. The biggest stumbling blocks have been the getting effective tools and the limiting the overhead and complexity of any potential implementation. The current Java SDK's are not intuitive. I loop hopefully to 1.5 and Eclipse for evolution in the right direction, but Java right now feels like a colossal waste of my paid time. It's partly because of things like this (line from the article):

    Unlike EJB CMP CMR and like JDO, Hibernate can work inside of or outside of a J2EE container, which is a boon for those of us doing TDD and agile development.

    Acronym hell. Java used to be pretty easy to understand. There was Swing, there was AWT, there was the language and the development environment was concise. Not all of it was good, but I knew where I stood. Right now I know that 4 of those 6 acronyms aren't relevant to my work as a programmer. And none of them relate to Java as a language. People talk about ATL, STL, MFC and whatnot, but C++ the language has endured as a language independent of its modules. Love it or hate it, it's a language that deserves respect for this endurance. Right now I can't say that for Java. Whatever happened to plain Java?

    Maybe I'm just not getting it, but me "getting it" is what's the deciding factor in my choice of tools, since I have to get it to do my work. I get .NET; there's the language (C#,VB,C++,WinForms, all .NET) and there's the tool (Visual Studio, maybe Mono). I know for a fact I can write code using VS that can compile on linux with the minimum of modification. I also know which modules lock me to windows (VB.NET, Winforms) and which ones don't (maybe C# if Mono succeeds, Strict C++ saves the day for portability). I learnt this from documentation, research and testing by my own hand. I've researched Java, kept informed of it, but all I see now is a concoction of marketing hype and a bad case of constant scope creep. Another quote:

    The starting point is an enterprise application for which you are implementing a transactional persistence layer.

    Overkill! I'm sorry, my customers aren't going to spend the money buying our software when they need to install an entirely new infrastructure to support it. The margins aren't that high in my industry. Besides, why do I need yet another framework? What was wrong with the old one? If the old one was so bad it had to be replaced, why promote it in the first place? I don't care about an implementation of the newest development methodology. I care about development cost, infrastructure, what customers will put up with, and what I can support without costing me a fortune in time, effort and understanding.

    This article showed me nothing that gives me any clue to how useful this is really going to be "in the field". I think I'll just go hibernate until Java springs into action...

    --
    click-clack, front and back. I'm not moving this car otherwise.
    1. Re:A lament to Java. by Phouk · · Score: 2, Interesting

      Unlike EJB CMP CMR and like JDO, Hibernate can work inside of or outside of a J2EE container, which is a boon for those of us doing TDD and agile development.

      Acronym hell. Java used to be pretty easy to understand. There was Swing, there was AWT

      I call bullshit, or at least Apples to Oranges! What are you talking about - developing a desktop GUI app? Then there still is Swing, and there is AWT, and not that much has changed.

      Or are you talking about database-backed server applications? For smaller projects, there is JDBC for database connectivity, and there always has been.

      For larger database-driven projects, you need a layer above that to be productive, and that's what the solutions mentioned above are for (has nothing to do with Swing/AWT). If you are not doing that kind of project, feel free to ignore them. But just because you don't need these projects doesn't mean I don't need them (I do).

      --
      Stupidity is mis-underestimated.
  4. Microsoft ObjectSpaces Initiative? by mosel-saar-ruwer · · Score: 2, Interesting
    Does anyone have any experience with Microsoft's new ObjectSpaces persistent object initiative for .NET? Some overview here:
    http://www.internet.com/icom_cgi/print/print.cgi?u rl=http://www.15seconds.com/issue/040112.htm
    The ["scientific"] data we're generating is very large, and much more binary/object-ish than ASCII/SQL/RDBM-ish in nature.

    CA/Fujitsu abandoned their Jasmine OO database product, and it looks like Progress is allowing ObjectStore to wither on the vine.

    Oh, AND WE NEED 64-BIT DATABASES AND 64-BIT PROGRAMMING LANGUAGES LIKE YESTERDAY!!! SQL's 32-bit BLOB just doesn't cut the mustard. Hell, the following won't even compile on Java 1.5:

    public class SixtyFourBit
    {
    public static void main (String args[])
    { long theLong = 1;
    theLong <<= 32;
    theLong += 1;
    System.out.println("theLong = " + theLong);

    double [] theDoubleArray = new double[theLong];

    }
    }
    SixtyFourBit.java:11: possible loss of precision
    found : long
    required: int
    Any advice as to 64-bit object-oriented databases would be MOST appreciated.

    Thanks!