Hide the business / service layer logic in the facade pattern

Hide the logic of the business / service layer in front is it a good practice?

The architect says that it is a good practice because in case of refactoring the code. We will only need to test the layers with facade.

c # – Dépendecy Injection vs. Singleton Pattern

I just read the documentation and tutorials about the dependency injection (DI) and the singleton model (SP). Everyone seems to say that DP is bad and that DI is the way to do it. Addiction injection tutorials use a framework such as Autofac or Ninject. They also explain that DI does not need a frame or container. I understand.

In reality, DI is not complicated. You create an interface and then you pass the implementation of your interface to the constructor.

But there always comes the moment when they explain that with Autofac, Ninject or another container, you have to define the lifespan of your class. So you have this line

kernel.Bind.AT() .InSingletonScope (); 

And again, yes. DI is simple but in the simple version of DI there is no Singleton. So, when you want to use DI for singleton behavior, you have to use a container, is not it? So, in the end, the container only contains the individual elements, right?

So, DI is not something we should be opposing to SP.
DI with container is something that I can oppose to SP.

So in the end why should not I use SP alone but trust a library to do it? What is the difference between DI using a single-scope container and SP?

$ 100 A5 book cover and 48 hour back pattern

My client is a real estate company in Myanmar. They recently decided to make promotional material. The designer of the house has created grounds for the cover of a promotional book, but they are not satisfied.

I'm looking for better designs than those attached to this Google Drive folder.
https://drive.google.com/open?id=17mVDoAsvb3cqRaPmj9XJTInhdPeNDmBJ

The design resources and previous work that they liked are included here.
https://drive.google.com/open?id=1p0WJFfSlvf5mVi_ptm_aB_5HWLSEJZzY

Art styles that they like
=============
Art deco or cartoon
minimal
Contemporary
Urban landscape

Take a look and if you think you can do better, please submit an application.
SEMrush

We need front and back covers so your design needs to be front and back.
Please add the logo somewhere but do not feel the need to make it the focal point of the design.
The deliverable files must be psd or ai. Feel free to use graphics resources.
The contest will last 48 hours from the first submission.

mistletoe design – UI Pattern for interdependent settings?

I've tried to create a configuration screen for a network device that must be configured by the user and that has several settings that influence the maximum values ​​of others. The user may need only one or two of these values ​​and the others must be self-optimized by the system.

I want to clarify the interdependence for the user and give him the freedom to define the values, but also allow him to make sure that the system automatically calculates the ones he has not adjusted. .

Is there an established model for such a scenario?

A very preliminary visualization of the problem:
enter the description of the image here

Thank you so much!

.net – Memento Pattern C # WPF

Beunas I have a problem that is to implement the Memento pattern in C # wpf, I owe it to a contract to create a backup with memento, then via a button to be able to replicate that information, I use the frame database entities.

a guide or help a lot thank you

data structures – How does the constellation pattern differ from the star and snowflake schema?

In the 3 main schemes (for my level) for data warehouse modeling are the star schemas, snowflake and constellation of fact. I understand that the star schema is a purely unnormalized schema, because dimension tables are not allowed in the normal form, to which the snowflake schema comes into play. In all other aspects, these schemas are identical. However, I do not understand how the constellation patterns of facts (hybrids between the two) work and what the difference is. In addition, if only the fact table is normalized, you can use the 3 types of data warehousing models.

Search an item in a list matching a pattern (using wildcards)

In one way or another, I have not managed to find anything related to that.
Suppose, in my Global list of variables, I want to perform a search to get all the items in the list that start with func. Try the naive choice of

Cases[Names["Global`*"], func_]

does not work, but I do not see how to make it work?

javascript – Regex pattern for any integer between -20 and 100, including -20 and 100.Numeric 3 characters maximum and no decimal

Can any one please confirm if the regex below will work for this condition

Any integer between -20 and 100, including -20 and 100.Numeric 3 characters max. And without decimals - E.g - -20, -18, etc.

^ ((\ - ([1-9]| 1[0-9]| 20)) | ([0-9]|[1-8][0-9]| 9[0-9]| 100)) $

Redefinition of an internal method with a decorator design pattern

I write an object-oriented code in which I try to use the Decorator model to implement various optimizations to apply to a family of base classes at runtime. The main behavior of the base classes is a complex behavior that is fully implemented in these classes, which actually calls for other internal methods to fulfill the different tasks.
Decorators will only customize the internal methods called by the complex behavior of the main class.

Here is a pseudo-code of what I'm trying to achieve:

interface I {
complex();
Step 1();
2nd step();
}
class C implements I {
complex(){
...
this.step1 ();
...
this.step2 ();
}
Step 1(){
...
}
2nd step(){
...
}
}
Abstract class Decorator implements I {
I've wrapped it up;
constructor (I obj) {
this.wrapped = obj;
}
complex(){
this.wrapped.complex ();
}
Step 1(){
this.wrapped.step1 ();
}
2nd step(){
this.wrapped.step2 ();
}
}
class ConcreteDecorator extends Decorator {
constructor (I obj) {
super (obj);
}
2nd step(){
... // customizing step2 ()
}
}

There are a variety of possible customizations that can be combined, and this is the main reason why I use a decorator pattern. otherwise, I will create tens to one hundred subtypes for each possible combination of customizations.

Now, if I try to create an object of the decorated class:

x = new C ();
y = new ConcreteDecorator (x);
y.complex ();

I'm waiting for it complex() method to run from the encapsulated kernel object, when using the 2nd step() decorator method. But that does not work that way, because the complex () method in the abstract decorator calls the method directly to the main object, which ignores the substitution. 2nd step() as a decorator.

My general objective is to allow decorators to dismiss one or more of stepx () methods and which would be invoked by the complex() method already implemented in the base object and invoking all the steps.

Could this feature be implemented using the Decorator design template? If so, how and if not, what is the appropriate design model to address this problem?

Update: The main classes use Template template define the steps of a long algorithm through complex() method. My intention is to override the individual steps Decorator Motif.

I have examined using Model chain of responsibility (Middleware), but I prefer to use the Decorator pattern, if possible for my use case, because it offers a better abstraction.

How does URL pattern matching work for proxy sources

Can you show examples for each model mapping field?

I ask how to get the main page then extract the URLs sub-pages to explore these pages and get proxy in these pages

Ty

Also, what does the text option only

@Sven