Jaffa Logo
 
SourceForge.net
Home Contact Us FAQs Site Map
Source Forge: Homepage Bugs @ Sourceforge Mailing Lists @ Sourceforge Task Manager @ Sourceforge CVS @ Sourceforge
Jaffa Site
Jaffa Runtime
Jaffa RAD
Sub-Projects
Getting Started / Recommended Project Structure

Recommended Project Layout

Purpose

This overview shows how we typically start a new project with JAFFA. This will give you the directory structure, a place to put all your different objects, and a basic java package/class naming convention.

Many future documents that talk about packaging and deployment will make reference and assume the use of this structure, so for an easy life we recommend you follow it. It is however only a suggestion, and you can refractor what ever you want and use your own standards, it will just take more work later to refractor some of our tools and patterns.

Assumptions

In this layout below we have made some basic assumptions.

  1. The reference to the root being 'sandbox' is because we assume that on a large project you will be using something like CVS to manage your source code. In this case each CVS module would have this kind of structure, and the 'sandbox' would represent a local copy of that checked out module.
  2. Domain name is assumed to be example.com
  3. Application name is assumed to be MyApp

Suggested Directory Structure


Sandbox
    MyProject
        source
            java
                com/example/applications/myapp/modules/...
                    Create application specific java files, properties files in this folder
                jdbcengine
                    Create init.xml and domain mapping files for use of the  JDBC Persistence Engine in this folder
                resources
                    In this folder put config files like components.xml, business-functions.xml, menu-list.xml, etc
                patterns
                    In this folder create various sub-directories and keep your source XML files for pattern generation.
                    We normally recommend that you segregate patterns by type as well as module in here.
                Create the log4j-config.xml in this folder
            html
                WEB-INF
                    Create the web.xml, struts-config.xml in this folder
                    Extract struts*.tld and jaffa-portlet.tld from jaffa-html.zip into this folder
                jaffa
                    Extract jaffa/*.* from jaffa-html.zip into this folder
                myapp/...
                    Create application related JSPs, images, CSS files, javascript files... in this folder
            unittest
                java
                    com/example/applications/myapp/modules/...
                        Create unittest java files and any other supporting files in this folder
                    jdbcengine
                        Create init.xml and domain mapping files for use of the  JDBC Persistence Engine in this folder
                    AllTests.java
            httpunittest
                tests
                    Create HttpUnitTests in this folder
        lib
            Include Tidy.jar, dbConnectionBroker.jar, httpunit.jar, j2ee.jar, jaxb-rt-1.0-ea.jar,
            jaxb-xjc-1.0-ea.jar, jdom.jar, junit.jar, log4j.jar, struts.jar, xerces.jar, jaffa.jar,
            webmacro.jar, oracle12.jar, jaffa-tools.jar and any additional jars required by the application
        build
            Create Ant Build Scripts in this folder, and any properties files
            needed by the build script
        dist
            The output of the Ant Build Scripts (JARs, WARs, etc. etc.) will go in this folder.
            It is normally created by the ant script and can be deleted at any time.

Further Links


File: projectDirectoryStructure.html, Last Modified: Tue Jul 15 2003 at 4:02:03pm. This site has been built using PPWIZARD