mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-10-03 05:20:09 +00:00
docs: update .editorconfig and reformat readmes
This commit is contained in:
1 parent
dfd34d890b
commit
de5a93c499
31 files changed
+387
-985
No files matched your search
@@ -8,9 +8,7 @@ tag:
|
||||
|
||||
## Intent
|
||||
|
||||
The Business Delegate pattern adds an abstraction layer between presentation and business tiers. By using the pattern we
|
||||
gain loose coupling between the tiers and encapsulate knowledge about how to locate, connect to, and interact with the
|
||||
business objects that make up the application.
|
||||
The Business Delegate pattern adds an abstraction layer between presentation and business tiers. By using the pattern we gain loose coupling between the tiers and encapsulate knowledge about how to locate, connect to, and interact with the business objects that make up the application.
|
||||
|
||||
## Also known as
|
||||
|
||||
@@ -20,9 +18,7 @@ Service Representative
|
||||
|
||||
Real world example
|
||||
|
||||
> A mobile phone application promises to stream any movie in existence to your device. It captures the user's search
|
||||
> string and passes this on to the Business Delegate. The Business Delegate selects the most suitable video streaming
|
||||
> service and plays the video from there.
|
||||
> A mobile phone application promises to stream any movie in existence to your device. It captures the user's search string and passes this on to the Business Delegate. The Business Delegate selects the most suitable video streaming service and plays the video from there.
|
||||
|
||||
In Plain Words
|
||||
|
||||
@@ -30,10 +26,7 @@ In Plain Words
|
||||
|
||||
Wikipedia says
|
||||
|
||||
> Business Delegate is a Java EE design pattern. This pattern is directing to reduce the coupling in between business
|
||||
> services and the connected presentation tier, and to hide the implementation details of services (including lookup and
|
||||
> accessibility of EJB architecture). Business Delegates acts as an adaptor to invoke business objects from the
|
||||
> presentation tier.
|
||||
> Business Delegate is a Java EE design pattern. This pattern is directing to reduce the coupling in between business services and the connected presentation tier, and to hide the implementation details of services (including lookup and accessibility of EJB architecture). Business Delegates acts as an adaptor to invoke business objects from the presentation tier.
|
||||
|
||||
**Programmatic Example**
|
||||
|
||||
@@ -81,8 +74,7 @@ public class BusinessLookup {
|
||||
}
|
||||
```
|
||||
|
||||
The Business Delegate uses a business lookup to route movie playback requests to a suitable
|
||||
video streaming service.
|
||||
The Business Delegate uses a business lookup to route movie playback requests to a suitable video streaming service.
|
||||
|
||||
```java
|
||||
|
||||
@@ -173,8 +165,7 @@ Benefits:
|
||||
|
||||
* Decoupling of Presentation and Business Tiers: Allows the client tier and business services to evolve independently.
|
||||
* Location Transparency: Clients remain unaffected by changes in the location or the instantiation of business services.
|
||||
* Reuse and Scalability: Business Delegate objects can be reused by multiple clients, and the pattern supports load
|
||||
balancing and scalability.
|
||||
* Reuse and Scalability: Business Delegate objects can be reused by multiple clients, and the pattern supports load balancing and scalability.
|
||||
|
||||
Trade-offs:
|
||||
|
||||
@@ -183,12 +174,9 @@ Trade-offs:
|
||||
|
||||
## Related patterns
|
||||
|
||||
* [Service Locator](https://java-design-patterns.com/patterns/service-locator/): Business Delegate uses Service Locator
|
||||
to locate business services.
|
||||
* [Session Facade](https://java-design-patterns.com/patterns/session-facade/): Business Delegate may use Session Facade
|
||||
to provide a unified interface to a set of business services.
|
||||
* [Composite Entity](https://java-design-patterns.com/patterns/composite-entity/): Business Delegate may use Composite
|
||||
Entity to manage the state of business services.
|
||||
* [Service Locator](https://java-design-patterns.com/patterns/service-locator/): Business Delegate uses Service Locator to locate business services.
|
||||
* [Session Facade](https://java-design-patterns.com/patterns/session-facade/): Business Delegate may use Session Facade to provide a unified interface to a set of business services.
|
||||
* [Composite Entity](https://java-design-patterns.com/patterns/composite-entity/): Business Delegate may use Composite Entity to manage the state of business services.
|
||||
|
||||
## Credits
|
||||
|
||||
|
||||
Reference in new issue
Block a user