Transaction Script Pattern
Learn Transaction Script Pattern (Enterprise Design Patterns, Enterprise Design Patterns) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
What is the Transaction Script Pattern? Transaction Script organizes business logic as a set of procedural methods/scripts - one script per business transaction/use-case (e.g. placeOrder() , cancelOrder() ), each running top-to-bottom: validate input, do the work, save results. There's no rich object model - just straightforward procedures operating on simple data. When It Fits Great for simple applications with straightforward, mostly-independent business rules - it's easy to read top-to-bottom and quick to write. It intentionally trades object-oriented elegance for procedural simplicity....