Questions tagged [principles]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
6
votes
2answers
422 views

How do microservices and 12-factor app principles come together?

I'm wondering how service oriented architectures can follow the 12-factor principles. Designing an architecture as microservices means (to me) that you separate the features in services. This means ...
2
votes
1answer
109 views

When should concrete public methods be used if implementing an interface?

Recently I have been trying to avoid down-casting object types from an interface type to their concrete types, and 'if' statements that check for an objects concrete type at run-time. This has made me ...
-6
votes
1answer
333 views

violations of persistence ignorance

I have read about Persistence Ignorance principle, The ebook give some examples of violations of this principle, but I don't understand. Could you please help me to give some explain? Some examples ...
3
votes
2answers
248 views

I keep bouncing from “god function” to “tiny SRP functions” how do I break this cycle?

This question is important for me in growing in my technical abilities. I find I swing from end-to-end, like a pendulum, in writing code that is simultaneously DRY yet readable & efficient. And I'...
0
votes
1answer
93 views

Which principle is it to fetch only needed data?

It often makes sense to "fetch only what you need" for example if I should display only 10 rows of data then I should not fetch the entire data set because it would waste resources for a large data ...
1
vote
1answer
203 views

Rule of Least Power - what can you deduce from it?

https://en.wikipedia.org/wiki/Rule_of_least_power Does it mean that if you can do an animation with css you should do it with css instead of using javascript. Or if you can do an application in ...
11
votes
3answers
4k views

Dependency Inversion Principle vs “Program to an interface, not an implementation”

I'm trying to understand how the Dependency Inversion Principle differs from the "program to an interface, not an implementation" principle. I understand what "Program to an interface, not an ...
1
vote
2answers
385 views

What are the principles of open source projects? [closed]

Although its generally agreed by organisations like the OSI and the FSF what is and isn't an open source software (basically, the the terms of the source code license) what are the guiding principals ...
4
votes
4answers
6k views

Why is Encapsulation considered a primary principle in OOP?

I am currently trying to understand more deeply the 4 principles of OOP: Abstraction, Encapsulation, Inheritance, and Polymorphism. After studying the four principles, I don't fully understand why ...
7
votes
2answers
333 views

What is “Semantics visibility”?

I'm reading 97 Things Every Programmer Should Know, now I'm positioned in "Apply Functional Programming Principles", and there is a paragraph that says: ...A leading cause of defects in imperative ...
15
votes
2answers
1k views

Build one to throw away vs Second-system effect

On one hand there is an advice that says "Build one to throw away". Only after finishing a software system and seeing the end product we realize what went wrong in the design phase and understand how ...