New answers tagged

2 votes

Is layered architecture style inherently monolithic?

I don't have the book you cited from at hand, but from the excerpts I could find by googling, I am sure the authors were talking about the specific horizontal layering Presentation Layer / Business ...
  • 194k
1 vote

Is layered architecture style inherently monolithic?

The purpose of creating layers in an application is to separate technical responsibilities from each other. An application with a layered architecture typically has a presentation layer, a service ...
  • 3,563
1 vote

Is layered architecture style inherently monolithic?

No. How do I know? People wrote monoliths before layers were a thing A layer is a collection of modules/classes with similar responsibilities Plenty microservices have layers Now all that said, ...
3 votes
Accepted

Is it safe to make training data and labels as global variables in C?

in C, every callback should get a void* parameter to allow such decoupling. Then you can pass the address of a structure containing the parameters you need: struct foo_data { int alpha; int ...
  • 4,518
0 votes

How can I restore an entity from the database while keeping my entities database-independent?

What I would do is a combination of both approaches(CreateFrom and MapFrom). Let me explain. but this could potentially allow creating an invalid entity inside the domain This suggests that your ...
1 vote

How to improve a monthly usage quota system for an API with growing number of users?

Work out the count of requests from a time indexed log of requests instead of storing a number in reddis. (elastic etc) Now you are just writing to the log for each request. Move your usage ...
  • 68.8k
0 votes

How to handle dependencies between microservices all called within one large service

In addition to Greg's and Amit's answer, at first place we have to look into bounded context while working on microservices architecture. May be defining clear boundary and responsibility of each ...
0 votes

Is ASP.NET's default recommendation of registering dependencies in the Web project bad practice?

You can create an extension method in the project that uses Microsoft.Data.SqlClient that registers the dependencies. Something like: public static class ServicesConfiguration { public static void ...
  • 3,563
0 votes

Is ASP.NET's default recommendation of registering dependencies in the Web project bad practice?

Why is it standard practice for ASP.NET projects to give the Web project access to everything? Because probably 90% of netcore web solutions just have the one web project. Imagine if you had to make ...
  • 68.8k
0 votes

How to handle dependencies between microservices all called within one large service

In addition to Greg's answer, see if you can separate the Statistical service function consumed by Customer service as another service. This new service will be meant only for Customer service.
  • 126
0 votes

Where to check preconditions in multi functions

Iron rule: No outside input must ever cause damage. Worst case it must be handled as if it never happened, possibly logged, possibly with an error message if the user might do something about it or ...
  • 40.5k
1 vote

Where to check preconditions in multi functions

There are basically two ways to deal with preconditions. The caller is fully responsible, and if the preconditions are not met, all warranties are void. This is essentially how the C standard library ...
1 vote
Accepted

How to deal with overlapping domains?

Specific to the Problem An employee knows his laptop, but a laptop does not know an employee. The employee uses the laptop, and it's a good idea to put employee-laptop logic in the same package with ...
  • 176
1 vote
Accepted

How to handle dependencies between microservices all called within one large service

As long as you have micro services calling each other directly, you will have hard dependencies between services. With your current design, the statistics service is a active participant in the ...
0 votes

How can I track the status of multiple messages in asynchronous processes?

My initial idea was to put an initial overall state and an initial task state for every task in a database. Then I would put each message into a queue. But what if the application crashes after ...
  • 24.5k
0 votes

How can I track the status of multiple messages in asynchronous processes?

But what if the application crashes after putting only one message into the queue. Or what if the processor of the queue crashes all the time, hence never send a status update message? What if the ...
8 votes
Accepted

How to avoid side effects in complex code

There is no silver bullet to solve your issue. That does not mean it cannot be solved, though "solved" is probably be the wrong term. A better description is IMHO "it can be managed&...
  • 194k
1 vote

Multiplayer FPS Architecture

I think you might be missing an 'Event' model in your design. You talk about managing the state of the game, which is important, but things like 'player A gun fired' are pretty hard to model using ...
  • 24.5k
2 votes
Accepted

Multiplayer FPS Architecture

You've fallen into the trap of deciding that each noun should be a class, rather than each class being a class. Usually people with this syndrome make a class for each noun in their program - Player, ...
  • 4,518
1 vote

Multiplayer FPS Architecture

This is the sort of thing that is remarkably hard to do well. The general subject of "rollback netcode" is worth doing your reading on, as it can make or break the player experience. You ...
  • 10.2k
1 vote

Multiplayer FPS Architecture

The core idea of multi player games, at least where there is any competition or reason to cheat, is to never trust the client. Using this model the client is simply a dumb client. It sends mouse and ...
  • 3,169
-1 votes

How important is it to clearly understand requirements and architecture before starting to code?

This answer is to be seen in the context of the question, i.e. when having the need to do something, but simply not being able to procure req's and architectural decisions in time. I.e., when ...
  • 5,486
1 vote

Implementing paging with multiple data sources

It's often very difficult or impossible to combine multiple data sources into a single index. For example, if the underlying sources change often, you end up having to maintain essentially a ...
  • 135
-1 votes

How important is it to clearly understand requirements and architecture before starting to code?

Extreme Programming (XP) calls what I think you're describing a spike, and the term has proliferated around to a degree. If for example: the customer changes their mind about what the UI flow should ...
  • 316
15 votes

How important is it to clearly understand requirements and architecture before starting to code?

The most important thing is knowing when to stop. Gather requirements. Do architecture design. Stop when it's not teaching you anything. I think of them like making popcorn. When it's making ideas pop ...
4 votes

How important is it to clearly understand requirements and architecture before starting to code?

I hate these wishy washy "it depends" answers. Here's my answer: Don't bother with requirements and architecture. Why? Requirements You are just pushing back the coding problems to the ...
  • 68.8k
16 votes

How important is it to clearly understand requirements and architecture before starting to code?

There is a large field of study devoted to this.  See for example: https://en.wikipedia.org/wiki/Category:Software_project_management https://en.wikipedia.org/wiki/Agile_software_development https://...
  • 32.8k

Top 50 recent answers are included