camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: [DISCUSS] - Camel Maven Archetype for Standalone Java
Date Fri, 27 Jan 2012 07:01:45 GMT
On Wed, Jan 25, 2012 at 4:14 PM, Christian Schneider
<chris@die-schneider.net> wrote:
> Am 25.01.2012 14:58, schrieb Claus Ibsen:
>
>>
>> It is *not* trivial for people getting started with Camel to figure
>> out how to use a Spring XML file for the regular Spring stuff.
>> And then how to add Camel in there, and use the Java DSL.
>>
>> As you need to add<package>com.foo</package>  or use a
>> <routeBuilderRef>  etc. to link the Spring XML file to the Java
>> RouteBuilder.
>>
>> There are two kind of people getting started with Camel.
>>
>> 1) People who would avoid Java code and do as much in XML
>> 2) People wo are more savy coders and want to use Java code, but
>> Spring XML for their bean configuration.
>>
>> If you have a single archetype for 1+2 then it *confuses people*.
>>
>
> What I meant is that it is easy to add a camel route to a spring config when
> the camel context is already defined as a bean.
> So if people have an archetype that uses a camel context in spring and a
> Java route builder then adding an xml route
> is easy and removing the a java route builder is also easy. We could even
> define a route in java and another in xml to show both cases
> in the same archetype.
>

IMHO this will confuse people. Best practice is that people either do
routes in Java only, or XML only.
Not really a mix of both worlds.

The archetype is a great way for people getting started with Camel,
and for end users, to quickly create a new Camel project.

All they need to remember is to type
  mvn archetype:generate
and then follow the instructions.

The problem with an archetype that does both, is like some of our
examples, they have too much in the same example.
Then people do not know how to differentiate what is what. And why the
pom.xml file has so many dependencies, or different moving parts etc.

People will also be "afraid" what to remove? And how to do that. As
you would need to modify both XML and java source code to remove it
completely etc.



> In my experience it is much easier for people to delete unneeded parts than
> adding new parts. So that could work.
>

Only for experienced developers. For people getting started, they do
not know what to do and what to remove etc.



>
> Christian
>
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Open Source Architect
> Talend Application Integration Division http://www.talend.com
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message