Return-Path: Delivered-To: apmail-activemq-camel-dev-archive@locus.apache.org Received: (qmail 11989 invoked from network); 17 Dec 2007 13:01:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Dec 2007 13:01:53 -0000 Received: (qmail 64376 invoked by uid 500); 17 Dec 2007 13:01:43 -0000 Delivered-To: apmail-activemq-camel-dev-archive@activemq.apache.org Received: (qmail 64323 invoked by uid 500); 17 Dec 2007 13:01:43 -0000 Mailing-List: contact camel-dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: camel-dev@activemq.apache.org Delivered-To: mailing list camel-dev@activemq.apache.org Received: (qmail 64314 invoked by uid 99); 17 Dec 2007 13:01:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Dec 2007 05:01:43 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Dec 2007 13:01:39 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 7145D714246 for ; Mon, 17 Dec 2007 05:01:28 -0800 (PST) Message-ID: <26977507.1197896488436.JavaMail.jira@brutus> Date: Mon, 17 Dec 2007 05:01:28 -0800 (PST) From: "Guillaume Nodet (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Assigned: (CAMEL-262) Remove Design Tangles in componts file and impl In-Reply-To: <29360284.1197741266888.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/CAMEL-262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Guillaume Nodet reassigned CAMEL-262: ------------------------------------- Assignee: Guillaume Nodet > Remove Design Tangles in componts file and impl > ----------------------------------------------- > > Key: CAMEL-262 > URL: https://issues.apache.org/activemq/browse/CAMEL-262 > Project: Apache Camel > Issue Type: Improvement > Components: camel-core > Reporter: Christian Schneider > Assignee: Guillaume Nodet > Fix For: 1.3.0 > > Attachments: new-no tangle in impl Main cluster (30).png, new-only one dependency left in components file Main cluster (2).png, patch.txt, tangle in componts file Main cluster (13).png, tangle in impl Main cluster (26).png > > > I have used structure101 on camel and found some design tangles that are quite easy to resolve. > The first is in impl. Defaultcomponent contains a special case to handle ScheduledPollEndpoint. As they reference each other there is a dependency tangle. I have attached a screenshot from struture101 with current and suggested status. > This is the current code: > if (endpoint instanceof ScheduledPollEndpoint) { > ScheduledPollEndpoint scheduledPollEndpoint = (ScheduledPollEndpoint)endpoint; > scheduledPollEndpoint.configureProperties(parameters); > } > My suggestion is to add configureProperties to Endpoint and DefaultEndpoint. So any endpoint offers this useful method. The code is then simpler and the tangle is resolved: > endpoint.configureProperties(parameters); > The second tangle is in components file. The package file and strategy reference each other heavily. I have attached screenshots of the tangle. > This is because The strategies are configured directly in Endpoint (package file). My suggestion is to create a factory inside the package strategy. So there is only on dependency from file to strategy. Another reason is that the FileProcessStrategy interface is in the strategy package. I think this interface belongs to the package file. Using these two changes I managed to reduce the dependencies between strategy and file from 12/17 to 8/1. This makes the code much easier to grasp as you can understand the packages separately. > I have attached a patch and screenshots for both issues. > What do you think? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.