The JPlate Framework is a framework/toolkit
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.
To work with the JPlate framework
source the following is required:
- Download the JPlate framework source -
preferably the latest version.
- Copy the JPlate framework source bz2 file to the "home" directory
where the JPlate framework source will "live."
- bunzip2 <JPlate framework source file>.tar.bz2
- tar xvf <JPlate framework source file>.tar
The next section describes the directory
The following represents the core
the "home" directory of the framework.
contains all the source code.
contains any executable functionality - for instance the Ant build
During building/compilation, the
following directory structure is
generated by the build script and is the "home" location for all builds.
"home" location for generating classes, javacc, etc.
compiled java source (class files)
generated javacc source
generated java documentation
generated JPlate files.
jar, and tar/bzip2 files usable for deployment of the framework.
The build script (jplate/framework/bin/build.xml) supports the
- all: generates
source, compile, build documentation and create deployment files.
- clean: removes the
- compile: generates
source and compiles.
- doc: generates
source, compiles and generated documentation.
generates java source from javacc files.
generates all source.
- help: displays help.
- jar: generates java
source, compiles and jars class files.
- java-doc: generates
source, compiles and generates java documentation.
- print-env: dumps
the variables used by the build script.
- tar: generates
source, compiles, generates java documentation, and tar/bzip2
generates source, compiles, generates java documentation and tar/bzip2
- tar-src: tar/bzip2
build the framework, Ant
There are two required properties depending upon how one builds:
- JAVACC_HOME: this
is mandatory regardless of build. It must point to the "home"
location where Javacc is
if using the default (all target), this property is mandatory.
value of this property will be used when building deployment
Assuming the aforementioned property has the value 1.1, the bz2 file
name generated for the framework source will be jplate-framework-1.1-src.tar.bz2.
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
JPLATE_FRAMEWORK_VERSION = 1.1
Online Java Documentation
The following links provide online
copies of the JPlate Framework java documentation:
Editing JPlate Template Files
The editor used to build the framework
is VIM (Vi IMproved)
that this editor is not required
JPlate template files contain java code, the following represents the
contents of filetype.vim
that will enable java
syntax highlighting (assuming syntax is on):
*.jp setfiletype java
Please note: filetype.vim
needs to be located
in the user's home directory in a directory named .vim (as in "dot