Questions tagged [software-design]

Software design is the activity of deciding what properties, elements, responsibilities, interfaces, relationships and interactions are required in order to create an effective piece of software.

According to Wikipedia, software design is:

Software design is the process by which an agent creates a specification of a software artifact, intended to accomplish goals, using a set of primitive components and subject to constraints. Software design may refer to either "all the activities involved in conceptualizing, framing, implementing, commissioning, and ultimately modifying complex systems" or "the activity following requirements specification and before programming, as ... [in] a stylized software engineering process."

1966 questions
44
votes
1 answer

Repository and Data Mapper pattern

After a lots of read about Repository and Data Mapper I decided to implement those patterns in a test project. Since I'm new to these I'd like to get your views about how did I implement those in a simple project. Jeremy Miller says : Do some sort…
Saber Amani
  • 6,409
  • 12
  • 53
  • 88
43
votes
2 answers

Decompose microservices: Business capability vs Domain

As I read, there are two patterns to define one microservice, by business capability and by subdomain. But I still find it very ambiguous. I get confused how these two patterns differentiate from each other. Both of them revolve around activities…
necroface
  • 3,365
  • 10
  • 46
  • 70
41
votes
9 answers

What PHP application design/design patterns do you use?

Please share your favorite application design / design patterns for use in PHP with me. Some things I'd like to know: How your folders are designed How you use object oritentation in your PHP applications Do you have a standard way of dealing with…
Ali
  • 261,656
  • 265
  • 575
  • 769
40
votes
3 answers

Questions about VIPER - Clean Architecture

I've been reading about Clean Architecture from Robert Martin and more specifically about VIPER. Then I ran into this article/post Brigade’s Experience Using an MVC Alternative which describes pretty much what I'm currently doing. After actually…
38
votes
2 answers

What is the core difference of redux & reflux in using react based application?

Recently I conducted a preliminary study on developing an E-commerce site and discovered that redux and reflux both come from flux architecture in Facebook and that both are popular. I am confused about the difference between the two. When should I…
Zahidur Rahman
  • 1,688
  • 2
  • 20
  • 30
36
votes
6 answers

Adapter Pattern: Class Adapter vs Object Adapter

I have a few questions about the Adapter pattern. I understand that the class adapter inherits from the adaptee while the object adapter has the adaptee as an object rather than inheriting from it. When would you use a class adapter over an object…
Silverbolt
  • 7,093
  • 5
  • 20
  • 18
30
votes
7 answers

Should I throw on null parameters in private/internal methods?

I'm writing a library that has several public classes and methods, as well as several private or internal classes and methods that the library itself uses. In the public methods I have a null check and a throw like this: public int DoSomething(int…
user9993
  • 5,833
  • 11
  • 56
  • 117
30
votes
4 answers

the significance of java RMI please?

Why do people use RMI, or when should I use RMI? I read those tutorials about RMI on oracle's website. But it doesn't provide enough practical examples. To my understanding, software should have its modules as "unrelated and separated" as possible.…
28
votes
5 answers

Why encapsulation is an important feature of OOP languages?

I came across different interview where question was asked to me why encapsulation is used? Whose requirement actually is encapsulation? Is it for users of program? Or is it for co-workers? Or is it to protect code from hackers?
Shahzad
  • 550
  • 1
  • 6
  • 24
26
votes
5 answers

How to design an application in a modular way?

I am looking for pointers, suggestions, links, warnings, ideas and even anecdotical accounts about "how to design an application in a modular way". I am going to use python for this project, but advice does not need to necessarily refer to this…
mac
  • 42,153
  • 26
  • 121
  • 131
20
votes
2 answers

How do I choose heap allocation vs. stack allocation in C++?

One of the C++ features that sets it apart from other languages is the ability to allocate complex objects as member variables or local variables instead of always having to allocate them with new. But this then leads to the question of which to…
Omnifarious
  • 54,333
  • 19
  • 131
  • 194
20
votes
5 answers

Django - how to visualize signals and save overrides?

As a project grows, so do dependencies and event chains, especially in overridden save() methods and post_save and pre_save signals. Example: An overridden A.save creates two related objects to A - B and C. When C is saved, the post_save signal is…
Milano
  • 18,048
  • 37
  • 153
  • 353
20
votes
1 answer

How to understand the VIPER clean architecture?

I recently discovered VIPER clean architecture and I started looking for sample tutorials on applying this architecture on the Android platform. However, what I only found was sample projects which were confusing to me that is why I want to follow a…
20
votes
1 answer

Why doesn't JavaScript get its own thread in common browsers?

Not enough that JavaScript isn't multithreaded, apparently JavaScript doesn't even get its own but shares a thread with a load of other stuff. Even in most modern browsers JavaScript is typically in the same queue as painting, updating styles, and…
user777
  • 906
  • 5
  • 16
19
votes
9 answers

Keeping track of utility classes

I've recently been more and more frustrated with a problem I see emerging in my projects code-base. I'm working on a large scale java project that has >1M lines of code. The interfaces and class structure are designed very well and the engineers…
Asaf
  • 6,384
  • 1
  • 23
  • 44