Skip to content

Add facade pattern. #79

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 4 commits into from
Aug 9, 2022
Merged

Add facade pattern. #79

merged 4 commits into from
Aug 9, 2022

Conversation

ilopX
Copy link
Collaborator

@ilopX ilopX commented Aug 9, 2022

Facade pattern

Facade is a structural design pattern that provides a simplified interface to a library, a
framework, or any other complex set of classes.

Tutorial: here.

About example.

This the very conceptual example rewrite from original source code java example

Diagram:

image

Client code:

void main() {
  final converter = VideoConversionFacade();
  final mp4Video = converter.convertVideo("youtubevideo.ogg", "mp4");
  // ...;
}

Output:

VideoConversionFacade: conversion started.
CodecFactory: extracting ogg audio...
BitrateReader: reading file...
BitrateReader: writing file...
AudioMixer: fixing audio...
VideoConversionFacade: conversion completed.

@ilopX ilopX merged commit 91dfc73 into RefactoringGuru:main Aug 9, 2022
@ilopX ilopX deleted the add-facade-pattern branch August 9, 2022 10:54
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant