click-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bob Schellink (JIRA)" <>
Subject [jira] Updated: (CLK-565) Provide Control builder / factory class
Date Tue, 16 Nov 2010 21:38:19 GMT


Bob Schellink updated CLK-565:

    Component/s:     (was: extras)
       Priority: Minor  (was: Major)

I'm placing this under examples.

I don't think adding App specific patterns to Click is the way to go. The same effect can
be achieved as an example without adding more abstraction and surface area to the framework.

> Provide Control builder / factory class
> ---------------------------------------
>                 Key: CLK-565
>                 URL:
>             Project: Click
>          Issue Type: New Feature
>          Components: examples
>    Affects Versions: 2.1.0
>            Reporter: Malcolm Edgar
>            Assignee: Adrian A.
>            Priority: Minor
>             Fix For: 2.4.0
>         Attachments:,
> 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.

View raw message