Wednesday, October 3, 2007

File Structure

When develop a Sakai project, its structure is a thing worthy of concerning. Here it is:
  • app-name
    • api - project with all interfaces, model objects, and hibernate hbm files
      Deploy as a jar to shared [ no dependencies ]
      (optional) eclipse .project here (name the project -api)
      • src - includes interfaces, model objects, and hbm files
      • test - (optional) may include shared test data and mock objects which help other with tests
    • impl - project at this level
      Deploy as a jar, include in pack [api]
      (optional) eclipse .project here (name the project -impl)
      • src - includes java source for all implementations of apis
      • test - includes all unit and integration tests
    • pack - project for components stuff needed by Sakai (should just a set of spring config files)
      Deploy to components [impl (all in war bundle)]
    • tool - project for the tool (interface to the user)
      Deploy as a war [api]
      (optional) eclipse .project here (name the project -tool)
      • src - java src directory
        • java - any java code used for the tool only
        • webapp
          • app-name - JSF jsp files here
          • css
          • images
          • templates - RSF html templates
          • tools - Sakai tool.xml files goes in here
          • WEB-INF - lots of xml config files here (web.xml, applicationContext.xml, etc...
project.xml hints listed below each directory in italics, dependencies are in []

No comments: