672329 members! Sign up to stay informed.

Sponsored Links


Resources

Enterprise Java
Research Library

Get Java white papers, product information, case studies and webcasts

News News News Messages: 4 Messages: 4 Messages: 4 Printer friendly Printer friendly Printer friendly Post reply Post reply Post reply XML XML XML

dev2dev: Integrating JavaServer Faces with Beehive Page Flow

Posted by: Joseph Ottinger on January 12, 2006 DIGG
BEA's dev2dev site has posted "Integrating JavaServer Faces with Beehive Page Flow," an article documenting how you can replace JSF's "very basic navigation handler" with Beehive, the BEA-contributed "full-featured navigation handler" that integrates with Struts.

The summary of the article:
This article has shown how to pair the richness of JSF for building pages with the power of Beehive Page Flow for controlling navigation between pages. While integrating the two is easy, it has a profound impact on your application: It separates your JSF pages from application-level logic, and brings the pages into the world of features that Page Flow provides. A JSF page gains a clear mission: participate in the flow of an application as a single (if highly capable) view element. What I haven't shown here is a fully fleshed out application, with event handling in JSF pages and complicated navigational logic in the controller. But the more complex an application gets, the more it demands the separation of responsibilities and advanced flow features that Page Flow adds to JSF. Spend a few minutes trying it out—it doesn't take long to start realizing the benefits.

Threaded replies

·  dev2dev: Integrating JavaServer Faces with Beehive Page Flow by Joseph Ottinger on Thu Jan 12 09:23:01 EST 2006
  ·  dev2dev: Integrating JavaServer Faces with Beehive Page Flow by Ian Hlavats on Fri Jan 13 11:22:19 EST 2006
    ·  dev2dev: Integrating JavaServer Faces with Beehive Page Flow by Rich Feit on Mon Jan 16 12:19:00 EST 2006
  ·  Migration path for existing Page Flow users by Doug Leeper on Mon Jan 16 14:49:20 EST 2006
    ·  Migration path for existing Page Flow users by Po-yu Jen on Tue Jan 17 22:48:34 EST 2006
  Message #197194 Post reply Post reply Post reply Go to top Go to top Go to top

dev2dev: Integrating JavaServer Faces with Beehive Page Flow

Posted by: Ian Hlavats on January 13, 2006 in response to Message #197003
Good article.

I checked out some of the Beehive sample code and I like the idea of a more advanced view controller for JSF but is it really fair to say that JSF has only a "very basic navigation handler"?

From my experience the ability to link an output page to the outcome of an action method covers 80-90% of what I would expect from a view controller. In this regard, JSF is as full-featured an MVC framework as Struts.

So what value does Beehive add? I gather that you can assemble a set of pages to be processed as a page flow, which is the beginning of adding business process management and workflow support to JSF.

My other concerns include the apparent lack of an XML configuration file for navigation design and hard-coding URLs in annotations.

In my experience, XML is cleaner, more human-readable, and more straightforward to edit than annotations but I admit I have not worked extensively with this new Java 5.0 feature.

One of the issues in a view-intensive Web application, i.e. one that has many pages, is how changes to the information architecture will impact application logic.

As a developer you expect a certain amount of freedom to refactor your code, make API changes, and so on. User interface designers (including Web authors) should also be free to make changes to the view to accommodate users.

  Message #197383 Post reply Post reply Post reply Go to top Go to top Go to top

dev2dev: Integrating JavaServer Faces with Beehive Page Flow

Posted by: Rich Feit on January 16, 2006 in response to Message #197194
Great questions...
Good article.I checked out some of the Beehive sample code and I like the idea of a more advanced view controller for JSF but is it really fair to say that JSF has only a "very basic navigation handler"? From my experience the ability to link an output page to the outcome of an action method covers 80-90% of what I would expect from a view controller. In this regard, JSF is as full-featured an MVC framework as Struts. So what value does Beehive add?

I do think the default NavigationHandler in JSF is very basic -- you can attach code or a path to an outcome, but that's about it. There's not really a separate and configurable navigation tier. Some of the things Beehive Page Flow adds in this department:
        
  • Declarative exception handling and validation, through annotations.
  •     
  • Automatic management of state related to the navigation tier (instantiation/storage/cleanup of the JavaBean that is the controller).
  •     
  • Inheritance of configuration (by defining an inheritance model for annotations -- this way, you inherit logic, state and metadata).
  •     
  • "Nested page flows" -- the ability to run an entire flow (set of actions/pages) in the middle of another one, with the original one's state preserved until the nested one ends.
  •     
  • Symbolic navigation, optional tracking of recent pages and the most recent action, which can be redisplayed/rerun without using explicit paths. Useful especially with nested flows.
        
My other concerns include the apparent lack of an XML configuration file for navigation design and hard-coding URLs in annotations.In my experience, XML is cleaner, more human-readable, and more straightforward to edit than annotations but I admit I have not worked extensively with this new Java 5.0 feature.

Beehive certainly is based on the idea of attaching metadata directly to code. You can still edit the generated Struts config XML if you need to, but assuming it's not important to be able to change config on the fly in a production-deployed application, annotations give you a single place to edit code and config. I really do agree that the Java annotation model isn't so human-readable; I like XDoclet-styla annotations much better. But I strongly believe that the benefits of annotations (keeping code/config in one place, not to mention toolability) outweigh their drawbacks (harder to edit config in a deployed application, somewhat nasty syntax).
One of the issues in a view-intensive Web application, i.e. one that has many pages, is how changes to the information architecture will impact application logic. As a developer you expect a certain amount of freedom to refactor your code, make API changes, and so on. User interface designers (including Web authors) should also be free to make changes to the view to accommodate users.

I think that the more powerful the controller layer -- the more of the controller logic that's removed from the view -- the more view-tier freedom you have.

  Message #197399 Post reply Post reply Post reply Go to top Go to top Go to top

Migration path for existing Page Flow users

Posted by: Doug Leeper on January 16, 2006 in response to Message #197003
I haven't found any documentation about migrating from current Page Flow implementations (WLS 8.1).

Has anyone tried to migrate? Were there any issues? If so, could you elaborate?

  Message #197525 Post reply Post reply Post reply Go to top Go to top Go to top

Migration path for existing Page Flow users

Posted by: Po-yu Jen on January 17, 2006 in response to Message #197399
Workshop 9.2 (Spring 2006) will include a code migration tool to import old 8.1 application to Eclipse-based workshop 9.2 .

New content on TheServerSide.comNew content on TheServerSide.comNew content on TheServerSide.com

Dependency Injection in Java EE 6 - Part 2

Reza Rahman continues to explore the features of the proposed JSR 299, Contexts and Dependency Injection for Java EE (CDI). When approved, it promises to be a key feature of Java EE 6. (January 21, Article)

Ted Neward Q&A: What you must know about JavaScript, Scala and more

Ted Neward is an independent consultant specializing in high-scale enterprise systems, and an authority in Java and .NET technologies. He is the author and co-author of several books, including Effective Enterprise Java. At TheServerSide Java Symposium in March, he will be presenting sessions on pragmatic architecture, ECMAScript and Scala. (January 15, Article)

Developers split on open sourcing Java

Now that Oracle is absorbing Sun Microsystems, there mixed views on what should come of the Java Community Process (JCP). While some say Oracle should become the new steward of Java and keep the JCP much as it was, others argue that it may be time to open-source this widespread language. (November 24, Article)

Dependency Injection in Java EE 6 - Part 1

Reza Rahman explores the features of the proposed JSR 299, Contexts and Dependency Injection for Java EE (CDI). When approved, it promises to be a key feature of Java EE 6. (November 2, Article)

SAML: It's Not just for Web services

SAML is an XML-based standard for exchanging authentication and authorization data between security domains. The single most important problem that SAML was created to solve is the Web browser Single Sign-On problem. Many organizations are debating whether to stay with version 1.1 or move to 2.0. This article makes observations about both options. (September 28, Article)

Programming is Also Teaching Your Team

Joe Ottinger takes a look at how people learn, and applies it to the practice of programming. He notes that understanding how people learn is an essential part of working in a programming team. (September 22, Article)

Can Java EE Deliver The Asynchronous Web?

Stephen Maryka gave us an article about the Asynchronous Web and posed a number of questions that get examined like an approach to delivering Asynchronous Web capabilities through extensions to existing Java EE technologies. (July 14, Article)

JSF Flex

JavaServer Faces Flex goal is to provide users capability in creating standard Flex components, part of flexSDK which is open sourced through MPL license, as normal JSF components. This article by Ji Hoon Kim will provide an overview of creating a simple multilingual JSF page consisting of JSF Flex tags. (June 29, Article)

The Rules of SOA - A Road to a Successful SOA Implementation

In this session Jeff explores the key characteristics of successful SOA projects. He covers some of the patterns, and anti-patterns, tool sets, and strategies that he himself learned the hard way. Last, he provides a strategy and blueprint for achieving a high likelihood of success in your SOA project. (June 23, Tech Talk)

Ari Zilka Talks About Terracotta 3.1

Ari Zilka, CTO of Terracotta, Inc., talks about the new features in Terracotta 3.1, announced during JavaOne and available now. (June 15, Tech Talk)

Enterprise Application Integration, and Spring

In this Tech Talk, Josh Long explores an integration challenge using Spring Integration and walks through the implementation, employing and expanding on the basic patterns of Enterprise Application Integration to tie together components into a function integration solution, and then demonstrates how Spring Integration helps address the integration requirements. (June 15, Tech Talk)

Google Web Toolkit: An Introduction

In this Tech Talk, David Geary teaches you: The basics of Google Web Toolkit; How to implement Ajax-enabled applications in Java; Internationalization; Hooking into the browser history mechanism; Remote procedure calls. (June 4, Tech Talk)

Just Enough Early Architecture to Guide Development

Jon Kern discusses the best architecture/technical solutions and ensure that they are repeated by all developers. By tackling the architecture up-front in a serial manner, subsequent parallel development will be much more manageable and predictable. (May 28, Tech Talk)

Productive Programmer: On the Lam from the Furniture Police

This keynote describes the frustrations of modern knowledge workers in their quest to actually get some work done, and solutions for how to guard yourself against all those distractions. Neal Ford talks about environments, coding, acceleration, automation, and avoiding repetition as ways to defeat the misguided attempts to sap your ability to produce good work. (May 26, Tech Talk)

Auto-Scaling Your Existing Web Application

Gil demonstrates how new, aggressive uses of already abundant compute capacity by common applications offer competitive value for application designers. (May 21, Tech Talk)

Automating Hibernate Mapping and Queries For Java Web Development

Chris Keene introduces WaveMaker as a new way to automate the ability to generate Hibernate classes in order to more quickly bring OR mapping into an application. (May 19, Article)

Free Book PDF Download: Mastering EJB Third Edition

Mastering EJB was one of the original and most influential EJB books in the industry. Mastering EJB III now returns with two new expert co-authors, updated for EJB 2.1 and 30% new chapters including security, integration, best practices, open source, and more.
(Book PDF Download)

Application Server Matrix

The Application Server Matrix is a detailed listing of J2EE vendors and their application server products, with information on latest version numbers, J2EE spec support and licensing, pricing, platform support, and links to product downloads and reviews.
(Application Server Comparison Matrix)

News | Blogs | Discussions | Tech talks | Patterns | Reviews | White Papers | Downloads | Articles | Media kit | About
Java Solutions
All Content Copyright ©2007 TheServerSide Privacy Policy
Site Map