Questions tagged [facade]
The facade tag has no summary.
                17 questions
            
            
            
                0
            
            votes
        
        
            
                6
            
            answers
        
        
            
                289
            
            views
        
        
            
            
            
        Design pattern for exposing different parts of interface to different entities
                    In a certain program I would like to have three objects, say, a, b, and c, with c being a shared private member (sub-object) of a and b. The data between the three objects shall only go this way:
a &...
                
            
       
        
            
                0
            
            votes
        
        
            
                2
            
            answers
        
        
            
                204
            
            views
        
        
            
            
        How to refactor code so that a facade class could be decoratable?
                    I've got a class that is a facade class (encapsulates complex-ish behaviour for reusability). It has a function called manage (the class is called Manager):
function manage()
{
    $entityBuilder = '...
                
            
       
        
            
                -1
            
            votes
        
        
            
                3
            
            answers
        
        
            
                939
            
            views
        
        
            
            
        What is the difference between Facade and God?
                    A Facade is a higher level API over a whole subsystem. A God is class that violates SRP. Where do we draw the line? Does the following code represent any of the two:
enum UnitType{Demon, Paladin};
...
                
            
       
        
            
                1
            
            vote
        
        
            
                1
            
            answer
        
        
            
                188
            
            views
        
        
            
        Does it make sense to have a facade centralizing events too?
                    From my understanding a facade is a class with the sole purpose of simplifying the use of a specific system/module behavior (its methods). It should not contain any relevant logic of the underlying ...
                
            
       
        
            
                1
            
            vote
        
        
            
                1
            
            answer
        
        
            
                101
            
            views
        
        
            
            
        Choosing which operations to perform in the front-end or the back-end
                    I am implementing a system where in the front-end, the user needs to select if option A or option B should be active. Depending on the option, a conversion module converts other input data for use ...
                
            
       
        
            
                0
            
            votes
        
        
            
                2
            
            answers
        
        
            
                1k
            
            views
        
        
            
        Separate DTOs consequently for each module?
                    Following the hexagonal architecture and package design you will have somewhere an entry point reaching to your core functionality. Often this is done by using a facade.
To hide the core logic from ...
                
            
       
        
            
                1
            
            vote
        
        
            
                3
            
            answers
        
        
            
                820
            
            views
        
        
            
            
        Is it good practice to create a facade only to be able to mock the wrapped implementation?
                    I'm currently writing unit tests for ASP.NET Core Controllers. Some controllers inject UserManager<T> which seems to be a really hard type to mock. After some attempts to mock or even fake it, I ...
                
            
       
        
            
                -1
            
            votes
        
        
            
                1
            
            answer
        
        
            
                741
            
            views
        
        
            
            
        What is the C++ equivalent of a logging facade in Java?
                    I'm currently writing a library in C++ and was wondering if I should log from within it. Googling the issue I came across this question but it makes reference to a logging facade. Is there anything ...
                
            
       
        
            
                1
            
            vote
        
        
            
                1
            
            answer
        
        
            
                1k
            
            views
        
        
            
            
        Decorator or Facade
                    I face an issue if to use a decorator or facade pattern to accomplish my needs.
Imagine a client wants to play a video. He can use the interface 
public interface IVideoPlayer
{
    // Prepares ...
                
            
       
        
            
                4
            
            votes
        
        
            
                1
            
            answer
        
        
            
                2k
            
            views
        
        
            
        Multiple Facade Classes must be combined in 1 Facade Class
                    Is this some rule that if I have multiple Facade classes they must be combined in 1 Facade Class?
For example, I have a Hospital System with different classes, like Appointment, Patient, Doctor, ...
                
            
       
        
            
                1
            
            vote
        
        
            
                2
            
            answers
        
        
            
                1k
            
            views
        
        
            
            
        Is it okay to put all your error handling on facade layer?
                    I am doing a Java Spring-Boot backend project and I am implementing a controller-facade-service pattern on my structure. 
So is it best to put all my error handling on the facade layer, while the ...
                
            
       
        
            
                0
            
            votes
        
        
            
                1
            
            answer
        
        
            
                655
            
            views
        
        
            
        Should Facade handle all exceptions or throw
                    I am trying to abstract the elasticsearch python client.
I have a method index document
def index(self, body, id=None):
        """
        Inserts one document into elasticsaerch.
        If id is ...
                
            
       
        
            
                0
            
            votes
        
        
            
                2
            
            answers
        
        
            
                107
            
            views
        
        
            
        Using typeless maps on api boundaries
                    What do you think about passing typeless maps to APIs (packages, systems, adapters) outer to Core Domain as in 1st Way below?
Strongly-typed objects are inside Domain API, and business rules are ...
                
            
       
        
            
                2
            
            votes
        
        
            
                5
            
            answers
        
        
            
                2k
            
            views
        
        
            
            
            
        Facade pattern or just expose child objects?
                    Wondering about pros and cons around a facade pattern implementation (or perhaps there is a better pattern I should consider), versus simply exposing a dependent object to a caller.
Consider the ...
                
            
       
        
            
                -6
            
            votes
        
        
            
                1
            
            answer
        
        
            
                1k
            
            views
        
        
            
            
        C# Console application - Is the main method Facade [closed]
                    Currently I am making a console application. Is that right that the Main method of a .net console application is a facade? Is any console application entry method is a facade?
                
            
       
        