3 Replies Latest reply on Sep 19, 2009 1:21 AM by Claus Ibsen

    java dsl vs. xml

    David Andries Newbie

      What method is preferred for building camel routes?

      Java DSL or xml configuration? And why?

        • 1. Re: java dsl vs. xml
          Claus Ibsen Master

          Its your choice.


          Java DSL have the power of a real programming language under the belt. As opposed to XML.


          XML have nice tooling support by the FUSE Integration Designer.


          Its more a matter of taste. Some people are not used to the fluent builder syntax in Java and thus maybe XML is better for them. Others like the power that the Java DSL gives that XML can never do.


          The Java DSL is more a view into the future with real DSL languages build with the help of Groovy or Scala.


          I think both of them are used like 50/50 or 60/40. Neither one is dominating the other in usage.

          • 2. Re: java dsl vs. xml
            David Andries Newbie

            Thanks for you answer, Claus.

            When building an Fuse ESB environment from scratch, would you advise one to another? Or would you mix the use of both?

            • 3. Re: java dsl vs. xml
              Claus Ibsen Master

              Why not try them out and see what works for you.


              The XML have the powers of the FID tooling and for routes which are not to big it works great.


              For more advanced routes and bigger routes the Java may be a bit better.


              If you use spring anyway then using XML can get you far as you can even build simple routes without any java code at all.


              There are no one that is better than the other to start with.