Details

    • Type: New Feature New Feature
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 8.0-RC1
    • Fix Version/s: None
    • Component/s: app-schema plugin
    • Labels:
      None

      Description

      [Pushed upstream from internal CSIRO Jira issue created 15/Mar/11. See: https://jira.csiro.au/browse/SISS-1019 (requires login)]

      app-schema needs a builder like SimpleFeatureBuilder to aid the programmatic construction of complex features. This might be rather useful to someone working on a complex parser (hint, hint).

      -------- Original Message --------
      Subject: FeatureBuilder?
      Date: Sat, 12 Mar 2011 21:36:00 +0800
      From: Jody Garnett
      To: Caradoc-Davies, Ben (CESRE, Kensington)

      Morning Ben:

      I am going through the docs again this weekend; and wondering if your team got around to making a FeatureBuilder? I know we have a SimpleFeatureBuilder in place; but a helper class for app schema content would not be a bad idea?


      Jody Garnett

      -------- Original Message --------
      Subject: Re: FeatureBuilder?
      Date: Mon, 14 Mar 2011 10:01:00 +0800
      From: Ben Caradoc-Davies
      To: Jody Garnett

      Sorry, no. It is hard to address issues such as polymorphism and feature
      type nesting (feature chaining) in a feature builder. It would be great
      if we had one, but I recall that there are some rather large hurdles.

      Kind regards,
      Ben.

      -------- Original Message --------
      Subject: Re: FeatureBuilder?
      Date: Mon, 14 Mar 2011 10:12:49 +0800
      From: Jody Garnett
      To: Caradoc-Davies, Ben (CESRE, Kensington)

      I don't really get that Ben.

      If it is hard to address in a builder - how much harder is it to address
      with direct use of a factory (with no builder around to help?)

      For a FeatureBuildeR:

      • polymorphism: this is a association that can have a choice of valid
        (complex?) attributes? For a Feature builder the user is just going to
        supply a value, nobody is saying they have to supply the correct one.
      • feature type nesting: for a feature they are going to choose a single
        feature type to fill in, the fact that feature type is defined in
        relation to its super types is neither here nor there (and we have some
        utility functions to produce a list of everything at the end of the day
        which should help)

      For a FeatureTypeBuilder:

      • polymorphism: This should be easier to help out; when defining the
        association you can supply one or more complex types that are valid
        targets? (I assume that each complex type referenced would be created
        independently before hand).
      • feature type nesting: Same deal as above, create the super feature
        type before hand and you can just refer to it when defining your sub type.

      Although it does give me a good idea, an alternative to "build" which
      would both build the current type, and fill in the current type as
      "super" to allow definition of nested types quickly.

      build.setName("Foo");
      build.add("field", String.class );
      build.super();
      build.setName("Bar");
      build.add("field2", String.class );

      How are you writing test cases for app schema? Do you build the features
      and types by hand using the factories?


      Jody Garnett

      -------- Original Message --------
      Subject: factory / builder fun
      Date: Mon, 14 Mar 2011 11:13:05 +0800
      From: Jody Garnett
      To: Caradoc-Davies, Ben (CESRE, Kensington)

      Hi Ben

      Reading my email and was worried it came across as harsh Since I
      plan to use the feature model I would like it to work; if you did have
      any interest into what made it difficult it would be a good thing to learn.

      I was really hoping your team would pick up that ball and throw the
      feature model around and clean it up and make it easy to use. I
      understand that appschema has been really tough. I have appreciated the
      hard work Niels has put in recently.

      On a related note we still have an issue with FeatureCollection to sort
      out (with respect to publishing the descriptor of the members rather
      than simply their type).


      Jody Garnett

        Activity

        Hide
        Ben Caradoc-Davies added a comment -
        The original jira issue also has this comment from 15/Mar/11:

        app-schema unit tests load external mapping files. We have not attempted a programmatic interface. (apache digester triggers property setting on a DTO, which is used to configure a DataAccess.) This was the pattern in use when I started on community-schemas and it has not been refactored. I favour test-driven development, which encourages a programmatic use-case driven API. The current design is quite monolithic; this could be improved.
        Show
        Ben Caradoc-Davies added a comment - The original jira issue also has this comment from 15/Mar/11: app-schema unit tests load external mapping files. We have not attempted a programmatic interface. (apache digester triggers property setting on a DTO, which is used to configure a DataAccess.) This was the pattern in use when I started on community-schemas and it has not been refactored. I favour test-driven development, which encourages a programmatic use-case driven API. The current design is quite monolithic; this could be improved.

          People

          • Assignee:
            Adam Brown
            Reporter:
            Ben Caradoc-Davies
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: