Conversation Scope and JSF (or your favorite web framework)

There is a lot of buzz (not only recently) around some extra scope, that is shorter than a session and longer than a request. Such a scope is a very good scope to implement business processes or some wizard (==> step x of n). Lots of frameworks call this “conversation”, so does Orchestra or Seam. In Trinidad there is a “pageFlowScope” for this…

One of the goals of JSF 2.0 is to “standardization of the many different Dialog/Conversation/Scope/Flash ideas currently in use”. On the other hand there is the WebBeans standard, that tries to contribute some ideas of the Seam framework to the Java EE community (and some DI ideas from Google Guice).

Seam as you know has also this extra scope… and if both JSF and WebBeans would address this issue, there would be two beasts for the same story.

So, one could think that JSF should just relay on WebBeans for that kind of functionality, but that would cause a serious amount of headaches when it comes to the JSF 2.0 adoption… Similar like it was, when the JSF 1.2 hit the road (it introduced the dependency to JSP 2.1…). So if JSF 2.0 has a mandatory dependency to WebBeans it could make things harder than needed. Same would be true if other web frameworks, like wicket, want to use this. Yes, it is possible

But again, it is huge dependency for a common feature…

So, why not adding this scope could to a more generic layer, like the servlet layer ? That would be very common for almost all (java) web frameworks🙂 How could it be standardized at Servlet level? Adding URL parameters (like jsessionid), but that wouldn’t be URL copy-paste proof when opening a tab… or cookies? Those can disabled by the browser…

Why not just adding a raw API for “conversations” to the Servlet layer? No implementation at all. JSF (and others) could (not have to) provide an implementation of this… That would mean all these framework kinda use the same (common) API, but everybody solves the issue on its own.
(sure, when this part of Servlet 3.0 there is still an issue with the adoption, but a Servlet 3.0 adoption isn’t an elephant like WebBeans)

Funny enough, the Orchestra library already has an abstract FrameworkAdapter, that provides access to all the data necessary for Orchestra to work while isolating Orchestra from the actual UI presentation framework being used.

I think it would be good if a similar thing is provided by the Servlet layer. JSF (or other web frameworks) could just offer the implementation, if they want…

I really hope conversations somehow make it into the java web land….

Howdy!

Posted in java, jsf, myfaces, web²
4 comments on “Conversation Scope and JSF (or your favorite web framework)
  1. Werner Punz says:

    I fully agree, conversations would make most sense on the servlet layer in a way, that it is a third scope adding to the already existing request and session scopes. ORM control, advanced conversation control frameworks and tools, could be added by the frameworks building upon it.

  2. I was talking to Expert Members of Java EE 6 about this exact topic. Web Beans brings some really good ideas but some should be spread where they belong. And I think that extra scopes should be defined were the existing scopes are : in the Servlet spec.

  3. Wow, I’ve been a bit out of the JSF loop for a while, but I was pushing for this back in 2004. You were part of the conversation as well. Good to see it coming to fruition.

    http://cli.gs/JYmd0A

    And on server side: http://cli.gs/mLAPGB

  4. […] to do everything the above libraries do combined, plus a couple of things more like solving the conversational scope issue. I haven’t worked with this framework myself though so I can’t speak from […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: