Learning Patterns Your Source for Quality Technology Courseware

Practical Java™ Language Topics

The Java platform has many powerful capabilities to help developers in the day to day tasks of creating good software systems. Some of this are built into the langauge, and some are separate tools that have become widely adopted because of their usefulness.

This one day course looks at the following three tools that can be of enoromous help to programmers that are writing Java systems:

  • ant: A Java-based build tool that uses XML configuration files to control the build
  • JUnit: A testing framework that simpleifies writing and maintaing test code. This course uses JUnit 4, and the Java 5 annotations associated with it.
  • Logging with log4J, Commons Logging, or Java logging: Logging packages that make logging efficient and easy to use

These technologies are very powerful, yet it is easy to learn the basics in a very short time. This one day course provides those basics, and gives programmers the experience necessary to use these tools to be more productive and create better software systems.

Course Information:

Course Code: JPRACT

Price: $50

Duration: 1 day

Labs: many hands-on labs (minimum 50% of course)

Prerequisites: No programming experience necessary

Supported Software Environments:

Course Objectives:

  • Understand how ant and buildfiles work
  • Use ant to control a build; create buildfiles
  • Be familiar with testing and test-driven development
  • Use JUnit to create good testing structures for your Java code
  • Be aware of the different logging choices available in Java
  • Use the most popular Java logging frameworks to create good logging structures

Course Outline:

  • ant: Basics
    • ant Overview
    • Installing and Running ant
    • Buildfiles, Projects, Targets and Tasks
    • Properties
    • Creating Build Files
    • Paths(e.g. CLASSPATH, PATH)
    • Resource Collections - FileSets, DirSets, Files, PatternSets
    • Other Resource Collections and Selectors
    • LABS:
      • Running ant
      • Creating and Using Buildfiles
      • Using Basic ant Tasks
      • Working with Paths
      • Using Resource Collections
  • ant: Tasks
    • Overview of ant Tasks
    • The <javac> Task in Depth
    • The <java> Task in Depth
    • Creating Java Archives - <jar>, <war>, <ear>
    • File Related Tasks
    • Other Useful Tasks
    • LABS:
      • Working with <javac> and <java>
      • Creating Archives
      • Working With File Tasks
  • ant: Modularity
    • Properties Files
    • The <ant> Task and SubProjects
    • The <import> Task For Importing Buildfiles
    • LABS:
      • Working With Properties Files
      • Creating Modular Buildfiles
  • JUnit: Basics
    • JUnit Overview, Test Driven Development
    • Tests and Assertions
    • Running Tests
    • Working With Exceptions
    • LABS:
      • Writing Tests
      • Running Tests
      • Testing Exceptions
  • JUnit: Organizing Tests
    • Writing Fixtures - @Before, @After
    • Test Suites
    • Other Capabilities
    • The ant <junit> Task
    • LABS:
      • Using Fixtures
      • Using Suites
  • Logging: Basics
    • Logging Overview
    • log4j Overview
    • Loggers, Appenders, Layouts
    • Configuring log4j
    • Using log4j
    • LABS:
      • Setting Up log4j
      • Using Basic log4j Logging
  • Logging: More On log4j
    • Logger Heirarchy
    • Logging Levels
    • Working With Appenders
    • Using PatternLayout
    • LABS:
      • Working With Loggers
      • Working With Appenders
      • Using Layouts
  • Logging: Other Logging Frameworks
    • Java Logging
    • Apache Commons Logging