Skip to main content
13 votes

What's the purpose of multiplying by 1024x1024?

It's difficult to be (at all) certain without looking at the code, but it kind of sounds like it's implementing fixed-point arithmetic, with 12 bits before the decimal point, and 20 bits after. When/...
Jerry Coffin's user avatar
  • 44.5k
7 votes

Class with large number of properties

In theory, it is better to have smaller classes when a logical grouping of the properties is possible. However, there are a number of cases where the cost of refactoring the class into smaller ones ...
Doc Brown's user avatar
  • 210k
7 votes
Accepted

Real case of append-only models

Classic (and probably the ones easiest to understand) problems for append-only are logging or monitoring systems. In case there are hundreds or thousands of sensors pumping data into your systems, ...
Volker's user avatar
  • 836
7 votes
Accepted

How do you correctly turn this text into an activity diagram (problem with timer)?

Problem Your diagram has several flaws. For instance, you'd need a join to synchronize the camera recording and the timer. But then, the semantic would mean that both activities must be finished ...
Christophe's user avatar
  • 78.7k
7 votes
Accepted

Why is CMYK more suitable than RGB for printing?

If you are working on image editing or graphic software, you probably wonder why you'd need to provide some more thoughts about color models: Colors you see on a screen are sent from a light source. ...
Christophe's user avatar
  • 78.7k
7 votes

Should I model constraints which are valid, but which have no current function in the domain?

In the past, I have experienced both kinds of situations: cases where a system contained things like constraints which were surely added in good faith, but were never really needed - and later turned ...
Doc Brown's user avatar
  • 210k
6 votes

In MVP, should we call repositories from the Model or the Presenter?

In my experience it depends on who you ask (but it shouldn't). I've seen your question asked about MVC, MVP, and MVVM. There is confusion about all three. But why is that? This is mainly the ...
MetaFight's user avatar
  • 11.6k
6 votes
Accepted

Models: two very different concepts

One issue with these discussions is the all-to-frequent mixing of different architectural viewpoints in the same discussion or diagram. Some architectural viewpoints are meant to show depth: deep ...
Erik Eidt's user avatar
  • 34.2k
6 votes

Should the Model be able to persist itself? When?

No, it should not. Especially these days, a model will have multiple persistence locations (DB, cache, backup) and a few other forms that are useful to be decoupled from the store (human readable, ...
Telastyn's user avatar
  • 109k
6 votes
Accepted

How to model classes that can be extendable?

How to model classes that can be extendable? In the field of software development, extensibility specifically refers to inheritance, and inheritance is not the correct approach here. The above class ...
Flater's user avatar
  • 52.8k
5 votes

Should a Controller have a Model object as an attribute?

Yes, this is quite common (python example, simple java example, java example using a list of models, and C++ example) Why ? The controller must send commands to the model. So either it knows the ...
Christophe's user avatar
  • 78.7k
5 votes
Accepted

In MVP, should we call repositories from the Model or the Presenter?

In an MVP model, the presenter acts as middleman between the view and the model. In consequence, from the presenter you shall call the model and not short- circuit it by calling repository directly. ...
Christophe's user avatar
  • 78.7k
5 votes

Should you pass an instance of service to a model class?

Give your InfoItem a generic onClicked event. At the place (maybe a factory) where the specific InfoItem objects are created (and hence their type is known), assign each of them an appropriate event ...
Doc Brown's user avatar
  • 210k
4 votes

Mapping between 4+1 architectural view model & UML

Although I agree with Thomas Owens answers approach to cater for your end-users needs, one thing that is failed to be mentioned is that the reason why the original definition of the "4+1 View Model ...
Aphos's user avatar
  • 41
4 votes

Models: two very different concepts

In MVC, the Model is anything that is not part of the View or the Controller. In MVVM, the Model is anything that is not part of the View or the ViewModel. That should be easy enough to remember. If ...
Robert Harvey's user avatar
4 votes
Accepted

UML - Design Class Model diagrams

There are many UML diagrams. You are obviously referring to an UML class diagram: Yes: you choose the level of details that you want to show in your diagram. So you can very well decide to show ...
Christophe's user avatar
  • 78.7k
4 votes

What's the purpose of multiplying by 1024x1024?

The fact that this shift is done one way and then in reverse later suggests that this is perhaps a hack to provide use extra bandwidth in these values. That is, the 20 low-order bits are being used ...
JimmyJames's user avatar
  • 27.8k
4 votes
Accepted

Should the Model be able to persist itself? When?

It depends. There can be scenarios where this is suitable: When you don't implement a larger "enterprise system" or real business software, but something smaller, maybe something like a ...
Doc Brown's user avatar
  • 210k
4 votes

Placing business logic on a not so small/big project

We’ve learned over the years that most small projects grow over time. What starts as simple CRUD applications evolve into business critical systems and complexity increases exponentially. Sooner or ...
Rik D's user avatar
  • 4,800
3 votes

Models: two very different concepts

The model is not "everything else". The model is the number behind 3.14159... It is not "3.14159265". It is not the button you push to get pi. It is not the paper you write π on. It is not the ...
candied_orange's user avatar
3 votes
Accepted

What kind of diagrams should I use for design before starting a programming a project?

The first thing you have to do, is to get an overview on the requirements. Two diagrams that may help: The UML use case diagram , to identify the main functions offered by your system to the user. ...
Christophe's user avatar
  • 78.7k
3 votes
Accepted

Do I need to include all relationships in my class diagram?

First for the general case: A relationship that follows implicitly from other relationships could be left out. In your specific example, this is the case, because there is a one-to-one relationship ...
Miguel van de Laar's user avatar
3 votes
Accepted

Model "Clones" Adding Complexity to N-Tier MVC Project?

It sounds like your friend is suggesting a more ADM (Anaemic Domain Model) approach. Essentially you just have your Method-less DTO model and use it through all the layers. Your Data layer is not ...
Ewan's user avatar
  • 77.5k
3 votes
Accepted

Meaning of Using BitVectors to Model Integers to account for Overflow

The thing that many programming languages call "integers" are not actually integers, they are fixed-size bitvectors interpreted as integers … but because they are fixed-size, they can "overflow", ...
Jörg W Mittag's user avatar
3 votes
Accepted

Why is there no UML or other model added to the DOM specifications?

W3C technical reports such as the DOM specification are authored with the ReSpec tool. Interfaces are described with the language-agnostic WebIDL interface description language. It would in theory be ...
amon's user avatar
  • 135k
3 votes

Django Fat Models: Where should I put model creation logic?

I would recommend create classmethod on ReceiptItem. In large code bases, you want model instance creation logic to be not spread all around your code base. Think what happens when in future you ...
mahoriR's user avatar
  • 131
3 votes
Accepted

Do context diagrams have cardinalities?

Most of the system analysis methods have in common the idea that a system has boundaries with the environment that surrounds it and with which it interacts. The term "context diagram" is used to ...
Christophe's user avatar
  • 78.7k
3 votes

Design suggestions needed to create a MathBuilder framework

You sound like someone who has minimal experience with software design. And for you I have one golden advice : DO NOT CREATE A FRAMEWORK! (all caps for emphasis). If you try building abstractions now,...
Euphoric's user avatar
  • 37.5k
3 votes
Accepted

Rails' MVC vs Microsoft MVC - where to put logics?

In the Microsoft version of MVC, you have the heavy Controller implementation instead of the heavy Model implementation that a large portion of the development community uses. The ORM should be a ...
Adam Zuckerman's user avatar
3 votes
Accepted

What domain objects might I need to represent a user and users profile in a forum web application

I’ve been trying to get a firm understanding of the MVC design pattern Model View Controller is an impossibly simple pattern. As long as you have something that focuses on the model, the view, and ...
candied_orange's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible