WEB4J Development Tools 4.10.0.0

WEB4J Development Tools 4.10.0.0

WEB4J Development Tools

See:
          Description

Packages
hirondelle.web4j.config Concrete implementation classes required by WEB4J.
hirondelle.web4jtools.codegenerator.action Generate the source code for the feature's Action class.
hirondelle.web4jtools.codegenerator.codes Code Tables for the application.
hirondelle.web4jtools.codegenerator.dao Generate the source code of the feature's Data Access Object (DAO).
hirondelle.web4jtools.codegenerator.feature Enter the basic info for your feature.
hirondelle.web4jtools.codegenerator.field Enter the fields (the data) used by the feature.
hirondelle.web4jtools.codegenerator.jsp Generate the view for the feature, as a JSP.
hirondelle.web4jtools.codegenerator.model Generate the source code for the feature's Model Object.
hirondelle.web4jtools.codegenerator.output Generate source code - JSP, Action, Model Object, DAO, and .sql file.
hirondelle.web4jtools.codegenerator.restart Start over, and begin inputing items for a new feature.
hirondelle.web4jtools.codegenerator.sql Generate the .sql file for the feature.
hirondelle.web4jtools.help Toggle display of help text on and off.
hirondelle.web4jtools.logview.directories Override log directory settings in web.xml.
hirondelle.web4jtools.logview.downtime List down time intervals for the application.
hirondelle.web4jtools.logview.parsedview List log records parsed into various fields.
hirondelle.web4jtools.logview.parser Parse log records into Model Objects.
hirondelle.web4jtools.logview.simpleview View log files as simple text, without parsing into log records.
hirondelle.web4jtools.logview.stats View stats on a log file, including a histogram showing relative frequencies of log levels.
hirondelle.web4jtools.metrics.base Enter root directory of the your project, and scan source files.
hirondelle.web4jtools.metrics.comments Identify classes having a lower than usual number of comments.
hirondelle.web4jtools.metrics.files Sortable listing of all files in the project.
hirondelle.web4jtools.metrics.histogram Breakdown of sizes of java source code files.
hirondelle.web4jtools.metrics.images List all image files, along with files that reference them.
hirondelle.web4jtools.metrics.jars List the names and versions of all jars in the target project.
hirondelle.web4jtools.metrics.lines List the number of lines of source code for each type of file extension.
hirondelle.web4jtools.metrics.tabs List files containing tab characters, and replace tabs with spaces.
hirondelle.web4jtools.metrics.tests List the test classes, and calculate the precentage of your classes that are tests.
hirondelle.web4jtools.taglet Taglets for extending javadoc.
hirondelle.web4jtools.util Utility classes.
hirondelle.web4jtools.webmaster.diagnostics Useful diagnostic information for solving problems related to the Development Tools application itself.
hirondelle.web4jtools.webmaster.logging Display logging configuration, and edit logging levels.

 

WEB4J Development Tools

Table of Contents

Overview
Code Generation
Source Code Statistics
Log Viewer
Settings in web.xml
Version History

Overview

This web app is a collection of simple but effective tools for web developers.

This web app is intended to be run locally as a tool for a single developer. Running this tool in a production environment is a grave security risk, and is highly discouraged.

The Code Generator module is intended for WEB4J applications, while the remaining modules are useful for web applications in general.

This web app does not use a relational database. It uses default settings in web.xml, and allows you to override some of those settings. Any overrides are simply stored in session scope.

There is a simple help system, available from the menu. When activated, help text is displayed to explain the content of each page. In addition, tool tips are often available for input controls and data listings.


Code Generator

The Code Generator generates .java, .sql, and .jsp source files for web applications implemented with WEB4J. This is a 'passive' code generator, not an 'active' one - once the code is generated, you may edit it as needed. This tool is meant as a simple aid to reduce repetitive typing of boilerplate code. It is not meant as a full application generator.

You are highly encouraged to review the generated code, to make sure it is appropriate to your needs. This is particularly true for the generated Model Objects, since they may have many variations regarding defensive copying, code tables, treatment of null arguments to the constructor, caching of the hashCode value, and so on.

Using the Code Generator

There are four pages (the links will work only if you are currently running the app under http://localhost:8080/):

You typically enter data in the order presented above: Feature, Fields, Output.

Modifying The Code Generator

Some users will want to modify or experiment with the code generator to better suit their needs. Items to modify might include :

File Generation

The Output page contains links for generating .java, .jsp, and .sql files. When you select a link, the corresponding source code is served in plain text. You may copy and paste this plain text into your development environment. In addition, there is a setting named BaseDirectoryForGeneratedFiles in web.xml which allow you to simultaneously save the generated source code as a file, directly to your local file system, as you view it. (This is one of the many reasons why this tool should only be run locally, for a single developer.)

Source Code Statistics

The following screens are provided for viewing important statistics about your application's source code : The pages that link to your files use file:// URLs. These are valid links, but some browsers will not follow such links, for security reasons. As a workaround, just copy the URL and paste it directly into the address bar.

Log Viewer

This module has the following screens :

When viewing logs in parsed form, this tool uses the format used by the default JDK loggers. If another format is used, you will need to make some coding changes, and provide a new implementation of the LogParser interface. See the LogParserInstance class as well.

The user interface makes references to Tomcat, but any container may be used. Tomcat emits several log files to the same directory. In practice, it is found that in almost all cases only one of these files (the localhostxxx files in Tomcat 5) contains information typically of interest to a developer. Thus, this tool includes a setting which distinguishes these files from the others.

Most logging screens in this tool use only the most recent log file in the given directories, since a developer is almost always interested in the most recent logging entries.


Settings In web.xml

This tool is controlled mainly by settings in web.xml. Many of these settings can be overridden by the user at runtime. The overrides are stored in session scope, and are not persisted.

The typical use case is to simply set these items for your current project.

ProjectName
Name of the project whose source code will be scanned. This is a default value, that can be overridden by the user.

BaseDirectory
Base directory of the project whose source code will be scanned. This is the root of the source tree. This is a default value, and can be overridden by the user.

BaseDirectoryForGeneratedFiles
Directory on the local system. Used for emitting generated source files directly to the file system. Must end with a separator. If you are using the package-by-feature style, then this directory will point to [project_root]\WEB-INF\classes\. The special value 'Disabled' will disable this feature, to avoid writing generated source files directly to the file system.

BaseURIForFetchingImages
URI for a running web application. Used only to present images, when listing image files and their associated references. Optional. If left blank, then no such images will appear in the listing of image files.

CharacterSetForGeneratedFiles
Character set used when writing generated source files to the local file system.

TemplatedPageClass
Package-qualified name of the application-specific utility class used for returning templated ResponsePages.

IgnorableFiles
Comma-delimited list. If the absolute file name contains one of these strings, then it is ignored entirely. It will not contribute to application statistics, either as a source file, or as a non-source file. (An example of a non-source file is an image file.) This setting is case-sensitive.

SourceFileExtensions
Comma-delimited list of file extensions to be considered as textual source files. All source files having one of these extensions will have their lines counted. Not case sensitive. Example value : .jsp, .jspf, .tag, .css, .rdf, .rss, .html, .txt, .xml, .java, .sql

ImageFileExtensions
Comma-delimited list of file extensions to be considered as image files. Not case sensitive. Example value : .gif, .jpg, .jpeg, .eps, .png, .ico

MarkupFileExtensions
Comma-delimited list of file extensions to be considered as markup files. Not case sensitive. Example value : .jsp, .tag, .jspf

ThresholdForLowComments
Integer in range 0..100, representing a percentage value. Refers to density of comments in java source files, as a percentage of all lines. Files with a low percentage of comment lines will be flagged for further examination.

UnitTestFingerprint
Text whose presence indicates that a java source file is a unit test.

AppLoggingDirectory
Directory containing logging output for the target application. Every file in this directory is assumed to be a logging file. Any files of zero size are ignored.

ServerLoggingDirectory
Directory containing logging output for the server. Not every file will necessarily be treated as a log file. See 'ServerLogFileStartsWith' setting below.

ServerLogFileStartsWith
Distinguishes the log file of interest from other files. This is useful for Tomcat, where by default several distinct log files are output to the same directory. Usually, only one type of log will hold the most useful information, such as stack traces and error messages from JSPs.

ApplicationLogFileEncoding
Character encoding of the target application's log files.

ServerLogFileEncoding
Character encoding of the server's log files.

NumSpacesForTabs
Used when replacing tabs with spaces. Must be 1 or more. Recommended values : 2,3, or 4.


Version 4.10.0.0

Published October 19, 2013 (uses web4j.jar 4.10.0).

Version 4.9.0.0

Published October 5, 2013 (uses web4j.jar 4.9.0).

Version 4.8.0.0

Published June 9, 2012 (uses web4j.jar 4.8.0).

Version 4.7.1.0

Published Spetember 24, 2011 (uses web4j.jar 4.7.1).

Version 4.7.0.0

Published Spetember 17, 2011 (uses web4j.jar 4.7.0).

Version 4.6.2.0

Published July 9, 2011 (uses web4j.jar 4.6.2).

Version 4.6.1.0

Published May 15, 2011 (uses web4j.jar 4.6.1).

Version 4.5.1.0

Published January 29, 2011 (uses web4j.jar 4.5.1).

Version 4.5.0.0

Published April 17, 2010 (uses web4j.jar 4.5.0).

Version 4.4.0.0

Published January 30, 2010 (uses web4j.jar 4.4.0).

Version 4.3.0.0

Published September 7, 2009 (uses web4j.jar 4.3.0).

Version 4.2.0.0

Published March 19, 2009 (uses web4j.jar 4.2.0).

Version 4.1.0.0

Published February 21, 2009 (uses web4j.jar 4.1.0).

Version 3.10.0.0

Published September 20, 2008 (uses web4j.jar 3.10.0).

Version 3.9.0.0

Published August 30, 2008 (uses web4j.jar 3.9.0).

Version 3.8.0.0

Published June 7, 2008 (uses web4j.jar 3.8.0).

Version 3.6.0.0

Published March 11, 2008 (uses web4j.jar 3.5.0).

Version 3.5.0.0

Published February 16, 2008 (uses web4j.jar 3.5.0). This is the first published version.


WEB4J Development Tools 4.10.0.0

Copyright Hirondelle Systems - Generated 2013Oct19.12.26