Return-Path: Delivered-To: apmail-incubator-click-dev-archive@minotaur.apache.org Received: (qmail 47919 invoked from network); 14 Sep 2009 11:17:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 Sep 2009 11:17:22 -0000 Received: (qmail 19831 invoked by uid 500); 14 Sep 2009 11:17:22 -0000 Delivered-To: apmail-incubator-click-dev-archive@incubator.apache.org Received: (qmail 19790 invoked by uid 500); 14 Sep 2009 11:17:22 -0000 Mailing-List: contact click-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: click-dev@incubator.apache.org Delivered-To: mailing list click-dev@incubator.apache.org Received: (qmail 19782 invoked by uid 99); 14 Sep 2009 11:17:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Sep 2009 11:17:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Sep 2009 11:17:19 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 7FFAE234C045 for ; Mon, 14 Sep 2009 04:16:57 -0700 (PDT) Message-ID: <1274062576.1252927017508.JavaMail.jira@brutus> Date: Mon, 14 Sep 2009 04:16:57 -0700 (PDT) From: "Adrian A. (JIRA)" To: click-dev@incubator.apache.org Subject: [jira] Assigned: (CLK-565) Provide Control builder / factory class In-Reply-To: <1625074537.1246576308758.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CLK-565?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adrian A. reassigned CLK-565: ----------------------------- Assignee: Adrian A. > Provide Control builder / factory class > --------------------------------------- > > Key: CLK-565 > URL: https://issues.apache.org/jira/browse/CLK-565 > Project: Click > Issue Type: New Feature > Components: extras > Affects Versions: 2.1.0 > Reporter: Malcolm Edgar > Assignee: Adrian A. > Attachments: ControlFactory.java, TableBuilder.java > > > Using a factory or builder pattern to create controls is a great way to reduce the number of lines of code in an application and can also help standardize your application. > There are 2 common pattners for doing this, one is the factory pattern, for example: > Table sizesTable = new Table("sizes"); > ControlFactory.addColumn(table, "label", "Metric"); > ControlFactory.addColumn(table, "value"); > The other is the builder pattern, for example: > Table sizesTable = TableBuilder.simpleBuilder("sizes").addColumn("label", "Metric").addColumn("value").build(); > Both of these styles have pros and cons. Please see attached examples. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.