Java Programming Best Practices

PT2883
Training Summary
This four-day course provides the intermediate-level Java programmer with techniques and tools, but more importantly with the ability to recognize coding pitfalls and to take the opportunity to apply a variety of best practices when developing enterprise-class software. We review Java exception handling and logging APIs and discuss best practices for error handling, logging, and tracing in Java. We consider modern Java threading and concurrency solutions such as atomic operations, semaphores, and thread pools. And we look at Java Reflection, especially because it is essential to solving certain problems that arise later in the course, such as isolating test environments, certain factory patterns, and dependency injection.A multi-chapter module in the middle of the course introduces automated testing, JUnit, and test-driven development (TDD) practices, along with mocking tools and practices. The programmer is encouraged not only to test, but to write solid, fine-grained, and well-isolated tests, and to consider the design of classes under test to foster the best testability.Another module on code factoring, refactoring, and design patterns concludes the course. We start by recognizing some common coding pitfalls, for each of which we identify and explore better code-factoring approaches. This leads naturally to a discussion of design patterns, and we will have plenty of exercise in "gang of four" patterns to round out the class. Note that we intentionally provide more patterns material at the end of the course than we will be able to fit into the four-day timeline. We cover as much or as little of this as time allows -- most often a day to a day-and-a-half.
Prerequisites
Before taking this course, solid Java programming experience is essential - especially object-oriented use of the language, including interfaces and abstract classes, generics, and the Collections API.
Duration
4 Days/Lecture & Lab
Audience
This course is designed for intermediate-level Java programmers.
Course Topics
  • Exception Handling and Logging
  • Threads and Concurrency
  • Reflection
  • Automated Testing with Junit
  • Writing Tests
  • Test-Driven Development
  • Mocking
  • Testing Java EE Components
  • Refactoring to Best OO Practices
  • Recognizing and Applying Patterns
  • Creational Patterns
  • Behavioral Patterns
  • Structural Patterns

Related Scheduled Courses