Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [architecture]

The high-level design and description of a software system. Architectural design distills away details of implementations, algorithms, and data representation to concentrate on the interaction of "black box" components.

Filter by
Sorted by
Tagged with
424 votes
33 answers

How do I create my own programming language and a compiler for it [closed]

I am thorough with programming and have come across languages including BASIC, FORTRAN, COBOL, LISP, LOGO, Java, C++, C, MATLAB, Mathematica, Python, Ruby, Perl, JavaScript, Assembly and so on. I can'...
297 votes
17 answers

Is premature optimization really the root of all evil?

A colleague of mine today committed a class called ThreadLocalFormat, which basically moved instances of Java Format classes into a thread local, since they are not thread safe and "relatively ...
214 votes
11 answers

What is the advantage of little endian format?

Intel processors (and maybe some others) use the little endian format for storage. I always wonder why someone would want to store the bytes in reverse order. Does this format have any advantages ...
Cracker's user avatar
  • 3,213
213 votes
16 answers

When using the Single Responsibility Principle, what constitutes a "responsibility?"

It seems pretty clear that "Single Responsibility Principle" does not mean "only does one thing." That's what methods are for. public Interface CustomerCRUD { public void Create(Customer ...
Robert Harvey's user avatar
169 votes
18 answers

Is it better to return NULL or empty values from functions/methods where the return value is not present?

I am looking for a recommendation here. I am struggling with whether it is better to return NULL or an empty value from a method when the return value is not present or cannot be determined. Take ...
P B's user avatar
  • 2,379
168 votes
8 answers

Criticism and disadvantages of dependency injection

Dependency injection (DI) is a well known and fashionable pattern. Most of engineers know its advantages, like: Making isolation in unit testing possible/easy Explicitly defining dependencies of a ...
Arkadiusz Kałkus's user avatar
153 votes
9 answers

Is there any "real" reason multiple inheritance is hated?

I've always liked the idea of having multiple inheritance supported in a language. Most often though it's intentionally forgone, and the supposed "replacement" is interfaces. Interfaces simply do ...
Panzercrisis's user avatar
  • 3,173
133 votes
7 answers

Clean Architecture: Use case containing the presenter or returning data?

The Clean Architecture suggests to let a use case interactor call the actual implementation of the presenter (which is injected, following the DIP) to handle the response/display. However, I see ...
swahnee's user avatar
  • 1,465
128 votes
10 answers

Don't Use "Static" in C#?

I submitted an application I wrote to some other architects for code review. One of them almost immediately wrote me back and said "Don't use static. You can't write automated tests with static ...
Infin8Loop's user avatar
  • 1,469
126 votes
4 answers

Which way are downstream and upstream services?

For a system that consist of multiple services calling each other (e.g. Front End -> Backend -> Storage), I often heard people using terminology such as "downstream" or "upstream" services. I'm not ...
user69715's user avatar
  • 1,369
124 votes
7 answers

What is the most effective way to add functionality to unfamiliar, structurally unsound code? [duplicate]

This is probably something everyone has to face during the development sooner or later. You have an existing code written by someone else, and you have to extend it to work under new requirements. ...
Coder's user avatar
  • 6,968
109 votes
5 answers

Aren't the guidelines of async/await usage in C# contradicting the concepts of good architecture and abstraction layering?

This question concerns the C# language, but I expect it to cover other languages such as Java or TypeScript. Microsoft recommends best practices on using asynchronous calls in .NET. Among these ...
corentinaltepe's user avatar
104 votes
9 answers

Why should I use dependency injection?

I am having a hard time looking for resources on why I should use dependency injection. Most of the resources that I see explains that it just passes an instance of an object to another instance of an ...
Daniel's user avatar
  • 1,045
100 votes
7 answers

What is the most accepted transaction strategy for microservices

One of the major issues that I have seen occur in a system with microservices is the way transactions work when they span over different services. Within our own architecture, we have been using ...
Kristof's user avatar
  • 2,241
98 votes
8 answers

RESTFul: state changing actions

I am planning to build a RESTfull API but there are some architectural questions that are creating some problems in my head. Adding backend business logic to clients is an option that I would like to ...
Miro Svrtan's user avatar
  • 1,139
97 votes
6 answers

Shared domain model between different microservices

Imagine a scenario of two different microservices. One to handle Authentication within the service, the other one takes care of User Management. They both have a concept of a User, and will talk about ...
Kristof's user avatar
  • 2,241
95 votes
7 answers

How do microservice system architectures avoid network bottlenecks?

I've been reading a lot about microservice architectures for server applications, and have been wondering how the internal network usage is not a bottleneck or a significant disadvantage compared to a ...
James Mishra's user avatar
  • 1,509
94 votes
17 answers

Is it a good idea to design an architecture thinking that the User Interface classes can be replaced by a command line interface?

In Code Complete page 25, it's said that it's a good idea to be able to easily replace the regular user interface classes by a command line one. Knowing its advantages for testing, what about the ...
91 votes
10 answers

Why did Alan Kay say, "The Internet was so well done, but the web was by amateurs"?

OK, so I paraphrased. The full quote: The Internet was done so well that most people think of it as a natural resource like the Pacific Ocean, rather than something that was man-made. When was the ...
Kyle L's user avatar
  • 939
89 votes
7 answers

Application layer vs domain layer?

I am reading Domain-Driven Design by Evans and I am at the part discussing the layered architecture. I just realized that application and domain layers are different and should be separate. In the ...
Louis Rhys's user avatar
  • 6,142
88 votes
9 answers

Should Repositories return IQueryable?

I have been seeing a lot of projects that have repositories that return instances of IQueryable. This allows additional filters and sorting can be performed on the IQueryable by other code, which ...
Travis Parks's user avatar
  • 2,543
81 votes
9 answers

How do huge open source libraries get maintained while having code far from "clean code" practices?

I'm still inexperienced to write high quality code, so I read books addressing the issue such as Clean Code by Robert C. Martin, and keep checking code of well-known libraries to improve my skills. ...
Islam Salah's user avatar
79 votes
17 answers

How to train yourself to avoid writing “clever” code? [closed]

Do you know that feeling when you just need to show off that new trick with Expressions or generalize three different procedures? This does not have to be on Architecture Astronaut scale and in fact ...
78 votes
6 answers

Why is it so bad to read data from a database "owned" by a different microservice

I have recently read this excellent article on the microservice architecture: It states that when you load a web page on Amazon, then 100+ ...
David's user avatar
  • 4,439
74 votes
9 answers

Can manager classes be a sign of bad architecture?

Lately I've begun to think that having lots of manager classes in your design is a bad thing. The idea hasn't matured enough for me to make a compelling argument, but here's a few general points: I ...
Paul's user avatar
  • 2,174
72 votes
7 answers

How essential is it to make a service layer?

I started building an app in 3 layers (DAL, BL, UI) [it mainly handles CRM, some sales reports and inventory]. A colleague told me that I must move to service layer pattern, that developers came to ...
BornToCode's user avatar
  • 1,273
71 votes
11 answers

Advice on designing web application with a 40+ year lifetime

Scenario Currently, I am apart of a health care project whose main requirement is to capture data with unknown attributes using user generated forms by health care providers. The second requirement ...
Pete's user avatar
  • 1,257
70 votes
12 answers

"Everything is a Map", am I doing this right?

I watched Stuart Sierra's talk "Thinking In Data" and took one of the ideas from it as a design principle in this game I'm making. The difference is he's working in Clojure and I'm working in ...
Daniel Kaplan's user avatar
69 votes
4 answers

Uncle Bob's clean architecture - An entity/model class for each layer?

BACKGROUND : I'm trying to use Uncle Bob's clean architecture in my android app. I studied many open source projects that are trying to show the right way to do it, and I found an interesting ...
Rami Jemli's user avatar
68 votes
13 answers

Why is it a good idea for "lower" application layers not to be aware of "higher" ones?

In a typical (well-designed) MVC web app, the database is not aware of the model code, the model code is not aware of the controller code, and the controller code is not aware of the view code. (I ...
Jason Swett's user avatar
  • 1,880
68 votes
6 answers

In microservice, is it single database or single database instance for each service?

I understand that a each service in a microservice architecture should have its own database. However, by having its own database, does it actually mean simply having another database within the same ...
xenon's user avatar
  • 887
66 votes
19 answers

Dealing with awful estimates

A recent project I worked on was proven to be severely underestimated by the architect. The estimate was out by at least 500%. Unfortunately I was brought onto the project after the estimate had ...
66 votes
14 answers

Is there any reason not to go directly from client-side Javascript to a database?

Possible Duplicate: Writing Web “server less” applications So, let's say I'm going to build a Stack Exchange clone and I decide to use something like CouchDB as my backend store. If I use their ...
Chris Smith's user avatar
60 votes
18 answers

Working on someone else's code [closed]

I have hardly a year's experience in coding. After I started working, most of the time I would be working on someone else's code, either adding new features over the existing ones or modifying the ...
60 votes
3 answers

How is architectural design done in an agile environment?

I have read Principles for the Agile Architect, where they defined next principles : Principle #1 The teams that code the system design the system. Principle #2 Build the simplest architecture ...
BЈовић's user avatar
  • 14.1k
58 votes
14 answers

Are there problems with using Reflection?

I don't know why, but I always feel like I am "cheating" when I use reflection - maybe it is because of the performance hit I know I am taking. Part of me says, if it is part of the language you are ...
P B's user avatar
  • 2,379
58 votes
2 answers

How would you implement Google Search? [closed]

Supposed you were asked in an interview "How would you implement Google Search?" How would you answer such a question? There might be resources out there that explain how some pieces in Google are ...
ripper234's user avatar
  • 1,114
58 votes
3 answers

Should Microservices talk to each other?

I'm designing an application using Micro-Services and I'm unsure on the best mechanism to use to collect data from multiple services. I believe there are two options: Integrate an 'inter-service' ...
KidCode's user avatar
  • 2,183
56 votes
13 answers

How to stop wasting time designing architechture [closed]

I have recently graduated from university and started work as a programmer. I don't find it that hard to solve "technical" issues or do debugging with things that I would say have 1 solution. But ...
JRG's user avatar
  • 411
54 votes
5 answers

How to deal with fear of taking dependencies

The team I'm in creates components that can be used by the company's partners to integrate with our platform. As such, I agree we should take extreme care when introducing (third-party) dependencies. ...
robinwit's user avatar
  • 650
54 votes
5 answers

Is "Clean Architecture" by Bob Martin a rule of thumb for all architectures or is it just one of the options?

I really liked the concepts in the video The Principles of Clean Architecture by Uncle Bob Martin. But I feel like this pattern is like a combination of Abstract Factory and Builder patterns at its ...
Vedant Agarwala's user avatar
54 votes
6 answers

Business logic: Database vs code [duplicate]

I'm a student of systems engineering, and all my teachers and friends (that actually work in the area) say that it is better to have as much logic as possible implemented in the database (queries, ...
Larizza Tueros's user avatar
54 votes
4 answers

Ways to share DTO across microservices?

I am designing a system to receive data from various types of sensors, and convert and then persist it to be used by various front-end and analytics services later. I'm trying to design every service ...
foxtrotuniform6969's user avatar
53 votes
12 answers

How to take a step back and look at code with fresh eyes? [closed]

I've spent the last year as a one-man team developing a rich-client application (35,000+ LoC, for what it's worth). It's currently stable and in production. However, I know that my skills were rusty ...
BenCole's user avatar
  • 665
53 votes
5 answers

Where should you put constants and why?

In our mostly large applications, we usually have a only few locations for "constants": One class for GUI and internal contstants (Tab Page titles, Group Box titles, calculation factors, ...
Tim Meyer's user avatar
  • 853
52 votes
7 answers

What is the preferred way to store application configurations?

Most of the time, I store development application config in root directory of the project, like this: app |-- config.json But that doesn't seem to be the best approach, since this config ends up ...
Rogach's user avatar
  • 719
51 votes
5 answers

How to keep consistency across the application architecture as a team grows?

As the sole developer in a startup, I had the luxury of being able to make a lot of decisions in the architecture and frameworks of our application. Fast forward 4 years and an acquisition later, I ...
Deekor's user avatar
  • 507
50 votes
11 answers

The meaning of asynchronous vs synchronous [closed]

What is the meaning of the words asynchronous and synchronous in computer science? If you google the meaning of the words you will get the following: Asynchronous: not existing or occurring at the ...
Mohammad Nazayer's user avatar
50 votes
2 answers

How do you handle shared concepts in a microservice architecture?

I am researching architectural patterns for an application I'm developing and a microservice approach seems like it would be a good choice but I am not sure how to handle interactions between the ...
anjunatl's user avatar
  • 618
50 votes
11 answers

Best practice or design patterns for retrieval of data for reporting and dashboards in a domain-rich application

First, I want to say this seems to be a neglected question/area, so if this question needs improvement, help me make this a great question that can benefit others! I'm looking for advice and help from ...
richard's user avatar
  • 3,335

2 3 4 5