RBDe7 new feature: EGL is integrated into Portlet Project!

来源:互联网 发布:长城宽带 封端口 编辑:程序博客网 时间:2024/05/28 23:13

just finished a small portlet test, I am so excited to know EGL is intergated into Portlet in Rational Business Developer 7.0, which means, Portlet is not anymore Java based, it could be EGL based!

IBM EGL guys are making a great job, they focus on releasing software developer's burden and let us pay more attention on planning and designing businness logic. There are a lot of remarkable changes in this new version, like this one!

Working Envrionment:

RAD7.0.0.0

RBDe 7.0

WebSphere Portal Server 6.0

WebSphere Application Server 6.1

Sample Description:

This sample is EGL based portlet talks with EGL Model layer through Web Service. The HelloService accepts a person's name and the name of a city, and returns a string combing the two, such as "Xu, welcome to Innsbruck!" which is displayed on the portlet.

Main steps to create Sample Project

The sample structure is like:

EGLService is the Model Layer

PortletClient is Portlet View Layer which talks to Web Service in EGL

EGLClient is the EGL View Layer which talks to Web Service in EGL

Model Layer

Model Layer is a simple Web Service in EGL. The service cod is:

To make it availabe to other application as a web service, you need to create service binding informaiton, which tells other application where to find the service and what funcitons are availabe. The service publishes this information as a WSDL file. The service binding information is contained in an EGL deployment descriptor, here is ServiceDD:

Next, you set the ServiceDD into EGL builder descriptor. The builder descriptor file contains build descriptor options, which describe how EGL will generate your project into the output language.

Portlet View Layer

To add EGL Facets in Portlet Project
- right-click on the Portlet project and select Properties
- select "Project Facets" and click on "Add/Remove Project Facets"
- add Facets: JSTL, Base Faces support, Enhanced Faces components, EGL support with JSF, EGL support with JSF Component Interfaces
- click Next
- click Finish

The PortletClient2View.egl:

Create the deployment descriptor file, this file will hold the information about where to find services:

If you run the sample in webSphere server, you should set class load option to Parent_Last in the Deployment Descriptor file: PortletClientEAR:

Create the java code for PortletClient Project, and run it in Portal Server.

You can find the whole EGLService + EGLClient Sample at: Hello World: Learn how to create a Java Web service using Rational Business Developer Extension
 
Now the next question comes, how to make coopertaive EGL portlets? To be continued...