Discussions

News: Cernunnos 1.1.0 Released: Better Integration with Maven & Spring

  1. The Cernunnos Project Team announces the availability of Cernunnos version 1.1.0. Cernunnos is an open source Java technology that helps Java professionals be more effective in their work. Cernunnos is available from GoogleCode at cernunnos.googlecode.com. Version 1.1.0 of Cernunnos provides many new features, bug fixes, and enhancements since the 1.0.0 release in September 2008. In total, 37 documented issues were resolved: 31 enhancements and 6 defects. Team members added 4 new components to Cernunnos, and 37 existing components received enhancements of one kind or another. Highlights include: - New ResourceHelper API for enhanced, uniform resource resolution among components - New PojoTask for simpler Dependency Injection and better integration with Spring - New Maven archetype for creating a webapp project that uses Cernunnos - Support for automated definition of Servlets & Portlets - Support for running Cernunnos operations from the ${CRN_HOME}/bin directory - Significant enhancements to exception feedback & troubleshooting - Significant enhancements to the manual, including more and better examples, covereage of previously undocumented components and features - Improvements to Maven build & dependency configuration
  2. What is It?[ Go to top ]

    This post gives absolutely no information on what this framework actually does or why anyone should be interested in it. More information please!
  3. Re: What is It?[ Go to top ]

    Ok, my bad... I hope this bit helps... Cernunnos offers significant benefits in developer productivity, time to market, and level of quality in software solutions. Here's how it works: - You don't have to tell components, subsystems, or objects how to work together - You just have to tell them to do so - This simple difference reduces busywork and bulk dramatically Cernunnos shifts responsibility for collaboration to components themselves. Components share a common interface, so they come to the table ready to interact and do not require "carnal knowledge" of one another. And there's nothing special or unusual about the components; they're things you use every day, like Spring, Apache Commons libraries, Groovy, dom4j, etc.
  4. Concrete example with code: http://code.google.com/p/cernunnos/wiki/LEGO_Typing So you replace Java code with XML - well, that has its own issues. You could also use Ant tasks, Jelly script, etc. And the "dream" of "You only have to tell Cernunnos components what you want them to do, not how to do it" is not really realistic. In order to achieve that you have to abstract yourself away from "real world" way too far. Maybe it is useful in some situations, but overkill in most situations. As always, better approach for the usual case is to re-use your code in components/services and just code the whole thing in Java (and add some frameworks for increased productivity).
  5. So you replace Java code with XML - well, that has its own issues.
    Cernunnos doesn't really replace any Java code; if anything, there's typically more Java byte code in a solution that uses Cernunnos as compared with one that doesn't. But it does separate what you're doing from how you're doing it, and so the Java that implements the how part can be the same for all your solutions. Which leaves you to provide only the what part in your next solution. Cernunnos typically uses XML to express this intent, but that's just an accident of history. We chose XML because there are top-notch technologies for parsing, manipulating, querying, and transforming it. At some point I expect to provide a Grammar implementation -- the Java type that interprets your intent -- that understands JSON; also a Groovy Builder pattern would work nicely here.
    You could also use Ant tasks, Jelly script, etc.
    Ant (a magnificently successful Java project) is "a Java-based build tool. In theory, it is kind of like Make, but without Make's wrinkles." Can you use Ant to implement a Servlet or a Portlet? Would you really want to? I did once try to develop for Ant (almost 3 years ago... just before deciding to tinker with the ideas that grew into Cernunnos). I found that Ant tasks are aggressively isolated from each other by the Ant runtime and, consequently, have a hard time sharing resources and cooperating. Cernunnos is all about ubiquitous, open-ended cooperation among components. I also had difficulty prying Ant away from the local file system. Jelly is "a tool for turning XML into executable code. So Jelly is a Java and XML based scripting and processing engine." Admittedly, the differences between Cernunnos and Jelly are more nuanced, but I still think they're important. First (as stated above) XML is a vehicle for Cernunnos, not a destination. You don't have to communicate your intent to Cernunnos in XML. Second, Jelly's uses Expressions for tiny snippets of "glue code" and Jelly uses JEXL as its expression engine. Now JEXL is nice (Cernunnos supports it too), but it's pretty limited. Cernunnos also supports Groovy and JavaScript (rhino) out of the box, and with a bit of configuration it supports any syntax with a JSR-223 Engine implementation. But what really sets it apart in this area the Phrase architecture: instead of Expressions, Cernunnos supports Phrases, which are open-ended Java objects (in other words, anything you need).
    And the "dream" of "You only have to tell Cernunnos components what you want them to do, not how to do it" is not really realistic. In order to achieve that you have to abstract yourself away from "real world" way too far.
    Cernunnos components are designed for the majority (90% or so) of cases. If you find yourself in a situation where the component doesn't work, just don't use it. You can simply sprinkle arbitrary Groovy or JavaScript (etc.) into the Cernunnos file, or you can invoke any Java objects you like.
    Maybe it is useful in some situations, but overkill in most situations.
    Sometimes it's simpler (and therefore more appropriate) not to bring Cernunnos to bear on a problem. There has to be a certain threshold of expected effort that can be offset by useful stuff that Cernunnos already does, like XML processing, RDBMS interaction, file manipulation, CVS integration, etc. My personal threshold is somewhere between 1/2 a day and a wwhole day of work.