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."

1697 questions
198
votes
12 answers

What is a software framework?

Can someone please explain me what a software framework is? Why do we need a framework? What does a framework do to make programming easier?
Anxious
  • 2,095
  • 2
  • 14
  • 4
150
votes
7 answers

What does "program to interfaces, not implementations" mean?

One stumbles upon this phrase when reading about design patterns. But I don't understand it, could someone explain this for me?
never_had_a_name
  • 80,383
  • 96
  • 257
  • 374
103
votes
6 answers

What is the benefit of using Fragments in Android, rather than Views?

When developing for Android, you can set your target (or minimum) sdk to 4 (API 1.6) and add the android compatibility package (v4) to add support for Fragments. Yesterday I did this and successfully implemented Fragments to visualize data from a…
Phil
  • 34,061
  • 21
  • 117
  • 154
99
votes
14 answers

Utility classes are evil?

I saw this thread If a "Utilities" class is evil, where do I put my generic code? and thought why are utility classes evil? Lets say I have a domain model that is dozens of classes deep. I need to be able to xml-ify instances. Do I make a toXml…
hvgotcodes
  • 109,621
  • 25
  • 195
  • 231
89
votes
15 answers

adapter-Any real example of Adapter Pattern

I want to demonstrate use of Adapter Pattern to my team. I've read many books and articles online. Everyone is citing an example which are useful to understand the concept (Shape, Memory Card, Electronic Adapter etc.), but there is no real case…
AksharRoop
  • 2,158
  • 1
  • 16
  • 29
66
votes
6 answers

What are the DAO, DTO and Service layers in Spring Framework?

I am writing RESTful services using spring and hibernate. I read many resource in internet, but they did not clarify my doubts. Please explain me in details what are DAO, DTO and Service layers in spring framework? And why usage of these layers is…
Prathap Badavath
  • 1,431
  • 2
  • 18
  • 24
59
votes
13 answers

Is it the best practice to extract an interface for every class?

I have seen code where every class has an interface that it implements. Sometimes there is no common interface for them all. They are just there and they are used instead of concrete objects. They do not offer a generic interface for two classes and…
the_drow
  • 17,134
  • 23
  • 116
  • 185
57
votes
19 answers

Encapsulation vs Data Hiding - Java

Interviewer: What is encapsulation and how do you achieve it in Java? Me: Encapsulation is a mechanism to hide information from the client. The information may be data or implementation or algorithm. We achieve this using access modifiers.…
Sandeep Jindal
  • 11,766
  • 17
  • 76
  • 117
55
votes
8 answers

Avoiding Circular Dependencies of header files

Do you have any good advice on how to avoid circular dependencies of header files, please? Of course, from the beginning, I try to design the project as transparent as possible. However, as more and more features and classes are added, and the…
Bunkai.Satori
  • 4,350
  • 12
  • 43
  • 74
54
votes
4 answers

what is the difference between a view model and a data transfer object?

I'm basing this question on Fowler PoEAA. Given your familiarity with this text, aren't the ViewModels used in ASP.NET MVC the same as DTOs? Why or why not? Thank you.
mkelley33
  • 4,670
  • 8
  • 44
  • 66
41
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
  • 5,999
  • 10
  • 49
  • 83
40
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…
Click Upvote
  • 235,452
  • 251
  • 553
  • 736
40
votes
4 answers

Onion architecture compared to hexagonal

Is there any difference between them (onion | hexagonal), from my understanding they are just the same, they focus upon the domain which is at the core of the application and should be technology / framework agnostic. What are the differences…
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…
Rodrigo Ruiz
  • 3,798
  • 5
  • 35
  • 67
40
votes
5 answers

Find Number of CPUs and Cores per CPU using Command Prompt

I am trying to retrieve the Number of CPUs and Cores per CPU using Command Prompt. I have executed the following command: wmic cpu get NumberOfCores, NumberOfLogicalProcessors/Format:List I get this error: wmic' is not recognized as an internal or…
Mustafa
  • 665
  • 1
  • 7
  • 15
1
2 3
99 100