14 Replies Latest reply on Jul 25, 2008 12:52 AM by some one

    thinking in conversations?

    Dean Hiller Expert

      I am one week into seam and I love it so far, but now I am having trouble thinking in conversations...always running into problems with leaving a conversation open.  I finally took the following strategy and am wondering if it is correct.  I try to start conversations on the method and call those methods and on my template.xhtml file, all pages that are linked from there(in pages.xml file), I add an end-conversation to.


      It seems quite difficult and fickle to get the conversations right.  Is there any good articles on this or any recommended strategies or e-books.  I am in china so hard to buy the paper back book.


      Also, is the strategy I chose okay?  Am I gonig to be missing circumstances....I almost wich I could say if any link on this page EXCEPT next step is clicked then end the conversation but I don't know how to do that in seam.
      thanks for any ideas here.
      I do think thinking in conversations is better for web application though and this is some great stuff!!!

        • 1. Re: thinking in conversations?
          Jacob Orshalick Apprentice

          It is not necessary to always end conversations.  Background conversations will timeout based on your conversation-timeout setting allowing you to simple not propagate the conversation.  To better understand how this works you can check out this link.


          Hope it helps.

          • 2. Re: thinking in conversations?
            Dean Hiller Expert

            I know seam conversations can timeout, but our problem has been when I am in a conversation, then go back to a main page with back button than go into a new conversation, keep getting the error can't begin a new conversation while another one exists with maybe use join true attribute suggestion....We have been avoiding the join true attribute...not sure if that is a good practice or not....though avoiding it seems to make ending conversations more trouble. 


            In our app, it is very simple, we have create position, edit profile and a list of positions with edit position.  All 3 of these begin conversations but if we don't end them somewhere we get that error.  We were afraid there might be other problems if we did join true but were not sure???

            • 3. Re: thinking in conversations?
              Eric H Novice

              Use join=true!  It should be your default choice for that.


              Be really careful about s:link on public pages of your site!  GoogleBot will create vast numbers of conversations and attempt to index vast numbers of duplicate pages.  Bad for your site, and your ranking.  Here's some info about Seam and GoogleBot.  We've come up with a cool work-around: we have a way of using s:link that detects if it's being visited by a search bot vs. by a web user, and handles propagation correctly for those cases.  We'll post an article and source code if people are interested.

              • 4. Re: thinking in conversations?
                Dean Hiller Expert

                ps. I can't access your blog from China..is it working or maybe the great firewall of china is blocking it(I hate that damn wall....so annoying).

                • 5. Re: thinking in conversations?
                  Eric H Novice

                  That is annoying.  It makes no sense; the only thing on that site is dry technical stuff.  Anyway, contact me at info@chiralsoftware.net if you want me send you info.


                  I guess this explains why I get zero hits from China.

                  • 6. Re: thinking in conversations?
                    Stephen Friedrich Novice
                    Hm, IMHO join="true" often is only half the solution.
                    In the links to your main pages you can choose to not propagate any existing conversation (by using plain links or by using <s:conversationPropagation type="none" />)

                    Then when starting the conversation on the new page indeed use join="true" (so that you can have postbacks to the same page).

                    I had troubles getting my head around the concept of "conversations" as well.
                    The main problem is that the term fits very well when you have a wizard-like interface that progresses frm one page to the next.

                    When you have a different kind of interface the metaphor breaks somewhat.
                    It has been most helpful for me to
                    * understand that it is ok to let conversation time-out in the background (but that depends on the number of concurrent users and the time-out settings)
                    * understand that "conversation" is more or less another term for a specific "scope" or "namespace". As long as the conversation is open objects live in there.
                    • 7. Re: thinking in conversations?
                      Jacob Orshalick Apprentice

                      Stephen is absolutely right.  join="true" only makes sense when keeping the same conversation makes sense.  Conversations should be segregated among sections of your application (otherwise you fall back into the pitfalls of the HTTPSession).

                      • 8. Re: thinking in conversations?
                        Per Wiklander Newbie

                        Eric H wrote on Jul 22, 2008 23:36:


                        Use join=true!  It should be your default choice for that.

                        Be really careful about s:link on public pages of your site!  GoogleBot will create vast numbers of conversations and attempt to index vast numbers of duplicate pages.  Bad for your site, and your ranking.  Here's some info about Seam and GoogleBot.  We've come up with a cool work-around: we have a way of using s:link that detects if it's being visited by a search bot vs. by a web user, and handles propagation correctly for those cases.  We'll post an article and source code if people are interested.


                        You only mention Google here. While Google is very popular (I only use Google) there are other search engines out there. Shouldn't their crawlers pose the same kind of problem?

                        • 9. Re: thinking in conversations?
                          Eric H Novice

                          It seemed like GoogleBot was the only one having this really bad interaction with conversation IDs.  I didn't notice others having a problem.  However, my bot-aware s:link does have tests for the dozen most popular engines.  95% of our traffic comes from Google.  The top 12 search engines are all I care about; anything outside of that is probably less than 1% of the traffic.  Other bots that are badly behaved might just be excluded from the site.  And yes there are a lot of bots out there that are badly behaved and totally ignore robots.txt, and use fake user agents, etc.


                          It would be nice if there were a way, in robots.txt, to specify that certain GET parameters should be ignored by the bot, so session IDs and conversation IDs could be ignored.

                          • 10. Re: thinking in conversations?
                            Per Wiklander Newbie

                            Eric H wrote on Jul 24, 2008 02:49:


                            However, my bot-aware s:link does have tests for the dozen most popular engines.


                            I might have missed your custom s:link component, is it available for us to use?

                            • 11. Re: thinking in conversations?
                              Eric H Novice

                              Hi Per,


                              I haven't posted it yet.  I need to write an article about it to explain what it's doing etc.  It does work very nicely.  The purpose of it is that I want s:links all over the site, so for real visitors, I can track their page movements, but at the same time, I don't want GoogleBot thinking that every conversation ID makes a unique page.


                              Anyway, when I get it written as an article I'll post it here.  I think a lot of people might want to use this.  It has other uses, too.

                              • 12. Re: thinking in conversations?
                                some one Newbie

                                Eric H wrote on Jul 22, 2008 23:36:

                                ... We've come up with a cool work-around: we have a way of using s:link that detects if it's being visited by a search bot vs. by a web user, and handles propagation correctly for those cases.  We'll post an article and source code if people are interested.


                                Yes please! :)


                                Also, another article I came across that dealt with more malicious bots was one called Closing the door to malicious attacks which made use of common strings (i.e., attack vectors) used as attempts although this article was geared towards Apache Server but the attack vectors could be put into the URLrewrite servlet.


                                • 13. Re: thinking in conversations?
                                  Eric H Novice

                                  Alright, we'll publish it.  It will take a week or so for me to get time to get it written up.  We already have the code working in production and it's working perfectly.

                                  • 14. Re: thinking in conversations?
                                    some one Newbie

                                    Thanks Eric, I look forward to reading it.