RBDe7 new feature: EGL is integrated into Portlet Project!

本文介绍了IBM EGL在Rational Business Developer 7.0中与Portlet集成的应用案例。通过EGL,Portlet不再仅限于Java开发,而是能够利用EGL进行构建。文中详细描述了一个示例项目,该项目通过Web Service实现EGL Portlet与模型层之间的交互。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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...
identity 身份认证 购VIP最低享 7! triangle vip 30元优惠券将在58:6:9后过期 去使用 triangle QT+Poppler+PDFviewer.zip 是一个用于在Windows操作系统下,使用QT5框架结合Poppler库开发PDF阅读器的项目。这个项目的核心是利用Poppler库解析PDF文档,并通过QT5进行用户界面的设计和交互。以下将详细介绍相关知识点: 1. **QT5框架**:QT(Qt)是一个跨平台的应用程序开发框架,支持多种操作系统,如Windows、Linux、macOS等。它提供了丰富的库函数和组件,使得开发者可以方便地构建图形用户界面(GUI)应用程序。QT5是QT的第五个主要版本,引入了许多新特性和改进,如QML(Qt Meta Object Language)用于声明式UI设计,以及更好的性能和API优化。 2. **Poppler库**:Poppler是一个开源的PDF文档处理库,源自Xpdf项目,主要用于PDF文件的解析、渲染和提取文本。Poppler提供了C++接口,使得开发者能够方便地在应用程序中集成PDF阅读和处理功能。它可以读取PDF文件,显示页面,提取文本和元数据,甚至支持对PDF文件进行注释和修改(但本项目可能仅涉及阅读功能)。 3. **PDF viewer的实现**:在本项目中,PDF viewer是基于QT5 GUI组件构建的,它利用Poppler库来加载和解析PDF文档。`mainwindow.cpp`和`mainwindow.h`包含了主窗口类的定义和实现,这是用户与应用程序交互的主要界面。`pdfcanvas.cpp`和`pdfcanvas.h`则可能包含了用于显示PDF页面的自定义画布类,该类使用Poppler库来渲染PDF页面到QT的画布上。 4. **项目构建与编译**:`newtime.pro`是QT项目的配置文件,用于指定项目依赖的库(如Poppler)、源代码文件、编译选项等。`.pro.user`文件则保存了用户的特定编译设置,如编译器路径或调试选项。开发者需要使用QT的qmake工具或直接在IDE如Qt Creator中打开此项目,进行编译和链接,确保所有依赖库都正确安装并链接。 5. **文件操作**:`main.cpp`通常是程序的入口点,负责初始化QT应用环境并运行主循环。在PDF viewer中,可能会在`main.cpp`中实例化主窗口,并调用Poppler库的相关函数来加载PDF文件。 6. **使用流程**:用户可以通过QT界面选择PDF文件,然后通过Poppler库读取文件内容,将页面渲染到QT的控件上。用户可以通过滚动、缩放等操作查看PDF内容。 Poppler库的强大功能使得PDF viewer可以支持多页显示、文本搜索、书签管理等高级特性。 7. **优化与扩展**:为了提升用户体验,开发者可能会对PDF viewer进行各种优化,比如添加平滑滚动、快速查找、页面预加载等功能。此外,还可以考虑支持批注、打印、PDF转换等更复杂的操作,以增强软件的功能性和实用性。 QT+Poppler+PDFviewer.zip项目提供了一个基础的PDF阅读器实现,开发者可以在此基础上进一步定制和扩展,以满足特定的PDF处理需求。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值