New answers tagged

0 votes

Should I store non-editable items lists in a database?

If you extrapolate further, you could store all of your code and binaries in the database and fetch it at runtime. Databases store information, and unless you're doing something like storing users' ...
user avatar
2 votes
Accepted

Use aggregation like LSP in C++

First things first: the UML diagram The original diagram is syntactically correct (except for the <I> on the box boundary, which should be «interface» centered above Licence in plain UML). The ...
user avatar
  • 66.8k
1 vote

Should I store non-editable items lists in a database?

Generally no, you shouldn't. I think the things you list as advantages are not real advantages: "solid structure and can be manipulated with SQL". General purpose programming languages all ...
user avatar
  • 1,976
0 votes

Use aggregation like LSP in C++

If the user of the class tree - Billing in your example - needs to #include the header files for all your derived classes, then you're doing it wrong. The first thing to try is not #include-ing them. ...
user avatar
  • 8,560
2 votes

Use aggregation like LSP in C++

For a demo of the Liskov Substitution Principle the header for Billing would only have License. The point of the LSP is that any object that extends another doesn't break that base functionality. ...
user avatar
  • 12.9k
0 votes

Designing database job monitoring

Why not just check with simple SQL query if specific results come back? Like: Select data from table @ db1, and see if results come back, if not Nagios check will fail.
user avatar
  • 102
3 votes
Accepted

Properly "exposing" a variable from a class in Python

A class becoming "bloated" is not a good reason to expose internal data if the methods are still cohesive. While a large class can indicate it is doing too much, is is not an automatic ...
user avatar
1 vote
Accepted

Is it a good idea to use database sequential id as a key in external key-value storage?

To start, some terminology helps, I think: The user table in Postgres has id's generated by a Postgres sequence This is called a surrogate key. also it has unique identifiers for each user which ...
user avatar
  • 22.1k
1 vote

Plugin architecture vs Interface Segragation Principle (SOLID)

The purpose of a plugin may be specific to your current application, but whatever it is, it is strictly delineated in your domain. The generic codebase has certain expectations of what a plugin is or ...
user avatar
  • 37.3k
0 votes

Is it a good idea to use database sequential id as a key in external key-value storage?

Row IDs are an internal structure which makes any solution depending on them highly non-portable. Future versions of PostgreSQL might change how row IDs work, importing your contents to another DB ...
user avatar
  • 10.8k
0 votes
Accepted

Is a flag for analytics a functional requirement?

I've changed my mind back to my original hunch and now I know it is a non-functional requirement. I came across this question and learned a couple of things while poking around the web (reading from ...
user avatar
1 vote

Is a flag for analytics a functional requirement?

This can be a functional requirement and a non-functional requirement. It becomes a matter of perspective. Describing the behavior of gathering metrics about user sign-ups and attempts is solidly a ...
user avatar
1 vote
Accepted

How can one combine two system architectures, say client-server and repository architecture?

There appears to be a confusion about what constitutes an "architecture" in software development. Architecture describes a general way of organizing code and behavior. Client-server is ...
user avatar
1 vote

Is a flag for analytics a functional requirement?

I would say that this is a Functional requirement. Being able to report on (or otherwise analyse) certain Data means that the system has to "do" something to support that. Functional. OK, ...
user avatar
  • 11.6k
3 votes

Is a flag for analytics a functional requirement?

That sounds like a functional requirement to me. It requires that your system exhibits certain behaviour (setting a Boolean flag) when something specific happens. Non functional requirements tend to ...
user avatar
  • 8,560
1 vote

Unsupported concurrent calls, throw exception or log a warning?

I don't think there is a one-size-fits-all answer for this. If there is the risk of data corruption - as in one call may make a bad decision or return a bad value because the other call was ongoing, ...
user avatar
  • 343
1 vote
Accepted

How to deduplicate implementation details coupling to the host objects' actions?

Reverse the dependency. The Worker is the class that is supposed to be stopping itself when its container goes to sleep, so let it subscribe to the container. This allows you to avoid repeating ...
user avatar
  • 24.6k
1 vote

How to deduplicate implementation details coupling to the host objects' actions?

Context What is A, What is B? If this was a purely syntactic/implementation question sure fine, why not? The name has no bearing on the question. Unfortunately we really need to know what makes A and ...
user avatar
  • 15.4k
0 votes

Instance of component inside a (non-instance) component. Does it make sense?

No, this is not possible. Either you draw an object diagram with instance specifications, or a component diagramm, with the internal structure of the components. What you have here is a mix. Text with ...
user avatar
2 votes

Unsupported concurrent calls, throw exception or log a warning?

You should look at it from a user's / caller's point of view. And I doubt that your approach "I would like my service to discard concurrent calls, allowing only the first one to execute" ...
user avatar
1 vote

Unsupported concurrent calls, throw exception or log a warning?

It tends to make things simpler when your methods are idemopotent, so I'd recommend the same here. If the same view is requested again just return the original task. public interface Navigator { ...
user avatar
  • 24.6k
1 vote

Unsupported concurrent calls, throw exception or log a warning?

Avoid all errors and exceptions when the code can successfully handle the situation. In your navigator example the code can easily handle the concurrent actions by discarding, overriding, or queuing ...
user avatar
  • 64k
1 vote

Unsupported concurrent calls, throw exception or log a warning?

You should consider internal behavior and UX separately. Internally, an attempt to start a second navigation while there is an ongoing one should be handled just like you would handle other invalid ...
user avatar
1 vote

Unsupported concurrent calls, throw exception or log a warning?

I've been mulling this question around in my head for a couple of days. I think the thing that strikes me most, is how awkward it feels for the navigation service to return... anything. Typically UI ...
user avatar
0 votes

track user actions on UI and store them in the database

If you are worried about network load you could simply buffer events locally and send them in a batch. You would need some logic of when to send the buffer, like when saving the form, when the buffer ...
user avatar
  • 1,839

Top 50 recent answers are included