Jason Westra

Subscribe to Jason Westra: eMailAlertsEmail Alerts
Get Jason Westra via: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn

Related Topics: Java EE Journal, Apache Web Server Journal

J2EE Journal: Article

PowerTiers 6's PowerPage

PowerTiers 6's PowerPage

Persistence Software, Inc., recently released the latest version of its EJB server, PowerTier 6. It's a little different from your run-of-the-mill EJB servers, though. This JavaOne 2000 special-edition issue of EJB Home will enlighten you about PowerPage, a hot feature that will put PowerTier 6 on every EJB evaluator's radar!

Let's first understand why PowerTier 6 and PowerPage are such key ingredients in any large-scale, e-commerce solution today.

The E-Commerce Dilemma
My company has worked with numerous dot-coms this year, and most have puzzled over the same dilemma: How do we deliver a scalable, Web-enabled application, using standards-based technologies, in "Internet time"?

Four key items need to be addressed in what I call the e-commerce dilemma:

  1. Scalability
  2. Web enabling
  3. Standards-based technologies
  4. Internet time (time-to-market)
Tackling an e-commerce application generally involves give or take among these four items. For instance, maybe you decide to build a scalable, standards-based application, but it'll take an extra two months to get it fully functional and performance tested. Or maybe you opt for scalability and time-to-market, and choose a proprietary solution to reach your product deadline successfully. How do you address all four concerns and still make an e-commerce application in record time? There's an answer to this dilemma, and it's called PowerTier 6.

PowerTier 6 to the Rescue
Two critical elements are key to solving the e-commerce dilemma:

  • An EJB server for deployment of e-commerce components
  • Model-driven development and code generation

PowerTier 6 is a feature-packed application server that delivers both elements to solve the four key items of this dilemma.

Meeting the Scalability Criterion
Building on top of its original patented caching technology for scalability, the PowerTier 6 EJB server meets the scalability demands that e-commerce application and high-traffic sites require. Around 90% of the traffic on the Web is browsing (i.e., read only). PowerTier's shared cache provides a means to read EJB data at in-memory speed rather than disk speed. PowerTier 6 caches often-browsed data, improving the speed at which useful information is returned to the consumer. Timeliness enhances users' experience and prevents them from surfing to another site while waiting for responses from your Web application.

PowerTier's EJB server not only takes advantage of its patented caching, it also supports load balancing and fault tolerance of servers and EJB components.

Meeting the Web-Enabled Criterion
Persistence Software recently acquired 10BaseJ and incorporated its ServletMill product into the PowerTier 6 application server. ServletMill is written entirely in Java and includes support for Java Servlet API 2.1 and a JavaServer Pages (JSP) engine that is compliant with Sun's JSP specification 1.0.

The PowerTier servlet engine, like its EJB server, is highly scalable and fault tolerant. It can run a servlet in several "zones," which are essentially clusters of servlets. Zoning provides scalability by routing user activity across zones, ensuring that no single servlet engine is overloaded with requests. Also, ServletMill can fail over the state of a user's HttpSession. Fault tolerance in the PowerTier servlet engine is implemented by saving additions or updates to sessions on a shared file system. When a zoned servlet fails, another servlet retrieves the session state and continues processing the request.

The PowerTier servlet engine enables the dynamic content from JSPs and servlets to be displayed in HTML form for your Internet application needs. For static content PowerTier 6 bundles Apache Web server and includes a plug-in for Microsoft IIS.

PowerPage, PowerTier's innovative JSP generation feature, creates JSPs that run in the PowerTier servlet engine.

Meeting the Standards-Based Technologies Criterion
PowerTier 6 is an application server built on standard technologies such as EJBs, JSPs and RMI-IIOP. Persistence is also a J2EE (Java 2 Enterprise Edition) licensee, further guaranteeing its loyalty to standards. By building your e-commerce application with PowerTier 6, you'll be safely betting your development and deployment environment on industry-accepted standards, which will reduce the cost and complexity of maintaining your e-commerce solutions over time.

Meeting the "Internet Time-to-Market" Criterion : Introducing PowerPage
PowerTier 6 is one of the few application servers on the market to offer built-in support and third-party add-ons to ease your fledgling team into n-tiered EJB development. PowerTier's Object Builder offers model-driven code generation for EJBs; with release 6 it also incorporates a generation capability from the model to JSPs called PowerPage.

PowerPage automatically makes your PowerTier entity beans accessible from JSPs by generating all code necessary for a browser-based application with the click of a button. It allows instant Web-access to a scalable, standards-based back end, allowing your team to finish your product in Internet time without worries of missed deadlines, supporting growth or losing time-to-market.

I've briefly described how PowerTier 6 provides the critical components for solving the e-commerce dilemma. For the remainder of this article I'll focus on PowerPage and its feature set to help you understand the role it can play in your development efforts.

PowerPage ­ RAD for JSPs
The PowerPage rapid application development (RAD) process follows the same philosophy as PowerTier's EJB development process: a single object model should drive development. Model-driven development prevents you from having to make multiple code modifications to EJBs and JSPs in support of a single business domain change.

The PowerTier EJB and PowerPage development process starts when you design an object model with PowerTier's built-in Object Builder or with industry-recognized tools like Rational Rose and TogetherJ. Afterwards, you generate your EJBs representing business entities in the model and JSPs that represent the front end of your Web application. Figure 1 details how the design and development process with PowerTier 6 is tightly coupled into a single, easy-to-use toolset.

PowerTier's patented generation technology, PowerTier Object Builder for PowerPage, can take multiple inputs to drive the development of your EJBs and JSPs. You can use a third-party modeling tool or a database schema from top industry RDBMS vendors for input, or you can enter your model manually into Object Builder. Output from Object Builder for PowerPage is a Web-enabled JSP application backed by PowerTier's renowned, scalable, EJB architecture.

Support for Iterative Development and Customization
Iterative development is commonplace in today's software development, and Object Builder provides iterative support through code insertion points that represent areas within generated code into which you can safely enter custom logic. When you make a change to your model and regenerate your EJBs and JSPs, you won't lose your custom logic. Numerous RAD tools on the market today don't offer this option. They're one-stop shops that simply provide a jump start through code generation but no iterative capabilities throughout the life cycle of development.

You can choose to regenerate only JSPs or only EJBs, a nice option when you already have an Object Builder EJB model and want to quickly generate a JSP front end to show a functional prototype to management.

In addition, you can customize the look-and-feel of your generated JSPs. PowerPage generates what it refers to as a Project.css file, which is a cascading stylesheet for your HTML presentation. This file can be modified to customize the appearance of your application. You may change presentation characteristics like background color and font for your project to give it a unique look-and-feel.

Steps to Web-Enabling EJBs
Those of you who are avid readers of EJB Home have heard this message from me before: "EJB development is not easy!" This holds true in the context of a traditional EJB server; however, PowerTier 6 with PowerPage has made me eat my words to some extent. The methodology and technology that PowerTier uses to build a functional, Web-enabled EJB application is dramatically easier than any I have worked with since EJB servers were first available in 1998.

Table 1 lists the tasks involved in creating an EJB application and Web-enabling it with Java servlets or JSPs. As you can see, PowerTier 6 does the main tasks for you through seamless generation; with traditional EJB servers you have to perform each task manually.

Example Use of PowerPage
When I first heard about PowerPage, I was eager to dig into the technology myself. I don't normally evaluate something with the vendor-provided examples. Instead, I create something from scratch to test the process on my own. I'll walk you through the process I followed and provide you with insights into the PowerPage product along the way.

J-Term Registration
J-Term stands for January Term, which is a monthlong term in some colleges during which students take only one course and professors teach only one course. To investigate the PowerPage product, I built a simple J-Term Registration application that allows the entry of J-Term courses, teachers and students. The UML model for the application is as shown in Figure 2. I used inheritance and associations to show PowerTier's ability to generate different relationships between EJBs and map them to database tables and JSP pages.

First I manually entered the classes and relationships into the PowerTier Object Builder (I could have used a third-party tool for this step). After Object Builder contained my model, I marked two checkboxes to indicate I wanted to generate both PowerTier EJB and JSP files (see Figure 3). Then I selected the File ­> Generate Code menu item and Object Builder's generator created both my EJBs and JSPs for the J-Term Registration example.

With my J-Term EJBs, JSP files and HTML files generated (see Figure 4), I could have modified the stylesheet to my liking ­ added custom code inside code insertion points, or more JSP scripting ­ but chose not to for this example. Instead, I deployed the J-Term Registration example as is into the PowerTier 6 server and its bundled Apache Web server, then started the PowerTier server to test my auto-generated application. My application functioned with simple CRUD (Create, Read, Update, Delete) functionality!

I didn't get a chance to test round-trip engineering with PowerPage generation. I'm not sure how easy it is to add custom code to a JSP or generated nonvisual JavaBean, but my guess is that it's just as easy as adding code to generated EJBs.

PowerPage Limitations
PowerPage accesses entity beans directly. This design conflicts with the generally accepted entity bean wrapper pattern. In this design pattern entity beans aren't accessed directly from clients. Instead, session beans are used to manage transaction semantics and manipulate multiple entities in a single business function.

I see PowerPage as a powerful feature for developing Web-enabled e-commerce applications and functional prototypes. However, I don't believe it will add as much value to large-scale enterprise efforts with disparate clients. These applications require business processes to be modeled as session beans in order to encapsulate business logic and transaction boundaries for multiple client platforms, not just browser clients. I look forward to future product releases of PowerTier to see if Persistence tackles this market with a product as well engineered as PowerPage.

I discovered some bugs in the initial release as I was working with it, but was not able to track the cause to PowerPage or the newly integrated servlet engine before the article deadline. Integrating a servlet engine and creating a new JSP feature in one release is a daunting task to accomplish for any engineering group. Nevertheless, PowerTier 6 is an application server with a rich feature set.

PowerPage provides a bridge between application server components and Web pages ­ automating EJB access from Web pages and eliminating tedious manual coding. Together, PowerPage and PowerTier Object Builder ensure faster deployments by reducing development time and increasing reliability and efficiency of code.

The ability to preview application functionality at any point in the development process means better user interfaces, more reliable products and shorter project cycles. The underlying PowerTier application server guarantees the rapid response that will keep Internet customers coming.

While in Silicon Valley last March, I had a chance to meet with Chris Keene, CEO of Persistence, as well as their VP of engineering and the senior engineer who developed PowerPage. My impression of Persistence as a company is that it is dedicated to providing end-to-end solutions that eliminate the learning curve for n-tiered, enterprise Java development. This commitment is evident in its acquisition of 10BaseJ to bundle a scalable servlet/JSP engine in PowerTier 6 as well as the engineering team's innovative approach toward Web-enabling EJBs with PowerPage.

"PowerTier PowerPage: Instant Web Access to Enterprise JavaBeans" ­ Contact Persistence Software, Inc., at www.persistence.com, to have a copy of the technical white paper sent to you.

More Stories By Jason Westra

Jason Westra is the CTO of Verge Technologies Group, Inc. (www.vergecorp.com). Verge is a Boulder, CO based firm specializing in eBusiness solutions with Enterprise JavaBeans.

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.