1 Reply Latest reply on Apr 7, 2009 6:43 PM by Arbi Sookazian

    better practice: end conv. on method or pages file?

    Dean Hiller Expert

      Is it better to use @End on a method to end conversation or to use <end-conversation> in the pages file?


      YES, I know that in some contexts one or the other might be better, but in GENERAL which one is better when you could really do it either way in many other contexts????


      ie. is there a preferred way?


      thanks,
      Dean

        • 1. Re: better practice: end conv. on method or pages file?
          Arbi Sookazian Master

          Here's the comment regarding this from Yuan, et al, 2nd edition (sections 8.3.1 and 8.3.2):



          This is generally up to personal preference, but from experience, the navigation approach (using pages.xml) tends to lead to more maintainable code.  The navigation approach provides clear boundaries for the conversation based on user navigation, instead of trying to relate conversation boundaries to page components that the user interacts with.

          That being said, I usually use the annotation approach as that is how I learned Seam conversations from the booking and other examples in books, etc.


          Whatever floats your boat man.  This is the classic argument of XML vs. annotations, each has it's advantages and disadvantages...