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/...
10
votes
Accepted
Threads: the difference of concurrency between many-to-one model and one-to-one model
Your textbook isn't wrong, but it is using the term 'concurrency' a bit loosely at times.
Concurrency means that there is the appearance that multiple tasks are being done at the same time.
True ...
7
votes
“Smart create” method naming
Just have your create method and pass in some policies that supply additional functionality.
Naming those policies should be easy.
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 ...
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. ...
6
votes
Accepted
Mapping all properties of business objects vs Mapping needed properties of business objects
If you have exactly one app, and the server sends the JSON only to this app, you should go with @simon's advice. However, when you have a dozen apps, each of them needs a different part of the data, ...
6
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 ...
6
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, ...
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 ...
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 ...
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, ...
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 ...
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.
...
5
votes
Accepted
Should Modelling Document Analysis?
I think that Martin Fowler's posts about UML modes - UML as Sketch, UML as Notes, UML As Blueprint, and UML as Programming Language will be helpful to you. I also think that Scott Ambler's work on ...
5
votes
Mapping all properties of business objects vs Mapping needed properties of business objects
Just map and send what you need. This keeps the code readable and reduces network traffic. However, make your code structures so that they are easily extendable when they have to be changed.
Some ...
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 ...
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 ...
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 ...
4
votes
Accepted
“Smart create” method naming
My approach is to:
Use a name that indicates what happens, if not precisely, then at least unambiguously, instead of a name that simply gives some vague hint that what will happen will be outside of ...
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 ...
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 ...
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 ...
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 ...
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. ...
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 ...
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 ...
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 ...
3
votes
Business logic in the models?
I read on the internet that I should do as less as possible in the
controller. What do they mean?
They mean the Controller is a part of the UI. And you should do only UI-related things inside it. ...
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,...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
model × 125mvc × 33
design × 14
architecture × 14
object-oriented × 13
design-patterns × 11
uml × 9
modeling × 8
java × 7
mvvm × 7
php × 6
database-design × 6
asp.net-mvc × 6
c# × 5
domain-model × 5
view × 5
database × 4
data × 4
service × 4
javascript × 3
python × 3
object-oriented-design × 3
domain-driven-design × 3
terminology × 3
ruby-on-rails × 3