Welcome!

PowerBuilder Authors: Chris Pollach, Yeshim Deniz, Jayaram Krishnaswamy, Kevin Benedict, Avi Rosenthal

Related Topics: PowerBuilder

PowerBuilder: Article

Working with the Enterprise Portal

An Overview Part 2

An enterprise portal is the converged "hub" of multiple, complementary information management solutions, including document and content management, information search and retrieval, knowledge management, team collaboration, workflow, and business intelligence.

Using PowerBuilder with Sybase Enterprise Portal
Sybase Enterprise Portal is built around Sybase Enterprise Application Server. A lot of PowerBuilder developers already use this application server to build Enterprise (EAServer) applications. One of the reasons why they picked this server might be that it's the only server on the market that can handle all the server-side component models out there. But there's more: Not only can EAServer handle CORBA, EJBs, and COM, but it can also handle PowerBuilder components. This was the best reason for me to become an EAServer expert. I was a good PowerBuilder developer for several years, but then development for the Web was (and still is) hyped. Everyone wanted to develop applications that could run in a browser. So we started to develop applets. Cool, but not what we were looking for. We looked for something that let us skip having to deploy something to our clients, and we looked for something that runs fast and in a browser. As a PowerBuilder enterprise developer, I already had what I needed: EAServer, PowerBuilder, and PowerDynamo. So we installed these cool products and took a deeper look at them.

We built the first PowerBuilder components and deployed our business logic sitting in NVOs to EAServer. We built the PowerDynamo sites that called our components. This was a cool time. No need to learn this Java stuff; we just used PowerBuilder as we did before, and we were on the Web. I loved this time playing around with PowerBuilder and EAServer, figuring out that it's not very "enterprise-like" to throw a MessageBox in an EAServer component (because no one will sit in front of the server and click away one million MessageBoxes a day from our online order application), or check whether a SetTransobject failed or not.

But I have to say that it dramatically changed the way I built PowerBuilder application. I learned that if you don't do it right the first time, you'll do it right later. You can make so many mistakes when you code a server-side component (NVO), and you might have a hard time figuring out what's going on. Try to check everything (update, retrieve, create - who says there's enough free memory on your server?). We even checked assigning a DataObject to a DataStore to see if the DataWindow is really assigned. Trust me when I tell you that this can happen a lot if you have many users and developers working on a distributed application.

Now that you are a believer, too, I'll tell you the end of the story. Because we were able to build distributed applications at this time, we were more than only client/server developers. But then the next hype started: EJBs and JSPs came into our enterprise world. Well, this wasn't a big problem. Using the Sybase EAServer we could migrate our PowerDynamo pages to JSPs. Well, EJBs aren't a problem either: They call the PowerBuilder components sitting in EAServer and vice versa.

But, hey, what happened? We started as pure PowerBuilder client/server developers, and suddenly we were building distributed applications for thousands of users still using PowerBuilder, but we were also little experts in J2EE and Java. I mention this because I've seen companies in the past years with a lot of excellent PowerBuilder developers, but when it comes to distributed development they (only) use Java. I think this is wrong. These companies already have the best tool. Why are they wasting time and money to do it another way? Implementing the business logic in PowerBuilder and writing a JSP that calls this component and displays the data is so easy and building some HTML around it is something every PowerBuilder developer learns very fast.

And now we have the Enterprise Portal. With this product, we can bring business data to the user via a personalized and secure view from in a single application, the Web browser. Let's get started and build an example.

Preparing a Sample
You should already have the EP info edition installed on your machine. You'll find the file eastest.war on the book's Web site at www.pb9books.com. Just copy this file into the directory c:\EP5-InfoEd\tomcat404\webapps and restart Tomcat. Tomcat unpacks the Web application. You'll see the directory eastest under the webapps folder. There you will find a JSP page that uses the Java class pbclass.GetDW (in the Web-Inf\classes directory). This class connects to EAServer, instantiates the WebDW, and returns the HTML string that's displayed through the JSP file.

Take a look at the Java class, and make sure it uses the following values (you might have to change these to fit your installation):

iiop://localhost:9000 The EAServer IIOP port
c:\\EP5-InfoEd\\tomcat404\\webapps
\\eastest\\pb\\cust.pbl
The path to your EP installation

There is also a build.bat file included that compiles the Java file. Use this if you made some changes.

More Stories By Berndt Hamboeck

Berndt Hamboeck is a senior consultant for BHITCON (www.bhitcon.net). He's a CSI, SCAPC8, EASAC, SCJP2, and started his Sybase development using PB5. You can reach him under [email protected]

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.