Instructor-led training
Java Best Practices and Design Patterns Training in Spokane Valley, Washington
Java programmers with experience with databases and with object-oriented programming techniques, will learn to create more complex and advanced programs using Java SE 7.
What you'll learn
Private Training for Teams
This course is offered as private, instructor-led training for organizations, onsite in Spokane Valley, Washington or live online. Dates, delivery format, and course content are arranged around your team's requirements.
This course is not currently scheduled as a public class for individual enrollment.
Request Group TrainingPrerequisites
Course Outline
What makes this material hard to master
The syllabus is less a language tour than a set of design decisions, each with trade-offs. Four areas cause most of the difficulty.
- Patterns are easy to name and hard to apply. The course covers Observer, Iterator, Template method, Strategy, State, Singleton, Data Accessor Object, Data Transfer Object, Composite, ServiceLocator, Proxy and Factory. A common misconception is that using more patterns means better design. Choosing between look-alikes, such as Strategy and State or Proxy and the adaptor pattern, is the real skill. So is recognizing when a pattern adds only indirection. The SOLID principles in the first module are the yardstick for those choices.
- Testing code that resists testing. JUnit, custom Hamcrest matchers, fake objects and mocks come first. Legacy refactoring follows, where you write tests for existing classes and methods before changing them. The order matters: the refactoring work depends on the testing skills.
- Metaprogramming trades compile-time safety for flexibility. Generics and enum types improve type safety. Annotations and reflection then move behavior to runtime. The syllabus also asks you to assess the disadvantages of reflection, which is a useful counterweight.
- Concurrency and memory. Race hazards, deadlocks, synchronization costs,
volatile,ThreadLocaland the Executors framework are covered together with garbage collection metrics, collector choice, finalizer hazards and leaks. Code that passes tests can still fail under load, which is why the course pairs these topics with load and stress testing.
The final module ties the pieces together: factories for loose coupling and Inversion of Control, with proxies and adaptors allocating responsibilities between components.
Who it suits and where it fits
This course is for working Java developers who are comfortable with object-oriented programming and database terminology. The prerequisites call for skilled, experienced Java users, so it is not a first Java course. It is aimed at teams that want shared design and testing practices, and at developers who maintain existing code and need ways to change it safely.
The course uses Java SE 7, which is out of support according to the Oracle lifecycle information HSG tracks. It therefore suits organizations that build, maintain or migrate systems on that version or earlier. Teams on a newer release can ask about private training tailored to the versions they use through a training proposal request.
- Before: developers whose Java is still shaky can start with Fast Track to Java 7 and OO Development, Rational Application Developer (RAD). It covers the same Java SE 7 era and builds the object-oriented grounding this course assumes.
- After: the course ends with unit testing, mocking and refactoring habits. Continuous Integration with Jenkins is a natural next step for running those tests automatically on every change.
The wider Java Programming courses and learning guide shows other paths.
Illustrative scenarios
The scenarios below are illustrations of how the course material can be applied. They are not descriptions of specific organizations or of the course's lab exercises.
- Taking over an untested module. A team inherits a legacy Java 7 service with no tests. Following the refactoring topics, they identify reasons to change it, write tests around existing classes and methods, and then restructure. They can use Strategy or Template method to remove duplicated branching, with JUnit and mocks guarding behavior.
- Intermittent slowdowns under load. A team might see response times degrade only at peak traffic. The performance topics apply here: measure response time, run load and stress tests, read garbage collection metrics, and check for finalizer or reference-related leaks. They would then look for contention, using Executors,
volatileorThreadLocalin place of heavy synchronization where it is safe. - Decoupling data access. A team separating persistence from business logic might use the Data Accessor Object and Data Transfer Object patterns. Factories and Inversion of Control would let components be swapped for fakes in tests, and logging through SLF4J would be configured so it does not cost performance.
AI coding assistants for these topics
Where they help. AI coding assistants can draft JUnit tests, suggest Hamcrest matchers, sketch mock setups and propose refactorings. They are also useful for explaining an unfamiliar pattern implementation or generating boilerplate such as a Factory or a DTO.
Where they fail.
- Concurrency. Suggested code may look correct but contain race conditions, misuse
volatileas a substitute for atomicity, or hold locks too long. Singleton implementations are a frequent trouble spot. - Version mismatch. Output often uses language features and APIs newer than Java SE 7, and logging configuration can differ between library versions. Check everything against the Java version and libraries the project actually uses.
- Generics and reflection. Generated code can compile with unchecked warnings or rely on reflection where a type-safe design would be better.
- Tests that prove little. A generated test may assert whatever the code currently does, including its bugs, and over-mock so that nothing real is exercised.
How to verify. Review every suggestion against the design principles and pattern intent covered in the course. Run the tests before and after any refactoring. Confirm performance claims with load tests and garbage collection metrics, not assumption. Have a person review all threaded code. Also check generated code for security issues such as injection and insecure deserialization.
Frequently asked questions
What level is this course?
It is a general-level, four-day course for experienced Java developers. It assumes solid Java skills, familiarity with object-oriented programming and knowledge of database structures and terminology.
Which Java version does it use?
The course is built on Java SE 7. Java SE 7 and earlier are out of support, so the course suits organizations maintaining or migrating systems on those versions. Private training can be tailored to the versions an organization uses.
What does the course cover?
The syllabus covers SOLID design, test-driven development with JUnit, logging, Hamcrest matchers and mocks, common design patterns, and refactoring legacy code. It also covers generics, enums, annotations and reflection, then performance tuning, garbage collection and threading. It ends with separation of concerns using factories and Inversion of Control.
Can it be delivered privately for our team, onsite or online?
Yes. HSG delivers private training for organizations at the client's location or live online. You can start with a training proposal request.
Can the content be customized?
Private courses can be customized, including tailoring to the technology versions your team uses. Describe your codebase and goals in a training proposal request.
Training locations
Java Best Practices and Design Patterns training across the U.S. and beyond.
We provide private Java Best Practices and Design Patterns training for organizations, onsite at your location or live online, throughout the United States and internationally.
View all Java Best Practices and Design Patterns training locations
Train your team with HSG
Private, instructor-led training customized for your organization.
- Onsite or live online delivery
- Customized curriculum
- For a single employee or an entire team
- Flexible scheduling
- Experienced instructors
Questions? Call us at 303.377.6176
or email info@hartmannsoftware.com
Ready to train your team?
Let's customize this training for your organization.
Tell us about your employees, your goals, and your preferred schedule. We'll prepare a training proposal covering scope, delivery format, and pricing.