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

How ServiceLayer Facade should look like?

I have a simple N-Layer architechture: Presentation -> Service Layer -> Business Objects Layer - Data Access Layer. Service layer contain some Data provider services. I want to create facade for that layer. Have no idea how it should look. I think…
Yes Man
  • 321
  • 1
  • 5
  • 14
0
votes
1 answer

How do I use facade design pattern

From day today I want to leran more about, how an application is designed/structured. So I read something about the facade pattern an got a little question about this pattern. First of all, a short introduction to my project: My Project My project…
Chris
  • 599
  • 3
  • 11
  • 24
0
votes
1 answer

Passing App object to function / class in Laravel

I'm working with Laravel 4.2, calling a payment flow between form submit and the controller response. If the payment is accepted, a bunch of work is done behind the scene by the class PaymentProcessor use…
André Teixeira
  • 2,392
  • 4
  • 28
  • 41
0
votes
1 answer

too many Facades in laravel

if i created many Facades in Laravel application based on this answer, my application performance comes down?
0
votes
1 answer

Proper registering a Service Provider in Laravel 4.1 using $this->app->share()

I've written this image upload service but the problem is that I keep getting the following error. I've tried a number of suggestions but I don't seem to get over it. error type ReflectionException, message Class upload.image does not…
0
votes
0 answers

Is it okay to return facade after creating an object from factory?

I guess doing this functionally would not harm, but I wanted to understand if it causes ambiguity in understanding the code. I would like to explain using a simple example where I have a ProcessFactory which creates Process instances internally but…
cpz
  • 1,002
  • 2
  • 12
  • 27
0
votes
1 answer

GlassFish ManagedBeanCreationException and NullPointerException

I have written an EJB and a dynamic web project Eclipse on GlassFish server. I used DAO , Facade and JPA. Normally I am calling a method from my service it is giving these errors…
emreturka
  • 846
  • 3
  • 18
  • 44
0
votes
0 answers

Laravel 4: Using Facade and Eloquent in same workbench?

Suppose I have this Facade in one of my module: // workbench/vendor/module1/src/Vendor/Module1/Facades/Module1.php
user2002495
  • 2,126
  • 8
  • 31
  • 61
0
votes
1 answer

Can't use DB::table expression in my Facade Class - Laravel 4

Can't use DB::table in my class. I get a handleShutdown. Please can some one tell me why. I'm spending hours on this and I might be going mad. Follow below the code: app/acl/Acl.php namespace AccessControl; class Acl { public function…
0
votes
1 answer

Laravel: Facades in workbench unit testing

I have a Laravel code that throws an Exception using Lang facade as the message. This is in a workbench. If I try to test this code I get an error like : Fatal error: Class 'Lang' not found in... The program executes without problems if I try it…
Alwin Kesler
  • 1,450
  • 1
  • 20
  • 41
0
votes
1 answer

Create entity doesn't function

In my J2EE application I have the classe Reservation. To add a new Reservation I do: public boolean addReservation(Reservation r) { try{ reservationFacade.create(r); }catch(Exception e){return false;}; return true; } This add…
Ciro
  • 253
  • 2
  • 5
  • 23
0
votes
1 answer

Laravel facade for model failing: Cannot redeclare class Content

I want to add a Facade to my model named Content. But I always get the error Cannot redeclare class Content. Is that because the model is already loaded via the autoload? How can I fix this? I appreciate you help, thanks. This is how my composer…
Lukas Oppermann
  • 2,918
  • 6
  • 47
  • 62
0
votes
1 answer

Providing interface for objects within objects

I am creating a model as in MVC which is made of other objects. My single main model object contains the constituents object. My question is should I be asking the main model object for all the operations that will actually be carried out by…
zar
  • 11,361
  • 14
  • 96
  • 178
0
votes
1 answer

Laravel Facades - Passing parameter to __construct()

If I am creating a Facade, and I want to pass parameters before it becomes instantiated, what do I do?
Kousha
  • 32,871
  • 51
  • 172
  • 296
0
votes
1 answer

Session Facade and Data Transfer Object

Multiple fine-grained invocations of Entity Beans add the overhead of network calls, even multiple transaction. In other words, the risk is to have a solution that has a high network overhead, high coupling, poor re-usability and maintainability. We…
Kahn
  • 755
  • 3
  • 11
  • 28