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
0 answers

Create a Public API from a Set of Classes in C#

I have a large collection of custom C# classes that roughly follow the MVC pattern that I reuse over and over to build GUI and command line PC applications with different groupings of functionality. For example there are classes for importing and…
Andy
  • 938
  • 1
  • 10
  • 21
0
votes
1 answer

Refactoring assemblies when implementing a Facade

I have two assemblies, API and a FacadeAPI. FacadeAPI makes using API simpler to use. Then I have a Main program that uses FacadeAPI assembly. So Main depends on FacadeAPI which depends on API. There is are a few relatively small classes (really…
Ivan
  • 7,448
  • 14
  • 69
  • 134
0
votes
1 answer

Can I use the Input::all() outside Laravel?

I've inherited a project that was 'plain' php i.e. it didn't use a Framework or other dependencies. I've been working on integrating Eloquent and Ardent (for self-validating models). I've installed them using composer and all seems to be working…
Sheldon
  • 9,639
  • 20
  • 59
  • 96
0
votes
1 answer

Create an object outside a facade class, does it break facade pattern?

In HomeCADEngine facade class I have a method "addRoom(room:Room)" and it will add this room to a ArrayList. But is it break facade pattern when we create a room outside facade class and then pass it into addRom() method??
SteveThai
  • 63
  • 1
  • 7
0
votes
3 answers

Should I separate data from Facade Class?

I'm making a "back-end" engine of HomeCAD. I have a facade class that do many things. But should I separate data (like array of object) from that class? Many thanks
SteveThai
  • 63
  • 1
  • 7
0
votes
1 answer

What is the difference between the read-only interface pattern and the facade pattern?

Say I write a facade for a class and expose all it's methods except for it's setters. What is the functional difference with the read-only interface pattern? Based on the wikipedia article on immutable interfaces I'd say the facade has the…
user8363
  • 1,299
  • 3
  • 13
  • 17
0
votes
1 answer

Facade vs. Adapter design pattern using network a stream

Let's assume that I have three SDK classes named Phone, DigitalClock and DigitalCompass which representing implicitly digital devices. These classes supports: PC-to-Device and Device-to-PC data stream. operations like Connect-to-PC or…
Eido95
  • 1,313
  • 1
  • 15
  • 29
0
votes
1 answer

how to define facade for a method that emits events in ScalaJS

I'm writing scalajs facade for pouchdb code : https://gist.github.com/chandu0101/62013de47bf5ee4d2412 how to define facade for API name changes which emits events and return a cancel method ..
invariant
  • 8,758
  • 9
  • 47
  • 61
0
votes
0 answers

PHP OOP with Facade Pattern who should print html?

i am developing an application with the Facade Pattern in PHP ( i was asked for this particular pattern ), after developing the classes and understanding how facade manages the complexity i came across a doubt: Who should print my HTML code? I mean…
ReDLaNN
  • 484
  • 4
  • 14
0
votes
1 answer

url facade in laravel 5

In L4 this worked perfectly: {{$o->surname}} In L5 it produces blank screen and I need to resort to this: {{$o->surname}} How to adjust syntax to make…
Peter
  • 2,634
  • 7
  • 32
  • 46
0
votes
1 answer

Laravel Moltin Cart call in custom repository

I installed Moltin Cart on Laravel 4.2 and configured it as documentation suggests. Everything work perfect when I'm calling it from controller. Like Cart::insert() etc. Problem is when I try to call same code in custom repository. I have this…
Remark
  • 31
  • 4
0
votes
1 answer

How to Persist data in One to One Relationship Using JPA JSF

At the First I will let u Know what i want to achieve and Later I will Show u the Problem. In the Above screen Title and Description is from the AboutUs Entity and rest of the fields are for GeneralImage Entity. Now what I want to achieve is when…
Zaheer
  • 123
  • 5
  • 14
0
votes
1 answer

concrete facade for JPA controller classes from abstract, generic facade

I have a few classes very like the following LinkFacade. How can I make a "generic" facade to eliminate, or at least reduce, the methods duplicated across the different "facade" classes? Example "facade": package…
Thufir
  • 8,216
  • 28
  • 125
  • 273
0
votes
1 answer

why does the facade pattern + revealing modular pattern "add security"?

REFERENCE According to reference: Below is a more advanced version of the facade pattern that adds security to internal methods. Question: Honestly what do they mean add security? Furthermore, what would be insecure example? Lastly, What would be a…
Armeen Moon
  • 18,061
  • 35
  • 120
  • 233
0
votes
1 answer

JPA facade fails to create (persist) entity -- why?

I'm trying to use a Facade class, which extends an abstract facade, to persist an entity with JPA. The database classes involved are: src/net/bounceme/dur/selenium/jpa/ ├── AbstractFacade.java ├── Feed.java ├── FeedJpaController.java ├──…
Thufir
  • 8,216
  • 28
  • 125
  • 273