You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Nicolas Filotto (Jira)" <ji...@apache.org> on 2022/11/08 14:53:00 UTC

[jira] [Commented] (CAMEL-18697) camel-core - Propose a DSL for languages

    [ https://issues.apache.org/jira/browse/CAMEL-18697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17630473#comment-17630473 ] 

Nicolas Filotto commented on CAMEL-18697:
-----------------------------------------

The corresponding PR https://github.com/apache/camel/pull/8688

> camel-core - Propose a DSL for languages
> ----------------------------------------
>
>                 Key: CAMEL-18697
>                 URL: https://issues.apache.org/jira/browse/CAMEL-18697
>             Project: Camel
>          Issue Type: Improvement
>          Components: came-core
>            Reporter: Nicolas Filotto
>            Assignee: Nicolas Filotto
>            Priority: Major
>
> For Java DSL then we have a language builder at {{org.apache.camel.builder.ExpressionClause}}
> This class is very verbose as for Java DSL we have overloaded methods to set the various options, but it can get too far like {{tokenize}} with 12 methods.
> Instead, we should propose a builder DSL class that the {{RouteBuilder}} can provide.
> {noformat}
> expression(
>     expression()
>         .tokenize()
>             .token(bla bla)
>             .regex(true)
>         .end()
> ){noformat}
> Then we can still manually add a few methods for common use cases, so you can do {{.tokenize(bla bla, true)}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)