Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-113

Ordering with pre/post requisites could be simplified, improved

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Abandoned
    • 5.0.15
    • None
    • None
    • None
    • Tapestry 5 alpha code

    Description

      The Ordering logic is based on pre and post requisites, showing up as @After and @Before annotations, and corresponding method parameters.

      I think this is limiting.

      I would like to coalesce @After and @Before into just @Order. The value for @Order is a list of constraint strings.

      A constraint string is a type, a colon, and a list of service ids. The type can be "before", "after" or "within".

      Example: before:Security,Transaction

      Within will allow orderings to be broken up easily into phases. Once a "phase" is defined with before and after constrains, the "within:" constraint will order the element after the phase, but before the phase's post-requisites.

      Example:

      phase2 --> after:phase1, before:phase3

      object1 --> within:phase2
      object2 --> within:phase2 after:object1

      object1 ends up with the effective constraints after:phase1, before:phase3
      object2 ends up with the effective constraints: after:phase1, object1 before:phase3

      This works well with the fact that null objects may be contributed into an ordering as placeholders (but are editted out of the final list).

      From experience, this is very necessary. The Tapestry 4 enhancement process would certainly have benefited from this.

      Finally, Tapestry 5 has reasonable "glob" matching of service ids and the list of constraints should work from that. Currently, the code (imported from HiveMind) only recognizes a single glob, "*".

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            hlship Howard Lewis Ship
            hlship Howard Lewis Ship
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment