Broadcast on Broadcast off
The Documentation for Project Zero has moved. Please update your bookmarks to: http://www.projectzero.org/documentation/
Table of
Contents...
Hide

Project Zero Developer’s Guide

Concepts and components
Basic concepts overview
Event processing
Writing Java handlers
Writing Groovy handlers
Firing events
Global Context
Global Context reference
Application directory layout
Virtualized directories
Assemble
PHP
Features and configuration
Configuration
Debugging
Dependencies
Packaging
Application classpath
Logging and tracing
RESTful resources
RESTful documentation
File serving
Response rendering
Validators and validation
HTTP error handling
Calling a remote resource
Using the Connection API
Sending an email using EmailConnection
Configuring destinations
Configuring protocols
Configuring connection handlers
Creating a connection handler
Creating a custom protocol transport
Simple logging connection handlers
Protocol reference
Client programming with Dojo
Runtime options
Deployment modifications
HTTP configuration
SSL configuration
Proxy configuration
Extending the CLI
Security considerations
Authentication
OpenID authentication
Extending security
Security tokens
CSRF prevention support
Extending token support
Leveraging TAI
User service
File based user service
LDAP user service
Extending user service
Security Utilities
Leveraging XOREncoder
Extensions
Atom support
RSS support
JSON support
XMLEncoder
REST to SOAP extension
URIUtils
Developer Web tools
Database setup tools
Configuring data access
Common query patterns
Advanced query patterns
Update patterns
Local database transactions
Extending data access
Configuration vendor differences
PHP data access
Resource model
Configuring ZRM
Resource model declaration
Programmatic model API
HTTP REST API
A ZRM mini tutorial
Active content filtering support
Default filters
Custom filters
Runtime management
Management commands
Zero socket opener
Other extension modules
Amazon E-commerce service
Flickr service
WeatherZero forecast service
Wikipedia service
Reference
Zero command line interface
JavaDoc - Public API
JavaDoc - Public SPI
JavaDoc - All Classes

 

Application directory layout

Project Zero applications have a particular layout for their directory structure. This layout provides both organization around the parts that make up your application and convention around how your application works. If you follow the conventions and structure defined by Project Zero, your application will be easier to construct and maintain and you will have less configuration information to provide with the application. The following table summarizes the directory structure.

zero-app-layout.jpg
Directory or File Description
app The scripts and templates for key components of the application.
app/errors Custom error pages that handle errors produced by the application. See the HTTP error handling section for more details.
app/resources The set of RESTful Resources provided by the application. See the Resource (REST) handling section for details.
app/resources/employees.groovy Each script under app/resources implements the behavior of a resource. See the Resource (REST) handling section for details.
app/resources/employees.bnd Each script under app/resources can having an optional bonding file of the same name which specifies the valid relationships between resources. See the Resource (REST) handling section for details.
app/scripts The shared scripts used within your application. Scripts in this folder are not directly accessible through a URL. They are included in other scripts. Normally this folder would contain script functions that are used multiple times by other parts of your application.
app/views The script implementations of views. Views are reusable pieces of rendering logic for creating presentation markup (HTML) or data (XML or JSON). Views are usually templates (.gt) or scripts (.groovy) that handle the RENDER event. See the Response rendering section for details.
classes The Java class files that are part of the application (in a directory structure that matches the Java package structure).
config The configuration files for your application
config/ivy.xml The dependency information for your application. See the Dependencies and packaging section for details.
config/logging.properties The logging settings for the application. See the Logging and tracing section for more details.
config/zero.config The configuration file for your application. See the Configuration section for more details.
java The Java source files. This is normally only present at development time and would be excluded at production time. The directory structure under java should match the Java package structure.
lib The jar files used by your application that are NOT included in extension modules declared in your ivy.xml file.
logs The log and trace files produced by your application when running. The exact contents depends on your log settings. See the Logging and tracing section for details.
public The Web accessible root folder of the application. http://localhost:{port}/ would serve the index page from this folder. Any subdirectories would be reflected in the URL. The public folder can contain static content (for example HTML, images, CSS, or JS), scripts (.groovy and .php), and templates (.gt). The file serving section contains more details.
reports The IVY dependency report shows details of the dependencies you have on extension modules. This information is useful both at development and production time to describe what your application is using.
.zeroresolved.properties This file is generated by the tooling and used by the Zero runtime. You do not have to edit or maintain it.
build.xml The Ant build file for building your Zero application from the command line.

r6 - 25 Oct 2007 - 20:32:44 - ngawor
Syndicate this site RSS ATOM
Copyright 2007 © IBM Corporation | Privacy | Terms of Use | About this site