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

Is it a good practice to use Singleton Facades?

Is it a good practice to implement the Facade pattern creating Singleton objects? In the project I am developing, the facade object are going to be called from ASP.NET webforms server-side code, in order to encapsulate the domain…
dave
  • 2,291
  • 3
  • 19
  • 25
0
votes
1 answer

Rails: Presenters, Facades, and Helpers - where does the html markup go?

In a fairly large rails application we are running into the issue of overly complex views. Most of the views have too much logic. Views have between 2 and 4 related instance variables, and make use of various logic checks and helper methods to…
Drew
  • 738
  • 8
  • 15
0
votes
1 answer

Is ReentrantLock Facade design pattern implementation?

I am learning design patterns, and after going through the text book examples, I am focusing on JDK implementation of design patterns. ReentrantLock class in java.concurrent.Lock package use AbstractQueueSynchronizer(AQS) for providing locking…
AKS
  • 1,393
  • 3
  • 19
  • 29
0
votes
1 answer

Building a facade for an API, could get large and ugly, tips?

I'm working toward building out a facade for a third-party API we're using with an existing application. This API ties into an external service, and it is large and lousy for testability. I'm looking into ways of wrapping it for testing (to return…
user1017413
  • 2,023
  • 4
  • 26
  • 41
0
votes
4 answers

choosing the right pattern for object composite

There is a class named "Bill". Bill can be either "Electricity" , "Food" or "Customer" which are all POJO. So it contains three objects: public class Bill{ private Electricity el1; private Food el2; private Customer el3; …
Nil Null
  • 414
  • 5
  • 14
0
votes
1 answer

How to use the Facade.Instance method without object construction?

I only recently completed a unit on software patterns and am now attempting to comprehend the PureMVC framework. One thing has got my stumped however, something which is simple to the gurus here. I'm attempting to create an instance of the singleton…
halohunter
  • 191
  • 1
  • 6
0
votes
0 answers

Cant get Laravel 4 to work - Getting Class not found error

OK, so I am trying to create a working Facade for the Resizer bundle for Laravel 3 (https://github.com/maikeldaloo/Resizer). So far I have: Created a "Resizer.php" file with the code from the Reszier bundle and added the namespace…
Ben Thompson
  • 4,743
  • 7
  • 35
  • 52
0
votes
1 answer

Laravel class Alias and facade not matching the actual file name

I'm trying to find path location of Redirect class. Its facade return 'redirect' in getFacadeAccessor method.
Khanh Tran
  • 1,776
  • 5
  • 25
  • 48
0
votes
2 answers

Facade a class without writing lots of boilerplate code?

Let's say I have a class from a 3rd-party, which is a data-model. It has perhaps 100 properties (some with public setters and getters, others with public getters but private setters). Let's call this class ContosoEmployeeModel I want to facade this…
RB.
  • 36,301
  • 12
  • 91
  • 131
0
votes
1 answer

Laravel 4 facade class not calling functions on facade root class

I've set up a package in laravel 4 via the artisan workbench command. I created a facade class and followed this tutorial to come up with the following service provider, facade and root…
novon
  • 973
  • 3
  • 15
  • 30
0
votes
0 answers

null ejbFacade Java Hangman game

I'm trying to develop a hangman game. Mainly I have an xhtml file which calls a jugadorController.preparePartida(); the code is: public String preparePartida() { try { Map sesionMap =…
dak
  • 199
  • 1
  • 5
  • 18
0
votes
1 answer

Writing a Data Facade class library vs. Including it in the Data Access layer

I am writing a simple data- displaying app that has a UI presentation layer, a data access layer, and a commons layer which includes the data sets. Since this application will be relatively light weight (no writing / updating data) I figured it…
0
votes
1 answer

Problems retrieving appsettings added during application start

I appear to be having an odd issue where, in my global.asax in my Application_Start(), I have something that goes off to my database, gets all of my app settings from a name/value table, and then drops them into the application via…
Dan Atkinson
  • 11,391
  • 14
  • 81
  • 114
0
votes
1 answer

Facade/Service architecture

Before I ask my question I must describe how our applications are built. We run several web applications that uses ejb´s in the service layer. I try to describe the communication with a short example: A JSF bean (PersonHandler) calls a facade to…
user652158
0
votes
1 answer

When using facade session beans, why should we still use business session beans as well?

When using the facade design pattern to structure an application's business EJB layer, why should we still use session beans for the actual business logic? Is there a specific reason for not just using plain Java classes (if container managed…
Zecrates
  • 2,952
  • 6
  • 33
  • 50