Questions tagged [facade]

The Facade pattern is one of the Gang of Four's structural design patterns.

The facade pattern is a software engineering design pattern commonly used with Object-oriented programming. The name is by analogy to an architectural facade.

It is one of the Gang of Four's structural , first published in Gamma et al.'s book "Design Patterns: Elements of Reusable Object-Oriented Software".

From Wikipedia: The Facade pattern provides a unified interface to a set of interfaces in a subsystem. It defines a higher-level interface that makes the subsystem easier to use.


References

392 questions
5
votes
3 answers

How to hide __methods__ in python?

I just wondered, how to hide special __.*__ methods in python*? Especially I am using an interactive python interpreter with tab-completion, and I would like to display only the methods my modules expose ... thanks, / myyn / *(at least from the…
miku
  • 181,842
  • 47
  • 306
  • 310
5
votes
2 answers

Modules + Fascade + Mediator combination in JavaScript

I've finished reading a great article on http://addyosmani.com/largescalejavascript/ This article explains how to combine modules, a facade, and a mediator together for a JavaScript application. I can code what the article explains, but I don't…
Moon
  • 22,195
  • 68
  • 188
  • 269
5
votes
2 answers

What design pattern retrofit uses and how does it use it in Android?

I think Retrofit uses Facade design pattern Is it true, If so how does it use it ( Since Facade gives a common interface to set of subsystems - Thus client can interact with this interface ) Does retrofit uses any other design pattern, if so how…
Devrath
  • 42,072
  • 54
  • 195
  • 297
5
votes
0 answers

Is it a good practice to use facade pattern in angular for many services injecting in a class?

I have a dynamic form component that receive many services using angular DI system: export class CityFormComponent extends BaseForm implements OnInit { constructor( protected appConfig: AppConfig, protected…
HDM91
  • 1,318
  • 9
  • 16
5
votes
3 answers

Laravel notification email facade queue multiple users

Here is my code working to send notification email to multiple users $users = User::whereIn('id', $userIds)->get(); \Notification::send($users, new DealPublished($deal)); It works but if I want to delay it like that $users = User::whereIn('id',…
Simpledev
  • 598
  • 1
  • 11
  • 22
5
votes
2 answers

Is a 'Controller' an example for Facade pattern?

My question is simple. Today, there are a lot of frameworks for both front-end and back-end which implements MVC (Model-View-Control) architecture. Is 'Controller in MVC' an example for Facade Design Pattern?
5
votes
1 answer

Facade or Decorator

Context : I have a REST Service let's say CustomerService which for now has one method getCustomer(id, country). Now requirement is that depending upon country I have to perform different business logic like access different database or some custom…
Sikorski
  • 2,653
  • 3
  • 25
  • 46
5
votes
1 answer

Whats the point of using Facade with IoC in Laravel

I don't understand the point of Facade if you are going to inject your class into a controller as part of IoC. Say I have a custom facade called PostHelper. I have the following 2 functions: class PostHelper { public function __construct() {}…
Kousha
  • 32,871
  • 51
  • 172
  • 296
5
votes
1 answer

Laravel: do facades actually create new objects on calling methods?

I have a demo class normally bound via $this->app->bind('demo', function() { return new Demo(); } An set up a facade protected static function getFacadeAccessor() { return 'demo'; } The class itself looks like this class Demo { …
Luuk Van Dongen
  • 2,391
  • 6
  • 26
  • 40
5
votes
3 answers

Auto-generate a strongly-typed AppSettings class

Here's the question first: Is this possible? I'm taking my inspiration from Joe Wrobel's work (a redux of the forgotten Codeplex project). Here, you do your work on creating your profile for the provider, and it does the legwork of creating the…
Dan Atkinson
  • 11,391
  • 14
  • 81
  • 114
4
votes
2 answers

Facade patterns and Managers classes

http://developer.android.com/guide/basics/what-is-android.html See Android Architecture. Can we consider different managers like facade objects for different subsystems. For example,can we consider Resource Manager like a facade object to all…
user1074896
  • 1,025
  • 2
  • 15
  • 27
4
votes
3 answers

Trying to figure out if this code creates any benefit by using a Singleton

I'm working on a project where one of the co-developers (and previous developers) use a Singleton/Facade for just about every page of class that has a lot of method calls inside of it, but that don't actually maintain the data. For instance: public…
Cyfer13
  • 369
  • 7
  • 17
4
votes
1 answer

C++ Iterator Facade for sockets

I was wondering if there is a good implementation (library) of a C++ iterator facade around sockets. I've gone through the Boost Iterator library and ASIO, and can't seem to find anything. An open source solution would be great! I'm looking for a…
Gerdiner
  • 1,435
  • 3
  • 15
  • 19
4
votes
4 answers

c++ class design, base class inheritance, or facade design pattern

I have a dumb c++ design question. Is there a way for one class to have the same method names (hence, the same API) of the methods found in several classes? My current situation is that I have a situation where I have classes struct A { void…
Andre Marin
  • 540
  • 1
  • 6
  • 16
4
votes
3 answers

Programming Design Patterns: Facade or Not?

Another guy on our team has provided me a library as a jar for his web framework. Let's call this framework "My Friend's Framework". There's a particular class that I need from his framework. Half of the properties exposed by that class is what I…
chris
  • 3,820
  • 6
  • 36
  • 36