Help

One of the features I am most pleased to see in Seam 2.0.1 is Natural Conversations. Why?

Easy redirect to existing conversations

It can be useful to redirect to an existing conversation if the user requests the same operation twice.

Take this example:

You are on ebay, half way through paying for an item you just won as a Christmas present for your parents. Lets say you're sending it straight to them - you enter your payment details but you can't remember their address. You accidentally reuse the same browser window finding out their address. Now you need to return to the payment for the item.

With a natural conversation its really easy to have the user rejoin the existing conversation, and pick up where they left off - just have them to rejoin the payForItem conversation with the itemId as the conversation id.

User friendly URLs

I've always been a strong believer in the use of user friendly, descriptive, URLs. For some applications this is of less import, of course - the largest (pre Seam) application I wrote was really bad at this as it used frames ;-) . For me this consists of:

  • a navigable hierarchy - I can navigate by editing the url
  • a meaningful URL (like this Wiki uses -- so don't identify things by random ids)

The first of these is certainly possible in Seam with the use of URLRewrite (I'm also looking forward to seeing stronger integration between URLRewrite and Seam's pages.xml), but the second was harder until now.

Now, with natural conversations, when you are building your hotel booking system (or, of course, whatever your app is) you can generate a URL like http://seam-hotels/book.seam?hotel=BestWesternAntwerpen (of course, whatever parameter hotel maps to on your domain model must be unique) and with URLRewrite easily transfor this to http://seam-hotels/book/BestWesternAntwerpen.

Much better!

Deprecates explicit synthetic conversation ids

I really didn't like the use of explicit synthetic conversation id - they just feel really ugly to me. You know that gut feeling you get about some things? Explicit synthetic conversaton ids are like that for me.

This is available in the recently released 2.0.1.CR1.

I hope this inspires you to go out and think about how you can incorporate natural conversations into your application.

6 comments:
14. Dec 2007, 17:14 CET | Link
Tom

User friendly URLs

My Problem with URLRewrite is that JSF does not post a form to the rewritten url, but to the resolved viewId.

I'd prefer a tighter integration with Facelets and a nice implementation of DefaultResourceResolver where you could use parts of the uri in factories, overwrite default behaviour with custom files on the filesystem.

ReplyQuote
14. Dec 2007, 18:06 CET | Link

URLRewrite's <outbound-rule> support allows you to rewrite URLs written to a friendly out through JSF components.

I'm not sure quite how a Facelets ResourceResolver would help here? What are you thinking of?

14. Dec 2007, 21:01 CET | Link

I'm looking forward to using this, because items in our app already have JIRA-style (e.g. ABC-123) unique keys, so I guess I'll be able to use those as the conversation ID.

That kind of generated key is useful your model doesn't have a required unique property. I like them because you let the user choose the ABC part, the number part starts short, and keys look like keys out of context so you can do automatic-hyperlinks and special searches like JIRA does.

 
15. Dec 2007, 06:37 CET | Link
Andy Gibson

The only fly in the ointment is the fact that JSF uses posts and any user friendly URL parameters disappear the first time the user clicks a button, or a server type ajax event occurs.

URL rewriting will resolve that problem since it puts the info into the URL itself instead of a parameter. Also, I recall talk of JSF 2.0 dealing with GETS a little better.

Isn't this the same thing that has unofficially been in Seam for a while now? I've used it in the past and found it swung between working perfectly in some cases and being somewhat problematic in others (especially in the conversation switcher). I'll check it out next week.

 
16. Dec 2007, 21:38 CET | Link
items in our app already have JIRA-style (e.g. ABC-123) unique keys, so I guess I'll be able to use those as the conversation ID.

Exactly - you can use your meaningful business keys (like car=AudiTT) which you can then transform using URLRewrite into nice URLs.

Isn't this the same thing that has unofficially been in Seam for a while now?

Yup - this is the first release it's been in as a documented feature, and we are happy it is working well enough for prime time.

I've used it in the past and found it swung between working perfectly in some cases and being somewhat problematic in others (especially in the conversation switcher).

Please, report any bugs in JIRA - I can't promise that we'll look at them before the Christmas break though ;-)

18. Dec 2007, 09:39 CET | Link
Roman Broich

For B2C and B2B Internet Applications URL-Rewriting is almost essential for survival because search engines love rest-style urls.

Not beeing SEO friendly out-of-the-box is one big disadvantage of the most j2ee web-frameworks!

Post Comment