8 Replies Latest reply: Mar 4, 2010 8:05 PM by 843853 RSS

    Adapter Design.. BEst practices

    843853
      HI

      I work on some adapters, which are part of the soa architecture in our company.
      I want to know are there some basic rules while developing the adapter, or that can be called as best practices for developing the adapter, for eg.:
      Adapter should have a service interface, adapter should have some configurable properties, adapter should have a database, and so on.

      Please, suggest what can be the best practice of developing adapter, esp. when they part of the soa suite, which means they themselves are not a application, or big application. they are just for integrating two big applications, or for facilitating interaction between two big applications.

      Also, I want to know, If am developing a message hub, can that be also a adapter.
        • 1. Re: Adapter Design.. BEst practices
          jschellSomeoneStoleMyAlias
          shekup wrote:
          I work on some adapters, which are part of the soa architecture in our company.
          I want to know are there some basic rules while developing the adapter, or that can be called as best practices for developing the adapter, for eg.:
          Adapter should have a service interface, adapter should have some configurable properties, adapter should have a database, and so on.
          Those are not "best practices". They are requirements.
          Please, suggest what can be the best practice of developing adapter, esp.
          You develop requirements for generalized components by collecting as many specific cases as you can, comparing them, and then differentiating on behavior that is the same and that which is different.
          when they part of the soa suite, which means they themselves are not a application, or big application. they are just for integrating two big applications, or for facilitating interaction between two big applications.
          Not sure that any of that applies to SOA. You use SOA because it is applicable and not simply because it exists.
          • 2. Re: Adapter Design.. BEst practices
            843853
            I am not so experienced so I use SOA, because it exists.
            And I always work on requirements, and I face requirement of developing adapters.
            and since after developing few adapters, I thought of some design, which can be similar to connector design.

            Edited by: shekup on Jan 23, 2010 8:55 PM

            Edited by: shekup on Jan 23, 2010 8:56 PM
            • 3. Re: Adapter Design.. BEst practices
              jschellSomeoneStoleMyAlias
              shekup wrote:
              I am not so experienced so I use SOA, because it exists.
              And I always work on requirements, and I face requirement of developing adapters.
              and since after developing few adapters, I thought of some design, which can be similar to connector design.
              Sure, so the first step is to look at what those adaptors do, think about the process steps involved in each, and try to gather enough information about future needs of the business to get an idea what other adaptors might be needed.

              Altogether that will give you enough information to define what an adaptor should do and into what sort of framework it should be plugged.
              • 4. Re: Adapter Design.. BEst practices
                800389
                For technical implementation level, you can explore in this.

                http://books.google.com/books?q=java+connectivity+architecture+best+practices&source=in&ei=uxBgS_WLKJS-NpiCuewL&sa=X&oi=book_group&ct=title&cad=bottom-3results&resnum=11&ved=0CC0QsAMwCg
                • 5. Re: Adapter Design.. BEst practices
                  843853
                  shekup wrote:

                  And I always work on requirements, and I face requirement of developing adapters.


                  Edited by: shekup on Jan 23, 2010 8:55 PM

                  Edited by: shekup on Jan 23, 2010 8:56 PM
                  Could you spell some of the requirements mandating the need for adapters? And that when would you use an adapter?
                  • 6. Re: Adapter Design.. BEst practices
                    843853
                    Adapter pattern is quite simple so I'm not sure the best practice of itself. Instead, I think the question should be when should we use Adapter or what is the best situation for Adapter pattern?

                    I like adapter in the following case: You have a bunch of old code which you don't want to touch (no matter refactor or enhance), now you need to design a new thing for some requirement. After you review the code, you find the old code could be reused but you don't want to make new design depends on it closely. In this situation, you could design new interface for your new function, but add an implementation which just reuse old code. Hence, you adapt old code into your new design without changing old code and closely couple them, although the adapter itself, the implementation, does have coupled with old code.

                    I don't know if we're talking about same thing butI don't see you give any clue that why you're using Adapter.
                    • 7. Re: Adapter Design.. BEst practices
                      jschellSomeoneStoleMyAlias
                      qqsu_azure wrote:
                      Adapter pattern is quite simple so I'm not sure the best practice of itself. Instead, I think the question should be when should we use Adapter or what is the best situation for Adapter pattern?

                      I like adapter in the following case: You have a bunch of old code which you don't want to touch (no matter refactor or enhance), now you need to design a new thing for some requirement. After you review the code, you find the old code could be reused but you don't want to make new design depends on it closely. In this situation, you could design new interface for your new function, but add an implementation which just reuse old code. Hence, you adapt old code into your new design without changing old code and closely couple them, although the adapter itself, the implementation, does have coupled with old code.

                      I don't know if we're talking about same thing butI don't see you give any clue that why you're using Adapter.
                      Adaptors mean something specific in SOA.
                      • 8. Re: Adapter Design.. BEst practices
                        843853
                        jschell wrote:
                        Adaptors mean something specific in SOA.
                        Oh, I see. Thanks.