Fiz application structure

The source directory for a Fiz application includes the application itself, a source or binary version of each extension used by the application, and a copy of the Fiz framework. The source directory has the following structure (appName refers to the name of the application, which is the name of the directory containing all of this information):

ext
fiz
lib
out
  appName
  classes
src
test
  jsunit
web
  static
  WEB-INF
    app
      config
      css
      ext
    web.xml
build.xml
fiz.properties
ext

Contains one subdirectory for each extension used by the application. The contents of the extension subdirectories are described under Fiz extension structure.

fiz

Contains a source or binary distribution of Fiz; created by the fiz tool when it creates the application. When the application is built and deployed it will normally use various files from this directory. However, you can modify the fiz.properties file to use a different installation of Fiz.

lib

Contains .jar files for packages needed by the application and not already provided by Fiz or one of the application's extensions. The contents of this directory will be copied to the directory WEB-INF/lib during deployment.

out

Information in this directory is generated automatically by various Ant targets. This directory can be deleted at any time: its contents can always be reconstructed later.

out/appName

ant build will create a deployable image of the application in this directory, which can be copied into the appropriate Tomcat directory for deployment. For example, in a simple deployment you can use the contents of this directory to replace the contents of the Tomcat directory webapps/ROOT. See Fiz application deployment structure for details on the contents of this directory.

out/classes

Compiled Java class files are placed here by Ant targets such as ant build.

src

Contains Java source files using the standard Java conventions for organizing packages in subdirectories. For example, classes not part of any package are defined in the top-level src directory, classes in the package com.mycompany.xyz are defined in src/com/mycompany/xyz, and so on.

test

Contains Java source files for Junit tests, organized using the standard subdirectory structure for Java packages.

test/jsunit

Contains source files for Javascript unit tests based on the Fiz jsunit framework.

web

Contains various files that are needed by the application at run-time. Files in this directory (and its children) will appear in the same locations in the deployed application. The subdirectory structure follows Java servlet conventions, with additional conventions for organizing Fiz applications and the extensions they use.

web/static

Contains static resources such as images and Javascript files that will be accessed via URLs when the application is deployed. For example, the URL http://www.mycompany.com/static/images/xyz.gif will map to the file web/static/images/xyz.gif. Application-specific resources can be placed in this directory and its children, except that the subdirectories fiz and ext are reserved for use by Fiz and extensions, respectively.

web/WEB-INF/app/config

Contains application-specific configuration datasets. Datasets can also be placed in this directory to override or extend Fiz configuration datasets such as main.

web/WEB-INF/app/css

Contains application-specific CSS templates. Files in this directory can also be used to override Fiz CSS templates.

web/WEB-INF/app/ext

Files in this directory and its children can be used to override the configuration datasets and/or CSS templates for extensions. Not commonly used.

web/WEB-INF/web.xml

The deployment descriptor for the application. Normally this file does not exist and the application will be deployed using a default web.xml provided by Fiz. However, if you create a deployment descriptor in this location that it will be deployed in place of the Fiz default version.

build.xml

Overall Ant file for the application. An initial version of this file with a basic set of targets is created by the fiz tool when it creates the application. You can modify this file to add additional targets.

fiz.properties

An Ant properties file specifying the location of the Fiz installation to use for this application. By default Fiz is expected to be located in the fiz directory, but you can modify this file to specify a different location.