mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-17 20:59:29 +00:00
docs: Content SEO updates (#2990)
* update yaml frontmatter format * update abstract document * update abstract factory * use the new pattern template * acyclic visitor seo * adapter seo * ambassador seo * acl seo * aaa seo * async method invocation seo * balking seo * bridge seo * builder seo * business delegate and bytecode seo * caching seo * callback seo * chain seo * update headings * circuit breaker seo * client session + collecting parameter seo * collection pipeline seo * combinator SEO * command seo * cqrs seo * commander seo * component seo * composite seo * composite entity seo * composite view seo * context object seo * converter seo * crtp seo * currying seo * dao seo * data bus seo * data locality seo * data mapper seo * dto seo * decorator seo * delegation seo * di seo * dirty flag seo * domain model seo * double buffer seo * double checked locking seo * double dispatch seo * dynamic proxy seo * event aggregator seo * event-based asynchronous seo * eda seo * event queue seo * event sourcing seo * execute around seo * extension objects seo * facade seo * factory seo * factory kit seo * factory method seo * fanout/fanin seo * feature toggle seo * filterer seo * fluent interface seo * flux seo * flyweight seo * front controller seo * function composition seo * game loop seo * gateway seo * guarded suspension seo * half-sync/half-async seo * health check seo * hexagonal seo * identity map seo * intercepting filter seo * interpreter seo * iterator seo * layers seo * lazy loading seo * leader election seo * leader/followers seo * lockable object seo * rename and add seo for marker interface * master-worker seo * mediator seo * memento seo * metadata mapping seo * microservice aggregator seo * api gw seo * microservices log aggregration seo * mvc seo * mvi seo * mvp seo * mvvm seo * monad seo * monitor seo * monostate seo * multiton seo * mute idiom seo * naked objects & notification seo * null object seo * object mother seo * object pool seo * observer seo * optimistic locking seo * page controller seo * page object seo * parameter object seo * partial response seo * pipeline seo * poison pill seo * presentation model seo * private class data seo * producer-consumer seo * promise seo * property seo * prototype seo * proxy seo * queue-based load leveling seo * reactor seo * registry seo * repository seo * RAII seo * retry seo * role object seo * saga seo * separated interface seo * serialized entity seo * serialized lob seo * servant seo * server session seo * service layer seo * service locator seo * service to worker seo * sharding seo * single table inheritance seo * singleton seo * spatial partition seo * special case seo * specification seo * state seo * step builder seo * strangler seo * strategy seo * subclass sandbox seo * table module seo * template method seo * throttling seo * tolerant reader seo * trampoline seo * transaction script seo * twin seo * type object seo * unit of work seo * update method seo * value object seo * version number seo * virtual proxy seo * visitor seo * seo enhancements * seo improvements * SEO enhancements * SEO improvements * SEO additions * SEO improvements * more SEO improvements * rename hexagonal + SEO improvements * SEO improvements * more SEO stuff * SEO improvements * SEO optimizations * SEO enhancements * enchance SEO * improve SEO * SEO improvements * update headers
This commit is contained in:
+17
-15
@@ -1,22 +1,24 @@
|
||||
---
|
||||
title: Table Module
|
||||
title: "Table Module Pattern in Java: Enhancing Maintainability with Organized Data Handling Modules"
|
||||
shortTitle: Table Module
|
||||
description: "Explore the Table Module pattern in Java with our in-depth guide. Learn how it simplifies database interaction by encapsulating data access logic, enhances code maintenance, and secures data operations."
|
||||
category: Data access
|
||||
language: en
|
||||
tag:
|
||||
- Data access
|
||||
- Encapsulation
|
||||
- Persistence
|
||||
- Data access
|
||||
- Encapsulation
|
||||
- Persistence
|
||||
---
|
||||
|
||||
## Also known as
|
||||
|
||||
* Record Set
|
||||
|
||||
## Intent
|
||||
## Intent of Table Module Design Pattern
|
||||
|
||||
Encapsulates database table data access logic in a single module, allowing for easy retrieval and manipulation of data without exposing the database structure.
|
||||
The Table Module pattern expertly encapsulates database table data access logic in a single, efficient module, ideal for Java applications.
|
||||
|
||||
## Explanation
|
||||
## Detailed Explanation of Table Module Pattern with Real-World Examples
|
||||
|
||||
Real-world example
|
||||
|
||||
@@ -26,7 +28,7 @@ In plain words
|
||||
|
||||
> The Table Module pattern centralizes and encapsulates database access logic for a specific table, simplifying data retrieval and manipulation while hiding database complexities.
|
||||
|
||||
**Programmatic Example**
|
||||
## Programmatic Example of Table Module Pattern in Java
|
||||
|
||||
In the user system example, the domain logic for user login and registration needs to be managed. By using the Table Module pattern, we can create an instance of the `UserTableModule` class to encapsulate and handle all business logic associated with the rows in the user table.
|
||||
|
||||
@@ -141,23 +143,23 @@ The program output:
|
||||
|
||||
This example shows how the Table Module pattern centralizes database operations for the `users` table, making the application more modular and easier to maintain.
|
||||
|
||||
## Applicability
|
||||
## When to Use the Table Module Pattern in Java
|
||||
|
||||
* Use when you need to manage data access logic for a database table in a centralized module.
|
||||
* Ideal for applications that interact heavily with database tables and require encapsulation of database queries.
|
||||
* Suitable for systems where the database schema may evolve over time, as the changes can be managed within the table module.
|
||||
* Particularly suitable for dynamic systems, the Table Module pattern ensures scalable database management as your Java application's schema evolves.
|
||||
|
||||
## Tutorials
|
||||
## Table Module Pattern Java Tutorials
|
||||
|
||||
* [Architecture patterns: Domain model and friends (Inviqa)](https://inviqa.com/blog/architecture-patterns-domain-model-and-friends)
|
||||
|
||||
## Known Uses
|
||||
## Real-World Applications of Table Module Pattern in Java
|
||||
|
||||
* In enterprise applications where multiple modules need to interact with the same database tables.
|
||||
* Web applications that require CRUD operations on database tables.
|
||||
* Java-based ORM frameworks such as Hibernate or JPA utilize similar concepts for managing data access.
|
||||
|
||||
## Consequences
|
||||
## Benefits and Trade-offs of Table Module Pattern
|
||||
|
||||
Benefits:
|
||||
|
||||
@@ -170,7 +172,7 @@ Trade-offs:
|
||||
* May lead to a large module if the table has many operations, potentially reducing readability.
|
||||
* Can become a bottleneck if not properly optimized, especially in high-load scenarios.
|
||||
|
||||
## Related Patterns
|
||||
## Related Java Design Patterns
|
||||
|
||||
* Active Record: Unlike Table Module, Active Record combines data access and domain logic in the same class.
|
||||
* [Data Access Object (DAO)](https://java-design-patterns.com/patterns/dao/): Provides an abstract interface to some type of database or other persistence mechanism, often used alongside Table Module to separate low-level data access operations from high-level business logic.
|
||||
@@ -179,7 +181,7 @@ Trade-offs:
|
||||
* [Repository](https://java-design-patterns.com/patterns/repository/): Abstracts the data layer, allowing more complex queries, whereas Table Module is usually simpler and table-centric.
|
||||
* [Transaction Script](https://java-design-patterns.com/patterns/transaction-script/): Organizes business logic by procedures where each procedure handles a single request from the presentation layer, contrasting with the Table Module's data-centric approach.
|
||||
|
||||
## Credits
|
||||
## References and Credits
|
||||
|
||||
* [Core J2EE Patterns: Best Practices and Design Strategies](https://amzn.to/4cAbDap)
|
||||
* [Java Persistence with Hibernate](https://amzn.to/44tP1ox)
|
||||
|
||||
Reference in New Issue
Block a user