Apache AWF
  1. Apache AWF
  2. AWF-177

Create an Interface between the API user and deft internal plumbing system

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Labels:
      None

      Description

      here a patch for creating two interface : HttpResponse and HttpRequest (implementation are moved to HttpResponseImpl and HttpRequestImpl).
      We expose to the deft user only those interfaces (with the javadoc as API documentation) and hide all the parsing/accumulation process.

      The idea is :

      • hide the complexity to the user, provide clear API with it's doc
      • prevent user to call unwanted methods
      • being able to change the inner implementatio without affecting user code
      1. api.patch
        177 kB
        Julien Vermillard
      2. HttpResponseImpl.java
        11 kB
        Julien Vermillard
      3. HttpRequestImpl.java
        12 kB
        Julien Vermillard
      4. HttpRequestImpl.java
        12 kB
        Julien Vermillard

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        1h 17m 1 Johnathan Meehan 02/Aug/11 22:26
        In Progress In Progress Resolved Resolved
        20h 52m 1 Johnathan Meehan 03/Aug/11 19:19
        Tony Stevenson made changes -
        Project Deft [ 12311521 ] Apache AWF [ 12313220 ]
        Key DEFT-178 AWF-177
        Component/s Core [ 12315223 ]
        Component/s Tests [ 12315225 ]
        Fix Version/s 0.4.0 [ 12317348 ]
        Hide
        Julien Vermillard added a comment -

        looks fine for me, yep there is something to do about package organization

        If you look for an eclipse fomater, here the MINA one (java convention with space in place of tabs) :
        http://mina.apache.org/developer-guide.data/ImprovedJavaConventions.xml

        Show
        Julien Vermillard added a comment - looks fine for me, yep there is something to do about package organization If you look for an eclipse fomater, here the MINA one (java convention with space in place of tabs) : http://mina.apache.org/developer-guide.data/ImprovedJavaConventions.xml
        Johnathan Meehan made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Johnathan Meehan added a comment -

        +1 for the extraction (the package is starting to look a little random now to me; might get to that).

        Show
        Johnathan Meehan added a comment - +1 for the extraction (the package is starting to look a little random now to me; might get to that).
        Hide
        Johnathan Meehan added a comment -

        I ran through it all and applied the changes with only minor changes. You're going to hate me, Julien, but I had to run my own formatter to see what was what... we should have a standard formatter available soon (or so I keep saying). I'm pretty sure it's all there, though. Let me know if I missed something

        Committed: http://svn.apache.org/viewvc?rev=1153593&view=rev

        Ready for review.

        Show
        Johnathan Meehan added a comment - I ran through it all and applied the changes with only minor changes. You're going to hate me, Julien, but I had to run my own formatter to see what was what... we should have a standard formatter available soon (or so I keep saying). I'm pretty sure it's all there, though. Let me know if I missed something Committed: http://svn.apache.org/viewvc?rev=1153593&view=rev Ready for review.
        Johnathan Meehan made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Johnathan Meehan made changes -
        Assignee Johnathan Meehan [ jmeehan ]
        Fix Version/s 0.4.0 [ 12317348 ]
        Hide
        Julien Vermillard added a comment -

        Hi,
        Sorry for the formatting I fogot my eclipse is configured on autoformat on save

        Yes it's exactly what you described plus some javadocing on the interfaces (API doco).

        Show
        Julien Vermillard added a comment - Hi, Sorry for the formatting I fogot my eclipse is configured on autoformat on save Yes it's exactly what you described plus some javadocing on the interfaces (API doco).
        Julien Vermillard made changes -
        Attachment HttpRequestImpl.java [ 12489119 ]
        Hide
        Johnathan Meehan added a comment -

        Hi, Julien!
        The formatting differences make it a little confusing, but from a quick glance this is a straight Extract Interface refactoring with references to the new implementation added as needed right? Sounds like a good idea.
        If nobody else gets to it first, I will take a proper look at this for you tomorrow. In the meantime could you please upload "HttpRequestImpl.java" again, and check the "Grant Rights" box?

        Show
        Johnathan Meehan added a comment - Hi, Julien! The formatting differences make it a little confusing, but from a quick glance this is a straight Extract Interface refactoring with references to the new implementation added as needed right? Sounds like a good idea. If nobody else gets to it first, I will take a proper look at this for you tomorrow. In the meantime could you please upload "HttpRequestImpl.java" again, and check the "Grant Rights" box?
        Julien Vermillard made changes -
        Attachment HttpRequestImpl.java [ 12489116 ]
        Julien Vermillard made changes -
        Attachment HttpResponseImpl.java [ 12489115 ]
        Julien Vermillard made changes -
        Field Original Value New Value
        Attachment api.patch [ 12489112 ]
        Julien Vermillard created issue -

          People

          • Assignee:
            Johnathan Meehan
            Reporter:
            Julien Vermillard
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development