On Java Development

All things related to Java development, from the perspective of a caveman.

Archive for January, 2014

Web App Deploy Check List

without comments

Introduction

This short post presents the items to check before creating that .war-file and deploying to the server. If your project is based upon baseproject or is a Maven-based project and using JSF then these steps will ensure surprises are kept to a minimum.
Read the rest of this entry »

Written by admin

January 30th, 2014 at 2:56 pm

Describing a Header/Detail Relationship using JPA Annotations With Hibernate

without comments

Introduction

This post shows how to describe a header/detail relationship (HDR) to Hibernate using files that have a composite key and those with identity records.
Read the rest of this entry »

Written by admin

January 30th, 2014 at 2:22 pm

JSF Resources

without comments

Introduction

Since the release of JSF 2.0 in July of 2009, JavaScript files, Cascading Style Sheets (CSS), images, and other files are placed into a resources directory in the root of the web application. For a Maven based application, this is the src/main/webapp/ directory. Sub-directories under this directory are referred to as libraries. Any library can be created there, and the libraries for css, images, and javascript are the common ones.
Read the rest of this entry »

Anatomy of a Web Application

without comments

Introduction

This post is for the reader who is curious about the architecture, components and technologies that make up a web application.
Read the rest of this entry »

General Rules of Thumb for Creating Files

without comments

Introduction

This post presents a few general rules of thumb to keep in mind when creating a new file or table. When it comes to naming conventions to be applied to files and fields, there does not appear to be an industry standard which then leaves the task of defining standards to the individual organization.
Read the rest of this entry »

Written by admin

January 24th, 2014 at 11:09 am

Using Exceptions to Create UI Messages

without comments

Introduction

This post shows how to write methods so that any processing errors, such as a “policy not found” error, can be managed effectively in a consistent way. The approach applies standard Java exception handling using try/catch blocks to throw errors back to the caller that started the process. The caller will then catch the error for further processing such as displaying the error to the user. For more information about standard Java error exception handling, see this link.
Read the rest of this entry »

Written by admin

January 23rd, 2014 at 6:35 pm

Date and Time Helper Class

without comments

Introduction

This post introduces the methods of a helper class designed to retrieve system dates and times and supports formatting of dates and times from other sources. Helper classes are used to provide a specific function to assist the overall goal of the application and are different from so-called Utility classes.
Read the rest of this entry »

Written by admin

January 23rd, 2014 at 6:01 pm

RichFaces Wait Dialog

without comments

Introduction

This post presents a so-called wait dialog using RichFaces 4. The purpose of the dialog is to act as a visual cue that a process is running and to wait while the process executes.
Read the rest of this entry »

Written by admin

January 23rd, 2014 at 5:53 pm

Posted in RichFaces

Tagged with

Java Standards and Best Practices

without comments

Introduction

This post focuses on standards and best practices to employ while developing Java applications and presents topics such as naming conventions, screen design, source control, etc.

Love ‘em or hate ‘em, standards are a necessary part of program development. Without them developmental chaos will reign supreme and usually add up to time, effort and money wasted, none of which are desirable.
Read the rest of this entry »

Written by admin

January 21st, 2014 at 6:01 pm

Posted in Standards

Tagged with

Startup Servlet

without comments

Introduction

This post is about using a servlet to perform the initialization of a web application. In an RPG program this would be performed using *INZSR but for web applications a servlet is used. This approach allows tasks to be performed only when the server starts. Since the servlet is part of the application the tasks performed are tailored for it alone.
Read the rest of this entry »

Written by admin

January 18th, 2014 at 6:47 pm