Copyright © 2006 Together Teamlösungen EDV-Dienstleistungen GmbH
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, without the prior written permission of the Together Teamlösungen EDV-Dienstleistungen GmbH.
Together Teamlösungen EDV-Dienstleistungen GmbH DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Table of Contents
Table of Contents
This document describes how to use Kelp to develop applications with XMLC for use with Enhydra and Enhydra Enterprise Server. It assumes that you have a basic Enhydra (Enterprise) Server, EAF (Enhydra Application Framework) and Eclipse understanding.
Kelp is a set of tools that extend a Java integrated development environment (IDE) to simplify the development of applications for Enhydra and Enhydra Enterprise.
Kelp provides the following tools and features:
Kelp Application Wizard
The Kelp Application Wizard generates Web applications using either the Servlet API or the Enhydra (EAF) programming model. It initially generates Enhydra Kelp sample projects which are demonstrating techniques for creating dynamic Web pages with XMLC Web applications.
XML Compiler integration
The Kelp XMLC tool lets you set XMLC options, select markup language files (e.g., HTML, XML) to compile, and call XMLC from within the IDE to create classes that generate web content dynamically.
The XMLC properties give you full control over how XMLC builds Document Object Model (DOM) classes from your HTML, XHTML, WML and CHTML files.
Kelp Deployer
The Kelp Deployer allows you to set up your project properties, copy static content to the document root, process templates, create and deploy the application deployable archives.
The Input Template property pages let you specify a list of strings to search and replace when you are generating files from templates.
DODS Generator
Dods generator runs ant based xml files (build_dods.xml and build_java.xml) for generating sql and java files.
Build integration
Through property pages, you can set up Eclipse to invoke XMLC (enabled by default) and the Kelp Deployer whenever you make or rebuild your Enhydra Kelp Eclipse project. This feature lets you quickly ensure that your files are updated without having to run the tools individually.
Table of Contents
This section outlines how Kelp can be used with an IDE to speed the development process. Using the Kelp tools and wizards together with those of the IDE, you can perform the following basic functions:
Within Eclipse you can generate a new Web Application or Enhydra Application (super-servlet style application), using the Kelp Application Wizard. The generated framework of files and directories provide a useful starting point for developing applications and services for Enhydra and Enhydra Enterprise Application Server.
The Kelp project properties consist primarily of XMLC and deployment options. XMLC options can be used to set the name for a generated class file, save the generated Java source-code files, and more. The XMLC options can be specified for a file, a folder, or the project. Project settings will be overridden by folder settings, and folder settings will be overridden by file settings.
Deployment properties specify what files to include in the deployable archive file and how to deploy the archive file.
Once you have generated or added the source files to your project, you can compile the project to generate the necessary classes. If you are using XMLC in your project, you must run the Kelp XMLC tool before compiling the rest of your source files.
NOTE: It is recommended to use 'Ant Rebuild' tool (action) for Enhydra Kelp project rebuild tasks.
After you have compiled your project you can use the Kelp Deployer to create and deploy an archive file. The Kelp Deployer only deploys to mapped drives.
if you are having trouble running your application, you can use the debugging capabilities of the IDE to isolate the problem. Eclipse supports debugging for applications running within the IDE. For additional information refer to "Debugging Kelp projects" ( html ).
Table of Contents
Kelp includes two sample projects that demonstrate how to use XMLC and EAF (Enhydra Application Framework) to create Web applications within Eclipse. If you are new to both Enhydra and Kelp, you can start learning Enhydra by running the Kelp sample application. The Kelp sample demonstrates only a small part of Enhydra's capabilities.
The sample project consists of four presentation objects that show some of the common uses of XMLC. Production Web applications normally contain at least three packages, including presentation, business, and data. For a detailed explanation on how you can separate applications into these three functional areas, see Getting Started with Enhydra (Enhydra Server Documentation).
Note: If you have moved a sample project after running the Kelp Deployer, run the Kelp Deployer again before using the sample.
Each servlet dynamically generates HTML, XHTML, WML and/or CHTML files by using XMLC. Those source files are located in a resources directory (of application presentation layer). Each HTML file is compiled into a class file using XMLC. There is a corresponding Java file that implements HttpServlet for each HTML file. These files work with the generated HTML, XHTML, WML and/or CHTML classes to create and process input from the Web pages. The Java files are located in the '<app_package_name>.presentation' package (by default).