JPlate Framework/Template Engine

Objective

The JPlate Framework is a framework/toolkit designed to make building solutions in Java easier.  Ideally it will provide the "plumbing" by which constructing solutions (for instance applications) will be simplified.  To facilitate this simplicity, a template engine has been included that allows one to write java code without consideration for data/object types being used at that time (think of this as defining the algorithm now, providing the types later).

Framework Source Code

This section describes the source code, its structure and how to build.

Download Source

To work with the JPlate framework source the following is required:
The next section describes the directory structure.

Top

Directory Structure

The following represents the core directory structure:
During building/compilation, the following directory structure is generated:
Top

Building

The build script (jplate/framework/bin/build.xml) supports the following targets:
Please note:  to build the framework, Ant and Javacc are required.

Top

Required Properties

There are two required properties depending upon how one builds:
Top

Property File

As a convenience, the build script looks for the property file jplate-framework.properties in the user's home directory in a directory named .jplate (as in "dot jplate"). This file can be used to define the aforementioned properties as well as set additional properties that affect the build.  For instance, one can define the java compiler that should be used.

The following example illustrates the contents of a jplate-framework.properties file:

build.compiler           = jikes
JAVACC_HOME              = /home/tools/javacc/LATEST
JPLATE_FRAMEWORK_VERSION = 1.1

Top

Template Engine

Top

Miscellaneous

Online Java Documentation

The following links provide online copies of the JPlate Framework java documentation:
Top

VIM Editing JPlate Template Files

The editor used to build the framework is VIM (Vi IMproved) (please note that this editor is not required).  As the JPlate template files contain java code, the following represents the contents of filetype.vim that will enable java syntax highlighting (assuming syntax is on):

if exists("did_load_filetypes")
  finish
endif
augroup filetypedetect
  au! BufRead,BufNewFile *.jp        setfiletype java
augroup END

Please note:  filetype.vim needs to be located in the user's home directory in a directory named .vim (as in "dot vim").

Top

Links

Ant

JPlate Home Page

Javacc

Source Forge Project

Source tree

Top



SourceForge.net Logo