Intro
About Chris
Overall presentation goal
Agenda
Designing business logic
Lots of procedural Java code
Example banking application
Example procedural design
Example procedural code
A seductive programming style
Unable to handle complexity
Today - OO is growing in popularity
Agenda
Using the Domain Model Pattern
Procedural versus OO
An example domain model
Benefits of the Domain Model Pattern
Quantifiably simpler methods
Drawbacks of the Domain Model pattern
When to use it
Agenda
Domain model building blocks
Entity
Value Objects
Aggregates
Repositories
Services
Factories
Role of Spring 1
Role of Spring 2
Agenda
Overview of code smells
Long method
Feature Envy
Data class
Primitive Obsession
Switch Statements
Data clumps
Agenda
Transforming procedural code
Refactoring to an OO design
Basic refactorings
Compound refactorings
Summary
For more information
Java is an object-oriented language and object-oriented design is considered by many to be a good way to tackle complexity. However, surprisingly many complex enterprise Java applications are written in a procedural style. The business tier consists of fat services and anemic domain models and consequently can be difficult to understand, maintain and test.
In this presentation, you will learn about how to improve your applications by implementing business logic using rich POJO domain model. We will compare and contrast a procedural design with an object-oriented design and describe the benefits of using an object-oriented approach.You will learn how to identify procedural code smells and eliminate them by refactoring your code - something you can start doing the Monday morning after the conference.
Chris Richardson is a developer and architect with over 20 years of experience. He's the author of "POJOs in Action", which describes how to build enterprise Java applications with POJOs and lightweight frameworks. Chris runs a consulting company that specializes in helping companies build better software faster. He has been a technical leader at Insignia, BEA, and elsewhere. Chris has a computer science degree from the University of Cambridge in England and lives in Oakland, CA.