Home Page
Main Page
 
 

Code Builder Application

The Code Builder application allows you to generate all of the necessary Java, JSP, configuration and database build scripts for a fully functional web application; the application even provides for the automated logging of all data management events in the application and hooks into a single-sign-on user authentication and authorization facility. The code leverages the Apache STRUTS framework, which provide a flexible, yet highly structured, extensible and maintainable code base. The information on this page provides an approach to designing, building, installing, and customizing a web application.

Design the Application

Before you start entering data into the Code Builder, you must first design your application. In general there are 4 basic activities to be performed in developing an application: define the scope and activities (functions) of the application, define the roles of the individuals and other systems that will be initiating or impacted by these activities, define the type of reporting that will be required by the individual supporting or managing the processes of the application, and based on the former three definitions, develop the data model which the application will require in order to support the defined activities, roles and reports; the output of this process is typically an entity-relationship-diagram (ERD) which describes each of the data entities, their related elements, and the relationships between the data entities.

Build the Application

Once you have developed the entity-relationship-diagram, you are ready to build your base application using the Code Builder. You begin by creating an application object, to which you add entity objects. Each entity object represents a data entiy, and for each entity object you will add a number of attributes (or elements). Entities will consist of elements which are text strings, integers, floating point numbers, and other entities and/or collections of these. Once you have completed entering this data into the Code Builder application, you can execute the build function which will generate all of the required code, package it into a .zip file, and download it onto your computer for installation on a J2EE application server.

Install and Compile the Application

Once the Code Builder has generated the code, uncompress the .zip file into the "webapp" folder of your application server or servlet container (Apache Tomcat is the appropriate default container). The Java source code files are in the "src" subfolder; these class objects need to be compiled and placed into a "class" subfolder. (There are some additional Java packages which will need to be placed in the "lib" folder of the application or the servers "common" directory; these libraries are needed for database access, xml processing, and the Struts framework implementation. These files are available in "requiredlibs.zip" in the application download or right here.)

You'll now need to run the make-database script on your database server in order to create the database to support your application. This script, which will be labeled as application name.sql, will be located in the "db" subdirectory of the project package. Once you have completed that, you will also need to modify the web.xml file of the application for the name, location and drivers required to connect to your database server and to make adjustments for your user authentication and entitlement facility (represented by the UserDBInitServlet). Note: if you are using a database other than MySql, you will need to modify the classes in the db\util subfolder to make use of the JDBC drivers specific to your database server.

With this done, you should be able to fire-up your application server, point your browser to the path of the web application, and your application forms and pages should be accessible. Note: some servers require that you explicitly identify accessible applications on your server within the server.config file; if so, make the addition of your new webapp to the config file before you start the server.

 
Copyright 2005-2007 Sheepdog Solutions, Inc. All Rights Reserved.