Skip to main content
Filter by
Sorted by
Tagged with
1 vote
2 answers
45 views

I have the code. @startuml interface DbReader{ {abstract} read() } interface DbWriter{ {abstract} write(obj) } class DbConcrete { read() write(obj) } DbConcrete .up.|> DbReader DbConcrete .up.|...
Alexander Rakhmaev's user avatar
2 votes
2 answers
85 views

I am wondering what can be the potential benefit if I start to split the interface of my repository which has GET/CREATE/DELETE/UPDATE methods and in one service I have like 10 entities which per each ...
hamidreza nasrollahy's user avatar
1 vote
2 answers
230 views

I have created this UML diagram which applies the Template method design pattern: Both concrete classes share a lot of the logic whithin the template methods createTask and completeTask, with small ...
Jose Robles Villares's user avatar
3 votes
0 answers
75 views

In a previous question on StackOverflow, I asked about preventing the Context class within a State design pattern from having too many responsibilities, and I received an answer on that (moving it all ...
Angel Hadzhiev's user avatar
0 votes
0 answers
18 views

I’m developing a shared library and using Interface Segregation. There will be multiple client apps using this library and I was wondering about how to name each interface. Some apps will share ...
Marty's user avatar
  • 1
0 votes
0 answers
80 views

I understand more or less the difference between them, with SRP telling that a class should only have one responsability, while ISP is more kind of looking from the client of a class point of view, ...
Jaime Arroyo Morales's user avatar
0 votes
1 answer
186 views

I have an interface with 9 methods each doing something different but in one context. That is, when I use dependency injection on this interface, all 9 methods are used in one specific scope. Should I ...
Szyszka947's user avatar
  • 1,048
0 votes
0 answers
83 views

Now in kotlin we have a possibility to implement the interface like this: interface AnimalStrategy { fun eat(): Outcome } Want to have Question: Is it possible to declare the interface in kotlin in ...
nusmanov's user avatar
  • 491
2 votes
2 answers
875 views

This is one of a number of things that's been bugging me for a while and for which quibbling over the correct interpretation of this has been leading me in a number of attempted coding projects to ...
The_Sympathizer's user avatar
0 votes
1 answer
116 views

Deprecation The supported way of marking functions as deprecated is something like this: type MyStruct struct { } // MyFunc returns hello // Deprecated: Use YourFunc func (m MyStruct) MyFunc() string ...
Brad Johnson's user avatar
  • 1,984
0 votes
2 answers
806 views

Is it possible to join different version of Entity Framework (Core) Entities from two applications based on EF 6 (with .NetFramework 4.0) and EF Core 5.0 (.Net Standard 2.1) with the same DataBase ...
Ivan  Silkin's user avatar
0 votes
1 answer
221 views

in this question the author gives some reasons about why the default keyword is introduced into java language. One reason provided is to support the optional method. However, taking ISP into ...
choxsword's user avatar
  • 3,387
0 votes
1 answer
98 views

I have some questions regarding the decorator pattern. As I have understood it, the decorator pattern exists to add behaviour to an object, ie "decorating the object" so you can compose ...
Kevin. J's user avatar
0 votes
1 answer
36 views

I am new at JUnit. I try to write unit test of a simple service class which is "ProductService". Here is my test codes for "ProductService" public interface TestProductService { ...
EMRE BİNNAZ's user avatar
2 votes
1 answer
283 views

I'm having an issue regarding the simulation of public interfaces in java 8. I have this interface with this methods right now: public interface A<T> { void method1(T t) throws ...
carlos 's user avatar
3 votes
1 answer
1k views

I have some troubles with understanding these two principles. This is a bit long-read-question, so be patient. Lets assume that we have a class abstract class Shape { abstract void onDraw(); } ...
Sergey Shustikov's user avatar
4 votes
1 answer
404 views

I come from a Delphi and C# background so I understand interfaces from their perspectives. I have been doing C++ for a few years and still learning interfaces from its perspective. In my application ...
Thomas Bates's user avatar
34 votes
3 answers
15k views

Is there any core difference between Liskov Substitution Principle (LSP) and Interface Segregation Principle (ISP)? Ultimately, both are vouching for designing the interface with common ...
Nilanjan Saha's user avatar
7 votes
4 answers
1k views

As per the Interface Segregation Principle clients should not be forced to implement the unwanted methods of an interface ...and so we should define interfaces to have logical separation. But ...
Harpreet's user avatar
  • 1,607
2 votes
2 answers
88 views

How does the Interface Segregation Principle apply to convenience/helper methods? For instance: I want to create an interface that represents business partners. The bare minimum that I would need ...
Chris's user avatar
  • 21
6 votes
6 answers
2k views

I'm trying to follow the Interface Segregation and Single Responsibility principles however I'm getting confused as to how to bring it all together. Here I have an example of a few interfaces I have ...
Mike Eason's user avatar
  • 9,748
1 vote
1 answer
401 views

I was asked today in a interview what is the Interface Segregation Principle and what is the opposite case or principle to this one. The ISP is clear for me but I don't know the second part of the ...
fgonzalez's user avatar
  • 3,887
2 votes
3 answers
1k views

More than a few times I've found my self working with a class that is closed (I can't modify it) that I wish implemented a nice narrow interface particular to my needs. My client code is supposed to ...
candied_orange's user avatar
4 votes
1 answer
374 views

The usage of Adapter patttern in the java.awt.event package looks confusing to me. On the first hand it seems a clear violation of Interface Segregation Principle ( ISP ). Like the ...
aknon's user avatar
  • 1,458
7 votes
2 answers
2k views

Does inheritance from a class with unused methods violates the interface segregation principle? For example: abstract class Base { public void Receive(int n) { // . . . (some ...
astef's user avatar
  • 9,678