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
316k views

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'...
293 votes
17 answers
101k views

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 ...
213 votes
16 answers
22k views

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
209 votes
11 answers
103k views

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,153
168 votes
17 answers
287k views

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,351
162 votes
8 answers
71k views

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
152 votes
9 answers
39k views

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,145
131 votes
7 answers
69k views

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,445
128 votes
10 answers
109k views

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
124 votes
7 answers
14k views

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,958
116 votes
4 answers
85k views

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,269
109 votes
5 answers
13k views

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
20k views

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
68k views

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,211
97 votes
8 answers
77k views

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,129
94 votes
17 answers
25k views

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 ...
94 votes
7 answers
41k views

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,499
94 votes
6 answers
54k views

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,211
91 votes
10 answers
35k views

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 ...
kalaracey's user avatar
  • 939
85 votes
9 answers
56k views

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,495
85 votes
7 answers
103k views

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,042
81 votes
9 answers
19k views

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
78 votes
17 answers
11k views

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 ...
77 votes
6 answers
29k views

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: http://www.infoq.com/articles/microservices-intro It states that when you load a web page on Amazon, then 100+ ...
David's user avatar
  • 4,459
72 votes
7 answers
74k views

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
72 votes
9 answers
29k views

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,154
71 votes
11 answers
6k views

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
9k views

"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
55k views

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
6 answers
33k views

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
  • 877
66 votes
13 answers
9k views

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,860
66 votes
19 answers
5k views

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
22k views

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
31k views

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
25k views

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
58 votes
2 answers
77k views

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
57 votes
14 answers
24k views

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,351
56 votes
13 answers
7k views

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
13k views

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
3 answers
41k views

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,123
53 votes
4 answers
31k views

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
4k views

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
52 votes
7 answers
49k views

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
5k views

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
51 votes
5 answers
61k views

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
  • 833
50 votes
11 answers
11k views

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
11 answers
29k views

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,325
49 votes
10 answers
13k views

Does splitting a potentially monolithic application into several smaller ones help prevent bugs? [closed]

Another way of asking this is; why do programs tend to be monolithic? I am thinking of something like an animation package like Maya, which people use for various different workflows. If the ...
dnv's user avatar
  • 591
49 votes
9 answers
13k views

Return considered harmful? Can code be functional without it?

OK, so the title is a little clickbaity but seriously I've been on a tell, don't ask (TDA) kick for a while. I like how it encourages methods to be used as messages in true object-oriented fashion. ...
candied_orange's user avatar
49 votes
5 answers
26k views

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

1
2 3 4 5
70