Sharing structured data

XML Magazine

Subscribe to XML Magazine: eMailAlertsEmail Alerts newslettersWeekly Newsletters
Get XML Magazine: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


XML Authors: Peter Silva, Stackify Blog, Mamoon Yunus, Progress Blog, XebiaLabs Blog

Related Topics: Java EE Journal, Apache Web Server Journal, XML Magazine

J2EE Journal: Article

How To Rapidly Build Native XML Applications With LAMP

LAMP as complexity reducer

Whatever happened to the days when a new college grad could be sent to a two-week developer's course and come back proficient enough to develop and deploy small departmental applications? J2EE - That's what happened!

Talk to most J2EE shops today and they'll tell you that expert developers are required, development cycles are long, modifications are difficult, and maintenance is costly. Development has become overly complex and enterprises are looking for new ways to streamline the process and reduce costs.

The LAMP software stack - Linux, Apache, MySQL, and PHP/Perl/Python - presents a strong alternative to traditional architectures, reducing complexity and cost while enabling new innovation. New technologies let developers take advantage of native XML to simplify the creation and delivery of rich Web 2.0 applications and services across the enterprise. To build such applications, corporate developers need an easier way to create new applications and services, using development environments that are de-coupled from deployment for maximum flexibility.

As new technologies evolve to support this demand, J2EE and .NET have a strong contender in enterprise LAMP.

The ActiveGrid Application Builder and LAMP Application Server are products that support native XML and leverage the proven Open Source LAMP stack. Using ActiveGrid, developers can deploy business applications in-house across commodity machines or to virtually any ISP. Below is a brief overview of ActiveGrid, including step-by-step instructions on how to use the ActiveGrid Application Builder and LAMP Application Server to rapidly build and flexibly deploy a simple Web application.

ActiveGrid Application Builder
The ActiveGrid Application Builder provides a native XML development environment. Developers use a consistent XML Schema and Web Services metaphor to integrate all data sources. The ActiveGrid Application Builder uses wizards for common tasks such as importing data sources into XML Schema and deploying applications. Working with this platform, it's easy to graphically build new applications based on standards such as BPEL (the Business Process Execution Language) to define application flow, XML Schema to represent data sources, XPath to specify queries, and XForms to define dynamic Web pages. All logic is automatically encapsulated as Web Services, which can be written in Python, PHP, Perl, or Java.

Fully integrated features such as a Web server, database, and debugger enable developers to run demonstration applications immediately and do real-time iterative development. In addition, the ActiveGrid Application Builder includes deployment wizards to seamlessly deploy applications to in-house commodity grids or ISPs hosting the LAMP platform.

ActiveGrid LAMP Application Server
The ActiveGrid LAMP Application Server extends the Open Source LAMP stack with features such as dynamic node registration, data caching, session management, transaction management, and interface fragment caching. These features are implemented as both an Apache Module and as libraries that run in ModPHP, ModPython, ModPerl, and Tomcat. The ActiveGrid LAMP Application Server interprets applications at runtime and can make decisions based on context, such as how to cache a set of data most appropriately across commodity machines, or how to render a form fragment for a particular type of client and user role.

How to Build a Native XML Application Using the Application Builder
Below is a brief introduction to how to install and build a simple Web application using the ActiveGrid Application Builder. A more detailed tutorial at http://www.activegrid.com/Tutorial.pdf explains each of the steps below in greater detail.

Getting Started
Before you begin, install the ActiveGrid Application Builder. Simply download and run the Application Builder Setup program from http://www.activegrid.com/try.php. The Application Builder comes with everything you need to start creating applications including a built-in Web server, SQLite database, and sample applications including Python Pet Store, Google Web Service Integration, and Amazon Web Service Integration. The Application Builder is supported on Linux, Windows, or Mac and can be installed and ready to use in less than 15 minutes.

Type of Applications
The Application Builder has support for building database-driven CRUD (Create, Retrieve, Update, and Delete) applications, Web Service operational applications, and integrated Web 2.0 applications that combine data from both traditional databases as well as Web Service operations. The Application Builder comes with an Application Wizard that will let you quickly create applications based on either a database or Web service. Below we will walk through building a simple database-driven Web application.

Creating a Simple Database Web Application
There are two ways to build CRUD (Create, Retrieve, Update and Delete) applications using Application Builder. You can choose to use the Application Wizard, which makes it quick and easy to build a simple application that supports the standard CRUD functions, or you can use the Process Wizard to create a starter process in which you can manually define your application flow by adding XForms, Services, and Actions to your application.

Follow these instructions to create a simple application using the Application Wizard, which will let you search, view, and maintain account information.

Create an Application: Select ToolsApplication Wizard to launch the Application Wizard. The Application Wizard will walk you through the following steps to create your application:

  • Step 1: Define the Data
  • Step 2: Define XForms to Generate
  • Step 3: Define Application Look and Feel
  • Step 4: Save your Application
All files generated by the Application Wizard are standard XML files; so once your application is created you can easily modify any part of it by using the built-in XML editors described below.

Step 1: Define the Data
The Application Builder represents all data sources (i.e., RDBMS, ERPs, or custom Web Services) as XML Web Services while still using native connectivity to access the data sources. From a developer's perspective, the metadata for all of the data sources are represented as XML Schema. The Application Wizard will walk you through a series of screens that will let you connect to your external database and select the complex types (tables) for which you would like to generate XForms. An XML Schema file (.xsd) will be generated to represent your data source. This schema file can be viewed and edited using the built-in Schema Editor. The Schema Editor allows all changes made to the Schema file be exported back to the original data source.

More Stories By Wendy Schott

Wendy Schott is a product manager for Active-Grid, an enterprise LAMP company based in San Francisco. Prior to ActiveGrid, she was a systems engineer for NetDynamics, a J2EE application server ultimately acquired by Sun Microsystems.

Comments (2) View Comments

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.


Most Recent Comments
Enterprise Open Source Magazine News Desk 10/28/05 02:16:16 PM EDT

Whatever happened to the days when a new college grad could be sent to a two-week developer's course and come back proficient enough to develop and deploy small departmental applications? J2EE - That's what happened!

LinuxWorld News Desk 10/28/05 01:15:28 PM EDT

Whatever happened to the days when a new college grad could be sent to a two-week developer's course and come back proficient enough to develop and deploy small departmental applications? J2EE - That's what happened!