beehive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ken Tam" <>
Subject RE: Porting WebLogic Controls to Beehive Controls
Date Fri, 01 Oct 2004 07:46:24 GMT
Hi Kevin,

> We have written an application using the constructs from 
> WebLogic Workshop like Pageflows and Controls.  We would like 
> to eventually be able to port our app from WebLogic to 
> another J2EE server like Tomcat or JBoss.
> The pageflows arent an issue with the WebLogic portability toolkit.
> We have wrriten a lot of our database code in WebLogic custom 
> control files but we are interested in porting these controls 
> to Beehive controls.  Is this feasible? Reading through the 
> Control documentation on the Beehive site gives me the 
> impression that they are different animals.  

Controls in Beehive can be thought of as "v2" of controls in WebLogic --
you rightly point out there are indeed significant implementation
changes.  Due to the switch from Javadoc to J2SE 5.0 annotations, the
programming model also superfically "looks" significantly different, but
in fact it's conceptually very similar:

a) Separation of public interface from private implementation
b) Declarative metadata as a 1st class means of expressing functionality
and "making it easy"
c) "control extensions" as Java interfaces that provide a means to
extend a pre-existing control and shape its functionality.
d) events and event handlers as a communication mechanism between
controls and control clients

Beehive controls' design is rooted in 2 fundamental Java standards:
1) JavaBeans as the basis of the component model.
2) J2SE 5.0 / JSR-175 annotations as _the_ mechanism for expressing

>From a programming model perspective, #2 results in the most obvious
syntactical changes: 
a) use of annotations rather than marker interfaces (ie,
"@ControlInterface" rather than "implements Control")
b) use of annotations rather than naming conventions (ie,
"@EventHandler(field=ctl,eventName=myevent)" rather than "public void
ctl_myevent()", generalizing event client proxies via "@Client")
c) use of annotated interfaces to define properties rather than an XML

Our experience internally at BEA has been that porting controls from the
WebLogic custom controls world to the Beehive controls world is usually
quite straightforward.  Let's look at your sample:

> public class DBControl extends com.bea.control.Control {
>      String testControl();
> }

public interface DBControl {
    String testControl();
> public class DBControlImpl extends 
> com.bea.control.ControlSource, implements DBControl {
>      /**
>       *@common:operation
>       */
>       public String testControl()
>        {
>             return "Hello World";
>        }
> }

public class DBControlImpl implements DBControl {
    public String testControl()
        return "Hello World";

We're working on posting some docs and best-practices on how to port
from WebLogic controls to Beehive controls.  It's also worth mentioning
that the next release of WebLogic will include tools to help automate
that porting.  In the meantime, the community here should be able to
answer any questions you have about the necessary work.

View raw message