Joe Fontaine

Subscribe to Joe Fontaine: eMailAlertsEmail Alerts
Get Joe Fontaine: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Related Topics: Java EE Journal

J2EE Journal: Article

ViewPoint/EA Review

ViewPoint/EA Review

To meet today's growing demand for delivering Web applications, you need a solid development framework. Fortunately for PowerBuilder developers, a couple of frameworks are available that will allow you to leverage your PowerBuilder knowledge and the power of Sybase EAServer to build Web applications. One such framework, EAF from Cynergy Systems Inc., was reviewed in the August 2000 issue of PBDJ(Vol. 7, issue 8). This article reviews the features of another framework, ViewPoint/EA from Applied Knowledge Inc. (AKI).

Background
The architecture of the Web dictates that you partition your presentation logic from your business logic; this is true for PowerBuilder or Java. ViewPoint/EA has a long history of being a Business Object framework dedicated to doing this. ViewPoint originated from a framework built in 1994, named Progeny. In 1997, Progeny evolved into ViewPoint, an application framework for client/server development centered on a Business Object architecture.

The use of a Business Object approach from the beginning, for client/server development, has led to a natural fit between EAServer and ViewPoint/EA for Web development. On December 11, 2000, Sybase announced a business partnership with AKI for the integration of EAServer with ViewPoint/EA, stating that by using the two products together, organizations can quickly convert their client/server applications into Web applications.

ViewPoint/EA is available to all developers at no cost under an Open License agreement from Applied Knowledge Inc. at www.aki.com/ViewPoint. You don't need to sign a contract, and registration is easy. Once you complete a small registration form on the ViewPoint Web site, you'll be given a logon by e-mail confirmation. This gives you access to the ViewPoint/EA download site.

The framework is open source. As a developer, you can modify or extend the source code and deploy applications to clients, but you can't redistribute source code.

ViewPoint/EA is free, with the intention that more customers will try it and give feedback, fueling enhancements and additional use. You have the option of learning it on your own or to fast track the learning process by using AKI's on-site training and mentoring. Like other framework companies, training and mentoring are not free.

Setup and Use
From the AKI ViewPoint/EA Web site, you'll need to download the latest version of the ViewPoint/EA framework, all the documentation, and a VP Jaguar Administration tool.

The download and setup are simple. However, I would prefer one download and setup, instead of separate downloads and InstallShield setups for the framework library, documentation, and the VP Jaguar Administration tool.

The framework has a relatively small footprint, approximately 2.5MB. All the library files for building Web applications are included with ViewPoint/EA. However, all the files for client/server development are not included. You'll have to request these separately by contacting AKI at ViewPoint@aki.com.

Help and Technical Support
To help you get started building Web applications, ViewPoint/EA includes help documentation and a tutorial in two formats (Adobe PDF and Compiled HTML Help). The framework also comes with a demo Web application using the demo database in EAStudio.

The demo and tutorial are fairly easy to set up and run. For details on building your own components and deploying them to Jaguar you'll probably need to reference the documentation for details. The documentation is comprehensive and of professional quality, however, it may lack enough examples and detail for new users.

Technical support is free and available online at the AKI Web site. As a registered user you'll be provided access to the ViewPoint support site where you can obtain upgrades, receive technical support, and report problems. Technical support is offered using a newsgroup-like message board where ViewPoint engineers answer your questions. This will probably not be enough for users new to the framework or EAServer. Some users might want to opt for training/mentoring.

Features
When you download and set up ViewPoint/EA, you get more than just code: there are some powerful features and tools for building Web applications. The two most important features of Viewpoint/EA are the Business Object and Pagelet architectures.

Business Object Architecture
To use ViewPoint/EA you need to understand how the Business Object interacts with other objects in the framework.

The Business Object Architecture in ViewPoint/EA is based on the time-tested design pattern known as Model-View-Controller (MVC). The MVC pattern provides the basis for application partitioning (see Figure 1).

  • Model (VP): In ViewPoint, this is the Business Object, which encapsulates the business rules and processes. It also models the object-relational aspects of the system using one or more DataStores to represent its data attributes.
  • View: Visual presentation of the Business Object. Can be a window or a pagelet representing a Web page.
  • Controller: This object acts as the broker between a Business Object (model) and its presentation (view). ViewPoint includes controllers for Web pages and windows and you can add your
  • DS: Represents one or more DataStores that make up the data attributes of the Business Object.
The power of this architecture is that the controller isolates the Business Object from its presentation in a window or Web page. This facilitates reusability, allowing any window or Web page to be assembled with any Business Object

The ViewPoint Business Object also uses a Function/Event pairing convention, a common pattern of having a function call its corresponding event for special processing. This gives the application development process added flexibility. If the event fails or declines, the function does the default processing.

To develop Web applications using this framework, developers should be aware of the 80/20 rule. This means that 80% of your application can be built using the existing objects of the framework. For the remaining 20% you can extend or customize the framework to fit your unique requirements. From personal experience, this framework can get you to the 80% very fast. However, only your experience level will determine how fast you complete the remaining 20%. Until you gain more experience you may feel locked into the framework and may look for ways to circumvent it.

Productive 'Pagelet' Architecture
This forms the basis for Web development with EAServer and provides programming control over Web pages in conjunction with your Business Objects, which are all deployed as a single component called a gateway.

The Productive "Pagelet" Architecture (see Figure 2) is the predominant feature of the framework. It brings together most of the other features to make ViewPoint/EA an integrated Web development environment.

Gateway Page
The gateway page is a server-side script on the Web server, precoded to connect to EAServer, create an instance of the gateway component, and to pass the request to the gateway component. ViewPoint provides libraries for the implementation of a gateway page in either PowerDynamo or ASP. Support for JSP is not available yet, but is in the works.

Gateway Component
Applications developed in ViewPoint/EA are deployed to EAServer as a single component called the gateway. The gateway component contains all of your application objects and the ViewPoint library objects. The gateway component loads information from a requesting page into an HTTP context object. It then sets up and passes the request information to the Internet Application Object. I've found this makes for simple deployment and eliminates the need to deploy and to specify the role of multiple components in the transaction processing.

Internet Application Object
The ViewPoint/EA Application examines the HTTP context to determine which pagelet to render. It then creates the pagelet object and passes the HTTP context to the pagelet.

HTTP Context Object
In ViewPoint/EA these features form the basis of all HTTP requests. While this may be rigid, it also provides consistency to page requests. The HTTP context object contains information about the HTTP request. The HTTP context object is also where the resulting HTML is placed for response. The Universal Command Syntax (UCS) is used for all page requests in ViewPoint/EA. It's the only parameter you need to specify for all HTTP requests, and it can also be used for static pages.

ucs = <Pagelet>;<action>[;<vp_business_object>[;<id>]]

Pagelet
From experience, this is where you'll focus most of your development time. In Figure 2, the pagelet is called upon by the ViewPoint Internet Application Object and is passed an HTTP context object with request information. The pagelet performs the coordination of logic using various Business Objects to service the request, thereby generating the HTML. As a developer it's important to keep in mind that the pagelet performs no business logic, only presentation, and that the Business Object performs only business logic and no presentation. Some developers may find it difficult to code a pagelet from scratch just by reading the documentation. I found that looking at the examples in the demo and tutorial is the best way to get started.

HTML Controller
In Figure 2, a Controller, under the control of the pagelet, takes the information contained within a Business Object's DataStores and turns it into HTML that's consistent with the presentation characteristics of the specific controller. Currently there are only a few controllers for Web content in the framework. Even though they handle the majority of presentation styles, unique styles will require the developer to create custom controllers inherited from the base controller.

Other features:

  • ViewPoint Workbench: This feature is invaluable. The Workbench is a configurable application that comes with the framework. It uses the Microsoft Internet Explorer browser engine to allow you to develop, run, and test your Internet application on your desktop without having to connect or deploy to EAServer. It also contains a built-in stress and load-testing tool and a debugging tool.
  • VP/Jaguar Administration Application: This tool facilitates the configuration of your application deployed to EAServer. One drawback is that it has to be installed and run from the EAServer host. There's no remote capability unless you cheat by using Windows Terminal Services Client or PC Anywhere.
  • Session Management Component: The framework includes a prebuilt session management component that you deploy separately to EAServer.
  • HTML Templates: ViewPoint/EA supports the use of templates to give your Web applications a consistent look and feel. Prebuilt "include" tags allow for the display of your dynamic content and help facilitate page assembly and reuse.
Current User Base
At last count, ViewPoint/EA is being used by 20+ projects in a variety of sectors including e-commerce, government, the military, insurance, and health care.
To date, the largest Web application built using the ViewPoint/EA is a product requisition system called "iCart," used by the 15,000+ employees of Riverside County, California. iCart was built in a short time frame, approximately three months, and was named a Sybase Success Story in December 2000 (see http://my.sybase.com/detail?id=1011324).

Future Plans
The immediate goals for ViewPoint are to enhance the documentation, include additional subsystems for the Web, and provide support for JSP. AKI also has a framework for Java and JSP named Kona. It takes the same Business Object approach using a Java version of the PB DataStore.

Summary
Overall, the Business Object and Pagelet architectures of ViewPoint/EA provide a solid design for encapsulating your business data and processes and for partitioning it from your presentation logic. This allows your development team to concentrate on the business processes and presentation separately, making development more efficient and providing a good approach for building Web applications. The ViewPoint/EA Business Object architecture allows your business logic to be presented in either an HTML/Web interface or a Windows client/server interface. ViewPoint is designed to support this capability and requires no change in your Business Objects or DataWindows in order to deploy to either environment.

Hopefully, you've noticed that the ViewPoint/EA approach has a lot in common with other technologies such as Java. For instance, a JSP is similar to the ViewPoint Pagelet and a JavaBean is similar to the ViewPoint Business Object. Therefore, many of the concepts you learn from ViewPoint/EA can be applied to J2EE should you decide to change.

ViewPoint/EA provides an integrated framework of objects that work together as a ready-to-go application that developers can extend or customize to fit unique business requirements. Since ViewPoint pieces are designed to fit together, you don't need to focus so much on lower-level details.

Other frameworks tend to provide a toolbox of individual objects. There are strengths and weaknesses to both approaches. The toolbox approach allows the developer to get closer to the inner workings, thus giving more control. The disadvantage is you have to do more coding and assembly. While you can implement low-level functionality in other frameworks and Java, ViewPoint/EA provides a more 4GL RAD approach.

Nothing is a panacea and ViewPoint/EA is no exception. While it has good facilities for session and transaction management, it doesn't use the same facilities already built into EAServer. It also doesn't include the capabilities of the HTML/Web DataWindow component to create client-side JavaScript for simple validation. This is mostly due to its strict adherence to partitioning.

All said and done, the combination of a solid design and robust features in the ViewPoint/EA framework provide PowerBuilder developers with a fast path to building Web applications with EAServer.

More Stories By Joe Fontaine

Joe Fontaine is a senior programmer/analyst with over 15 years' experience in developing applications for Web, client/server, and mainframe systems using a multitude of tools, including Java, JSP, PowerBuilder, C++, EAServer, Sybase, Oracle, MS SQL, SQL Anywhere, and Cobol/IMS. He was the founder and president of the Riverside, California PowerBuilder User Group.

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.