You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@click.apache.org by "Adrian A. (JIRA)" <ji...@apache.org> on 2010/04/10 18:33:41 UTC
[jira] Updated: (CLK-565) Provide Control builder / factory class
[ https://issues.apache.org/jira/browse/CLK-565?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Adrian A. updated CLK-565:
--------------------------
Fix Version/s: 2.3.0
> 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.
> Fix For: 2.3.0
>
> 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.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira