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
0
votes
1 answer

Do ORM packages implement the Facade or Adapter pattern?

From my understanding the Adapter pattern is basically creating a wrapper on another class so that the class you are wrapping can be used by existing code. A facade is for changing an entire subsystem (so if you are dealing with a complicated…
Matthew Stopa
  • 3,793
  • 6
  • 42
  • 51
0
votes
1 answer

JAVA Facade pattern, correct implementation?

I have a client like with a constructor which is quite lengthy in terms of the argument list , e.g, Class Client { private ServiceA _serviceA; private ServiceB _serviceB; .... private ServiceE _serviceE; public Client(ServiceA…
deGee
  • 781
  • 1
  • 16
  • 34
0
votes
1 answer

Pathing issues in rails form_with for associated model

I am working on a project for which I have to analyse data inside a file, which the user should be able to upload. I have a model InputFile and chose to implement an analysis_facade for my Analysis model which bundles most of the functionality.…
0
votes
0 answers

Get exception from Facade constructor when resolving controller

I have simple controller with one dependency public TestController(ITestFacade testFacade) { _testFacade = testFacade; } and simple facade public class TestFacade : ITestFacade { public TestFacade() { throw new…
Raptor
  • 392
  • 1
  • 4
  • 21
0
votes
1 answer

In what scenario, you will choose Facade pattern and DI?

Please tell the real time scenario of Facade pattern and DI. Can I replace DI with Facade Pattern.
Brillian
  • 1,411
  • 2
  • 16
  • 23
0
votes
1 answer

facade.edit does not change the database

I am working on a JSF project that deals with MySQL DB. in my backbean method I did: entityFacade.edit(entity object); after that I wanted to make sure of the changes, I queried my database to retrieve the edited record, However, the retrieved…
Lujain
  • 21
  • 4
0
votes
1 answer

Linking container class properties to contained class properties

I'm working on a simulation of a cluster of solar panels (a system/container). The properties of this cluster are linked almost one-to-one to the properties of the elements -- the panels (subsystem/contained) -- via the number of elements per…
balletpiraat
  • 206
  • 1
  • 11
0
votes
1 answer

Laravel package development how do I use another facade in my package

I am creating my own Laravel package, in my package I have some views and I want to use the Form facade in one of my views, something like this: Form::open(). Is this possible, if so, how? This is my composer.json: { "name":…
Tom Bird
  • 999
  • 3
  • 17
  • 31
0
votes
1 answer

Interfaces and Facade Design Patterns

I have been using a facade design pattern to group together all the administrative funcionality I need in my program. in my class library Company.Infrastructure.Repositories.Administration I have: [Pluggable("Default")] public class…
Peter
  • 5,251
  • 16
  • 63
  • 98
0
votes
0 answers

Within an MVC architecture pattern, does it ever make sense to make a facade for a controller?

I am currently developing an application which has a service class that needs to post an order to an api and receive a response thats then validate. My question is would it make sense to create a static method on the controller in order to make the…
miguelsolano
  • 519
  • 3
  • 11
0
votes
1 answer

ConcurrentModificationException in facade implemention

I'm implementing this facade to wrap the LinkedList,TreeSet and HashSet classes in java. import java.util.Iterator; public class CollectionFacadeSet implements SimpleSet{ protected java.util.Collection collection; private…
tamir
  • 29
  • 4
0
votes
1 answer

How can I make a facade that uses a class that requires several repositories in Laravel?

I have been using Laravel for almost a year now, but I am very new to creating my own packages and using Contracts, Repositories, Facades, etc..., so please bear with me. I have having issues understanding if I am registering a facade correctly in…
Aaron Adrian
  • 521
  • 3
  • 12
0
votes
2 answers

Can I have an interface in facade design pattern?

I want to know if I have a facade class, can I create an interface and have multiple implementations of the class. E.g.: interface IUserDetailFacade{} public class UserDetailsFacade implements IUserDetailFacade{} public class UserDetailsLdapFacade…
Mohan Seth
  • 761
  • 2
  • 11
  • 20
0
votes
3 answers

What is the difference between Facade and Template Method Pattern in C#?

What is the difference between a Facade and a Template method pattern? Both of them provide high level views of the subsystem and hide it from the user. Facade Pattern internal class SubsystemA { internal string A1() { …
Lijin Durairaj
  • 4,910
  • 15
  • 52
  • 85
0
votes
1 answer

IRepository, IService, Unity in an ASP.NET MVC Application, reference question

I'm new to Unity, but this question is more generic to IoC, and I’m pretty new to implementing IoC as a whole. I have VS2010 solution with this project structure (simplified slightly): Business Objects – Folder DomainModel (Class Lib prj.) –…
SCEV
  • 129
  • 2
  • 11