Every day more organizations are embracing CBD (component-based development) for its promise of code reusability and, as a result, reduced development effort and faster time-to-market. In addition, Java is quickly being adopted as a standard for Web development.
Application server vendors are now selling components for e-commerce and vertical applications. For example, BEA Systems identified this trend early on, and understood how it could become a competitive advantage. To that end, BEA recently acquired The Theory Center, a software development firm focused on creating EJB (Enterprise JavaBeans) component solutions for e-commerce. Now BEA offers The Theory Center's e-commerce objects bundled with their own application server and is marketing the solution as its Commerce Server.
According to the GartnerGroup, by 2003 at least 80% of all new applications will be built using primarily components. New vendors, such as Evergreen, are joining the component market. Component marketplaces such as flashline.com and componentsource.com are making thousands of components readily available for developers.
CBD also makes it easier to create applications that separate both presentation and business logic. The complex logic is created in an EJB while the user interface is developed using JavaServer Pages (JSP) and/or servlets.
However, CBD introduces new challenges that developers must face, along with existing challenges that are inherent to developing complex applications. Creating a harness to test an object is a time-consuming task. Assembling components is still complex, requiring highly experienced Java developers to spend a lot of time coding. Integrating COM and EJB objects in the same application is nearly impossible.
Separating presentation logic from business logic on the user-interface side is a challenge developers face when trying to create an easy-to-maintain application. In addressing this issue of logic separation, Michael Lacy wrote in the May 2000 issue of JDJ (Vol. 5, issue 5): "The merging of Java and HTML frequently creates development headaches....Once the application is finished, our headaches turn into migraines upon the realization that we have to dig through all of the intermingled code for maintenance and enhancements."
Another factor is finding, training and retaining experienced Java developers. Even with thousands of developers learning Java and other advanced skills, the supply of qualified candidates is unlikely to catch up with demand anytime soon.
As development organizations struggle with these challenges, there's a growing demand for development tools that hide the complexity of an application and enhance productivity. A development environment is available that enables developers to visually assemble components while hiding their logic; this makes teams more productive by separating tasks according to the developer's skill level. This environment, Tango 2000 from Pervasive Software, is centered around visual programming techniques that accelerate the development process and enable developers to work at different levels based on their skill sets.
Tango 2000 makes it easy to build Web applications that incorporate a variety of reusable components. Currently it allows users to easily mix COM and JavaBean objects to implement business logic. A forthcoming Tango 2000 service pack will enable developers to incorporate Enterprise JavaBeans into Tango 2000-based applications.
Tango 2000 also introduces a new construct called a Tango Class File (TCF) that makes it simple to encapsulate frequently used logic into reusable components and to separate business logic from presentation logic.
Developers will be able to visually integrate COM objects, JavaBeans, TCFs and EJBs in the same manner. Once the object is located, Tango introspects it and finds its methods, dependent objects and parameters. Passing information to and from any of these object types is also possible within the Tango environment using Tango-specific logic. For example, depending on the developer's skill and the complexity of the function, a database query can be performed through a wizard, either visually using a Query action or with a direct DBMS command writing specific SQL code. Sending an e-mail is another function that can be done quickly and visually using Tango actions.
Using a Simple JavaBean Visually
Using a JavaBean or COM object is a three-step process:
- Navigate to the object and add it to the Tango Object Workspace. Tango 2000 introspects the object to enumerate any dependent objects. When you select the desired objects from the list, they're introspected further to enumerate the public methods and properties, as well as their parameter data types.
- Create an instance of the object by simply dragging it into your project. Give it a unique variable name and assign a scope to it. Tango provides a variety of scopes ranging from local through user to application scope. The life cycle of the object is governed by the reference count for the object's scope. When the object goes out of scope and there are no other users, the object is released.
- Use the object's methods and attributes by simply dragging them into your project (see Figure 1). Specify where to put the results, usually a local variable. Then for each parameter you can optionally provide literal values or Tango variable names that get resolved at runtime.
Integrating Advanced Services
By leveraging COM and JavaBean objects, you can integrate a wide variety of technologies into your Web application. Tango 2000 will automatically convert, by default, the results of object calls into HTML. Returned Java arrays are automatically converted into HTML tables that inherit the default style settings for tables. Encapsulating style settings in TCF methods makes it easy to adapt the Web site's themes with a single change.
It's important to use objects that are specifically designed for server-side usage, since they have no dependencies on a developer to operate a GUI. There are plenty of available COM objects suitable for server-side usage. For example, Microsoft offers the Windows Scripting Host object, the FileSystem object, and the Microsoft XML and XSL advanced parsers.
There are numerous sources of JavaBeans as well. For example, IBM's alphaWorks Web site has an interesting collection of JavaBeans. You can also use the JavaBeans that come with a variety of SDKs. Novell and Netscape also provide JavaBeans with an interface to their directory services.
Making Object Reuse Even Easier
Some objects are specifically designed to be used only in pure Java applications.
Occasionally you may prefer to wrap these JavaBeans in your own to simplify the reuse of the technology. The methods in the Netscape Directory Server SDK are good examples. In this case five LDAP operations are associated with doing a simple LDAP search (see Figure 2). Instead of doing all these tasks directly from Tango, you might craft a JavaBean with a method to encapsulate these steps. You also might want the JavaBean to return the LDAP results as an XML document. To simplify reuse of this JavaBean, the developer can create a collection of snippets that provides many simple and advanced examples of method invocations.
You could just as easily implement a COM object to interface with the ADSI (Active Directory Server Interface) on Windows platforms. In fact, if you build a COM wrapper for ADSI with the same interface as the JavaBean wrapper for the LDAP server, the same Tango 2000-based application can be constructed to use either directory service.
Enterprise JavaBeans Made Easy
With the next Tango 2000 service pack (planned for this summer) you'll be able to use EJBs in your Tango applications. As before, simply navigate the Tango Editor to the location of the JAR, WAR or EAR to add it to your Object Workspace. You'll also be able to view the methods and properties of the EJB as easily as those of COM, JavaBean and TCF objects.
With the release of this new version, you won't have to deal with the complexities of Home and Remote interfaces, Deployment Descriptors, Application Server variations and so forth. Instead, you'll be free to devote all your energies to the task of implementing your business logic and crafting suitable presentation logic.
A True RAD Approach to Web Application Development
If you currently use components in your development projects, you already appreciate how important they can be in assembling a cutting-edge Web site in the shortest time frame possible and maximizing code reuse. The typical developer in Tango 2000 is able to implement a project in a fraction of the time needed in other Web development environments because it lets you stay focused on your business logic, not on the "plumbing" infrastructure that enables the application.
An ideal Web development team will consist of a group of individuals, each with different skill sets (see Figure 3). Senior developers needn't spend valuable time creating presentation logic or user interfaces. Instead, they can focus on the complex business logic that fully requires their experience. They can use a visual assembly tool to create a harness to test and demo the objects they're developing, and they can also create business logic inside this RAD environment.
A graphic designer typically focuses only on the presentation logic of the application using any HTML editor. The tool of choice is Dreamweaver given its easy integration into other environments including Tango 2000.
A third segment of the development team - Web developers with intermediate development skills - can be very productive assembling finished objects created by senior programmers, integrating them with the presentation logic and creating business logic that doesn't require the complexity of Java. These tasks can be accomplished quickly and easily with the Tango environment.
The catalog and shopping basket pieces of an e-commerce application typify business logic that can be developed entirely within the Tango environment, usually in less time than Java. The back-end integration with systems such as accounting and shipping is typically handled with an object. Tango provides native support for XML documents, allowing you to build portable and scalable B2B or B2C applications. Wireless applications are also created in a snap, given Tango's built-in WML support.
Efficient Code Reuse
Tango 2000 provides an extensive collection of snippets to simplify tasks ranging from Tango 2000 server configuration tuning to WML page crafting. Team members can create and share libraries of snippets, thus simplifying their reuse by hiding the complexity of object interfaces and avoiding typographical errors.
Pervasive Software offers it own collection of TCFs and other objects to simplify development efforts. Developed by customers as well as by Pervasive employees, these objects are available in the ComponentZone on the Pervasive Web site (www.pervasive.com).
When developing at Internet speed, you need an application server and a development studio that delivers on the promise of rapid Web application development. Tango 2000 allows developers to accelerate the development process from concept to working Web application in days rather than weeks or even months.
The Tango 2000 Development Studio is available for Mac OS and Windows 95/98/NT/2000, while the Tango 2000 Application Server is available on Windows NT, Linux, Solaris and Mac OS. Applications developed in Tango are truly cross-platform, so as your business grows, you can move your applications to more scalable platforms. Tango 2000 also supports load balancing across clusters of servers, allowing you to easily scale your Tango application to match your requirements. Tango 2000 Application Server also supports caching and database connection pooling to provide optimal performance for your Web applications.
Pervasive Software plans to release a new product before the end of the year that will allow developers to deploy Tango-developed applications to J2EE servers. This product will allow developers to create EJBs and servlets, as well as integrate objects using the same visual approach used to create Web applications in Tango.
CBD promises a more efficient way to develop applications with commercial, vendor-provided or internally developed objects. Using a visual development environment to test and assemble these objects significantly enhances productivity for all the members of the development team.
Jeff Chapman is a senior lead quality engineer at Pervasive Software.
Jeff can be contacted at:
Gerardo Dada is a Tango product marketing manager at Pervasive Software.
Gerardo can be contacted at: