Gagawa Project

I'm a co-founder of the Gagawa Project on Google Code.  Gagawa, formerly called the HTML Generator, is licensed to the Open Source community by HP under the MIT LicenseGagawa was created and maintained by myself and a colleague at HP.


What is Gagawa?

gagawa.pngGagawa is an HTML Generator library written in Java and PHP.

It allows developers to easily and dynamically build well-formed HTML in web or non-web applications. In Java, Gagawa is especially useful when traditional HTML generation engines such as Java Server Pages (JSP's) are unavailable. In PHP, Gagawa frees developers from hand-writing HTML in PHP web applications. Although you can build an entire site using Gagawa, most developers use Gagawa in conjunction with other libraries to build relatively small blocks or pieces of HTML. For example, Gagawa is perfect when a developer needs to return a small chunk of well-formed HTML in an AJAX response.

Under the hood, Gagawa uses Objects to represent each HTML element, or tag. For example, a <div> element is represented using a Div object. Similarly, developers can set attributes on these nodes using a setAttribute() method, or function, for each object. An HTML page, or DOM tree, is built by creating a set of element objects and appending them to each other in the correct order. To convert a Gagawa object hierarchy into a String which can be sent to a web-browser, the developer should call the write() method, or function, on the top-level element. The resulting String is well-formed HTML. Gagawa virtually eliminates missed closing tags and other mundane HTML typos that often haunt web-developers.

Gagawa, formerly the HTML Generator, was created by Chris Friedrich and myself at HP. It is licensed by HP to the Open Source community under the MIT License. Anyone is free to use Gagawa per the terms set forth by the MIT License.


Where can I get Gagawa?

The Gagawa Google Code project homepage can be found here.  You can browse, or checkout the Gagawa source via SVN.  To build Gagawa from source, you'll need a Java SE Development Kit (JDK) and Apache Ant.  For the latest code via SVN, non project members may check out a read-only working copy anonymously over HTTP:

svn checkout http://gagawa.googlecode.com/svn/trunk/ gagawa-read-only

If you're using Eclipse, and want to checkout the source directly into a new Eclipse project, you'll need Subclipse.


What languages does Gagawa support?


Gagawa supports Java and PHP.  Complete pre-packaged libraries are available for both of these languages on the Gagawa Project Homepage.


How do I use Gagawa?

Gagawa is a library, packaged in a JAR or PHP file.  In Java, the pre-built JAR contains a set of .class files that you can use in your project or application.  Gagawa was built for Java 6, but it should work fine in Java 5.  If you need coding examples that illustrate how to use Gagawa in Java, check out the examples package on SVN.  For examples using the Gagawa PHP library, see the PHP Example class.

Twitter (@markkolich)

Translate

About this Archive

Find recent content on the main index or look in the archives to find all content.