Questions tagged [design-principles]

Design principles are ideas that guide developers toward certain goals in software design.

Software has many different desirable quality aspects -- among them are reliability, security, maintainability, efficiency, and size; and these are all impacted by choices made by the developers. Software design principles tend to focus on the maintainability aspects of quality: is the code loosely coupled, or does it have many dependencies that make it hard to use? Is the code highly cohesive, or is a collection of unrelated information needed to use a module? Is the code readable and understandable? Is the code testable? Is the code usable and reusable? Is the code simple or complex?

Various design principles can be used by developers to advise them in making choices that will yield highly cohesive, loosely coupled, simple, maintainable designs. The SOLID design principles are an example of specific design advice for object oriented projects. The Principles of User Interface Design provide design advice for creating user interfaces.

309 questions
-1
votes
1 answer

С++ wxWidgets: Code Architecture, Design Principles and Patterns

I recently started learning C++ and wxWidgets. Now I'm doing a calculator. When I start writing code, everything is ok, but when code gets bigger and bigger, it becomes a mess. I want to know any C++ GUI code architectures, design principles and…
-1
votes
1 answer

Is there any non written rule that an associatedtype shouldn't be constrained by a concrete type?

class Human { var name : String? } class Man : Human { var numberOfWallets : Int? } class Woman : Human { var numberOfPurses : Int? } protocol P { associatedtype Person : Human func printX(of person : Person) func…
mfaani
  • 33,269
  • 19
  • 164
  • 293
-1
votes
2 answers

Functional Principles in objectorientated Programs

today I saw a piece of code and I am thinking about it's sense. So I made a little Example where you can see how it works. As far as I know it should be nested functionality with heavy use of Lambda-Caculus like it is used in functional Languages.…
TheC
  • 15
  • 4
-2
votes
3 answers

Is it a good practice to have a java class with just having one static variable?

I need to store some value in a variable which can be written from one class and read from another class so basically I need to hide the writing class to reading class. So will it be a good option to have that variable in a separate class as a…
Hasindu Dahanayake
  • 1,344
  • 2
  • 14
  • 37
-2
votes
1 answer

Can I use abstract class (that implements interface) in designing a high level class diagram

Can I use abstract class (that implements interface) in designing a class diagram? My lead points what if someone uses interface directly? And he suggests design should stick to interface and classes? Any reason behind that?
-2
votes
1 answer

Does using virtual methods violates LSP( L part of SOLID principles) or there are some exceptions?

Does using virtual methods violates LSP( L part of SOLID principles) or there are some exceptions? Thanks in advance, Saghar Ayyaz
-2
votes
1 answer

Liskov substitution principle (Uncle Bob book)

I read in Agile Principles Patterns and Practices in C# (Uncle Bob) book that, the presence of degenerate functions in derivatives is not always indicative of an LSP violation, but it's worth looking at them when they occur. My question is, can…
-2
votes
1 answer

Hide button while EditText is empty (Design Principles)

What im wondering is, should i hide "continue" button while EditText is empty? Is there a principle not recommending that? Alternative solution is popping up error dialog warning user to enter text. Thanks.
eden
  • 5,876
  • 2
  • 28
  • 43
-3
votes
1 answer

Design Principles vs Design Patterns vs Algorithms

I am a beginner at programming and I have seen many posts talking about the difference between any two of them. But haven't seen a post that talks about the diffences between design principles, design patterns and algorithm. Can you please explain…
GRANZER
  • 355
  • 3
  • 13
1 2 3
20
21