Tapestry
  1. Tapestry
  2. TAPESTRY-1810

ServiceBinder.bind() with an interface should check to see if there's an Impl class and bind to that.

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.5
    • Fix Version/s: 5.0.14
    • Component/s: tapestry-ioc
    • Labels:
      None

      Description

      In a module bind() method, if you invoke ServiceBinder.bind() and pass an interface, the code should check to see if there's a class in the same package named "XYZImpl" (for interface XYZ). If so, it should bind that Impl class as the implementation class. Convention over configuration, even in the small details.

      1. jira1810.zip
        4 kB
        Paul Cooley

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        270d 7h 50m 1 Igor Drobiazko 03/Jul/08 00:03
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12568076 ] jira [ 12590027 ]
        Mark Thomas made changes -
        Workflow jira [ 12414439 ] Default workflow, editable Closed status [ 12568076 ]
        Hide
        Josh Canfield added a comment -

        Nice, but I put my Impl classes in an impl subpackage...

        Show
        Josh Canfield added a comment - Nice, but I put my Impl classes in an impl subpackage...
        Igor Drobiazko made changes -
        Fix Version/s 5.0.14 [ 12313214 ]
        Fix Version/s 5.1 [ 12312964 ]
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Igor Drobiazko made changes -
        Assignee Igor Drobiazko [ igor.drobiazko ]
        Howard M. Lewis Ship made changes -
        Fix Version/s 5.1 [ 12312964 ]
        Hide
        Howard M. Lewis Ship added a comment -

        I appreciate the effort of this "patch", but just providing new code is actually less useful in most cases than providing a real patch that can be applied by an IDE. Subversion can generate such a patch file from a modified workspace.

        Show
        Howard M. Lewis Ship added a comment - I appreciate the effort of this "patch", but just providing new code is actually less useful in most cases than providing a real patch that can be applied by an IDE. Subversion can generate such a patch file from a modified workspace.
        Paul Cooley made changes -
        Field Original Value New Value
        Attachment jira1810.zip [ 12368183 ]
        Hide
        Paul Cooley added a comment -

        Created test module and test to prove the ServiceBinderImpl checks to see if the class passed into the ServiceBinder.bind(Class<T>) method is an interface. If so, then the binder checks to see if a class exists in the same package with "Impl" as its suffix.

        Show
        Paul Cooley added a comment - Created test module and test to prove the ServiceBinderImpl checks to see if the class passed into the ServiceBinder.bind(Class<T>) method is an interface. If so, then the binder checks to see if a class exists in the same package with "Impl" as its suffix.
        Howard M. Lewis Ship created issue -

          People

          • Assignee:
            Igor Drobiazko
            Reporter:
            Howard M. Lewis Ship
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development