Skip to main content

Questions tagged [model]

Abstract representation that allow to understand and reason about software and data structures, or that describes a real-world structure for the purpose of dealing with it in software.

Filter by
Sorted by
Tagged with
0 votes
4 answers
319 views

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

When domain modelling, should a valid constraint - or "natural" constraint - be modelled, even if there are no current business processes which rely on the constraint being asserted. As an ...
Kyohei Kaneko's user avatar
0 votes
2 answers
136 views

Do I use a model or controller in an existing MVC application for implementing an integration that makes API calls?

I have an existing application using Codeigniter Framework (MVC). I need to implement an integration in the software with the external cash register (e.g., making REST API calls). I need to either ...
objecttothis's user avatar
1 vote
2 answers
178 views

Placing business logic on a not so small/big project

I am having a bit of problem trying to find the correct place for business logic. The project I am working on isn't huge, but is not small either and has a very considerable importance in my company. ...
Bernardo Benini Fantin's user avatar
0 votes
0 answers
40 views

Choosing a Pattern for Handling Different View Models in a Service Method

I'm working on a fairly large but standard dotnet core API. Here's a simplified sample: // Simplified example of a controller public class VehiclesController : ControllerBase { private readonly ...
Carel's user avatar
  • 113
2 votes
1 answer
319 views

How to remove the hotspots from given image by using Python and opencv? [closed]

In the picture below there are some regions which are very bright (i.e. more white). Some bright regions are wide and some are narrow or thin. The red box covers one such wide bright spot, and blue ...
S. M.'s user avatar
  • 167
3 votes
1 answer
133 views

Should I have different instances of the same model in an application or just keep a single instance?

What is correct in your opinion regarding the creation and handling of models in an application let's say using MVVM, or even an MVC design pattern? I will try to illustrate the situation I see at my ...
Lucas's user avatar
  • 139
0 votes
1 answer
356 views

Multiple models/controllers python app

I am trying to tinker with the MVC pattern and I have a problem when trying to design the MVC structure. I need a model for products, however as I need to manage more and different data, I can help ...
Eideann's user avatar
  • 13
0 votes
0 answers
102 views

Models as data containers in MVVM

In the past, when I've used MVC, my model objects were just dumb data containers. Everywhere I read says that in MVVM, models should contain business logic as well as being a data container. Now that ...
Alex F.'s user avatar
2 votes
2 answers
149 views

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

Say we have these view model classes. You can imagine there's an entry in the UI for each subtype of InfoItem, and each item contains some text and an icon. abstract class InfoItem(text: String, icon: ...
aarnaut's user avatar
  • 259
-1 votes
1 answer
288 views

Why is CMYK more suitable than RGB for printing? [closed]

We know that RGB is additive color model and CMYK is subtractive color model. RGB starts with darkness (black) and we gradually add light; an CMY(K) image requires to be illuminated by white light. ...
S. M.'s user avatar
  • 167
-1 votes
2 answers
68 views

Methods to model mutations performed by functions

Given a set of interfaces, objects implementing those interfaces, and functions that use those objects, what methods exist to model mutations performed by the functions? For example, given: A Pet ...
Reign of Error's user avatar
1 vote
2 answers
414 views

Model updating itself in MVC?

My group in school is tasked with creating an application of our own choosing which follows good object oriented design principles. The group has chosen to make a tower defense game with help of ...
Felix Jönsson's user avatar
1 vote
0 answers
743 views

Should I run validation logic on the DTO or the entity model?

Suppose I have a Controller that takes a DTO that represents an Order. This DTO has inner DTOs that could potentially have entity IDs and/or entity data that's used to create an entity dynamically ...
Morgan's user avatar
  • 111
0 votes
1 answer
123 views

How to prevent mutual dependencies when implementing database relationships

To explain the problem imagine you have two entities User and Group. The OO implementation has two classes UserModel and GroupModel. UserModel should have a method getGroups() (returning instances of ...
Sebi2020's user avatar
  • 101
4 votes
2 answers
579 views

How to model classes that can be extendable?

I have recently inherited a codebase which has a weird problem and I am trying to search for an extensible solution that can solve my issue. Consider I have a model class that is used as a model to ...
BoredToDeath's user avatar
-1 votes
1 answer
56 views

Model design for `Team`s and `Member`s

Say we have to create a model for a company, where employees can be part of many different teams. A team can have member members. Members can be part of many teams. How to design database tables for ...
funct7's user avatar
  • 162
2 votes
1 answer
375 views

How to boost reusability and extendability in a MVVM .Net application?

I'm a software engineer that primarily writes C code but now and then makes .Net applications for fun. This is a question about the fun part. Over a duration of about 15 years, I have used and ...
Kristjan Hornung's user avatar
3 votes
5 answers
671 views

Should the Model be able to persist itself? When?

I might start by saying that I am aware that usually there's a Repository layer bookRepository.persist(book) that abstracts the interaction with the database, but something about using the model ...
Carlos Coelho's user avatar
2 votes
1 answer
116 views

How to properly model an MVC model in this case?

I aim to understand pull model MVC. I'm stuck at defining a model for a simple color-guessing game in Java Swing I chose to practice it. I borrowed the model's initial version from an example which ...
Piovezan's user avatar
  • 481
2 votes
0 answers
91 views

Client-Server Model between Smartphones via BLE?

I want to have a Client-Server-Model with Smartphones within a range of 50 meters inside an application. One of the Clients is supposed to be the "Host" and it's only job is to receive data from all ...
ximix424's user avatar
1 vote
2 answers
94 views

What's the best convention to store "other" option?

Say I have a Person object. I need to ask the user to choose from a list, which laptop they have. They can also choose the option "My product isn't listed here". Now the Person object will look ...
Kartik's user avatar
  • 111
-1 votes
1 answer
148 views

Need some criticism for my backend app Architecture

I have been learning Backend development for quite a while now and I decided to build a bigger project using Express.js and the MVC architecture, the project is basically a Restful API with Vue.js in ...
Hazem Mohamed's user avatar
3 votes
1 answer
347 views

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 so that I can write my own framework for implementing the back-end of a forum web application using Slim 3. In particular, after ...
SneakyShrike's user avatar
4 votes
3 answers
729 views

What's the purpose of multiplying by 1024x1024?

I'm working with an old C module that was originally ran on Power PC architecture and compiled with gnu 3.0.6 I'm porting it to run in a VS2012 project on Intel hardware. The module creates a 3D ...
Sam's user avatar
  • 165
2 votes
2 answers
219 views

Mantain same entity data in different layers

I'm trying to split the use of a business entity (e.g. a post) thought an application uses, trying to obtain a clean architecture So I will likely have: A class model, where the business logic lives ...
Tizio Fittizio's user avatar
-1 votes
3 answers
606 views

Coherence between sequence diagram and class diagram

Question 1 All participants in a sequence diagram must match a class in class diagram? Question 2 All class that represents some object that is created by the system needs a class that creates it? ...
artas's user avatar
  • 27
0 votes
1 answer
178 views

To And From Date Validation in Model

In my Springboot project I need to perform a validation of the type validFromDate<validToDate. I was wondering whether would it be a good or bad practice to place a validation in the model itself (...
Salim Shamim's user avatar
0 votes
0 answers
182 views

Separating Model classes into Model Project with dependency on Service layer

I'm working with a C# API Wrapper project that is entirely flat, meaning 1 project and namespace for all the files. I'm attempting to put the Models into a separate Models project, but I've hit a ...
mgmedick's user avatar
  • 101
0 votes
2 answers
2k views

Is it okay to pass my model into my view model via its constructor through MVVM practices?

public class LDLTrackViewModel : RailwayViewModel { private LDLTrack _ldlTrack; public LDLTrack LDLTrack { get => _ldlTrack; set { _ldlTrack = value; ...
danny10846's user avatar
0 votes
1 answer
99 views

Model Semantics: Is "real" data on a graph consider as a model?

At first this question seems elementary -- Is "real" data on a graph (xy coordinates) a model? However here is my logic. We know a model is an abstract representation of the real-world. A graph is ...
Minimalist's user avatar
2 votes
1 answer
139 views

Architecting a predictive modeling software

I have a predictive model which runs 10,000+ scenarios to predict the outcome. It's a micro-simulator model for an insurance company. The data part is almost static with changes from time-to-time, ...
PB4133944's user avatar
1 vote
0 answers
225 views

Save data from multiple Qt components scattered around multiple QML files

I would like to save the current "value" property of several components (e.g. a Slider) as a configuration profile when the user clicks on the Save button in my application. However, the Save button ...
ivarec's user avatar
  • 315
0 votes
1 answer
264 views

How to manage model(s) between web client (DMZ) and web API?

I have this web API project which handle all database access via entity framework. I have another web client reside in DMZ to call those APIs (via ajax or c#) in the web API project. When I make API ...
Pop's user avatar
  • 219
5 votes
1 answer
3k views

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

This is only an extract from a very long text, the one I'm not sure about. It's about a photo booth (an automata that makes a picture of you if you insert coin). The automata has a camera that is ...
tenepolis's user avatar
  • 285
1 vote
0 answers
501 views

How to simplify design and remove duplication in java layered architecture?

I've the following project structure (simplified): domain dto view In domain model is kept. dto classes are used to pass data from domain to view. And in view I've a controller and a handful of *req,...
Opal's user avatar
  • 275
1 vote
1 answer
184 views

What is "serverless mesh"?

I'm familiar with the serverless programming model e.g. GAE and AWS lambda etc. But what is "serverless mesh"? I googled it and found no definition.
Niklas Rosencrantz's user avatar
1 vote
1 answer
89 views

What is the best way to implement model property authorization in an ASP MVC?

We have an MVC application that has very granular and configurable authorization. We currently have been using the authorize attribute against our controllers and controller functions. The next ...
Leonardo's user avatar
  • 119
6 votes
6 answers
1k views

Models: two very different concepts

There are a lot of questions and answers about what a/the model is. Particularly when discussing where business logic belongs and the MVC pattern. There seem to be two concepts that need to be severed....
MyiEye's user avatar
  • 243
1 vote
2 answers
106 views

Meaning of Using BitVectors to Model Integers to account for Overflow

I have just encountered this sentence: Depending on the context, we may prefer to model integers as bitvectors rather than mathematical integers, since the Int type does not model overflow. I am ...
Lance's user avatar
  • 2,605
-2 votes
1 answer
280 views

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

I already went through several versions of the DOM and HTML specifications on the W3C's websites but I have never seen a complete overview model or meta model regarding the DOM or the HTML. ...
Jankapunkt's user avatar
2 votes
1 answer
983 views

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

I'm reading Two Scoops of Django 1.11. At 7th chapter it introduces "fat models". It says that best practice is to put a big part of logic into the model and keep views as thin as possible, but then ...
Manuel Fedele's user avatar
1 vote
1 answer
94 views

How can we make Use Case Model in UML for given Statement?

I have the following statement for which I have to make Use Case Model. I have completed all the actors and use cases. Problem Statement News Mobile Application offers its normal users to read/...
Khubaib Khawar's user avatar
1 vote
1 answer
652 views

UML - Design Class Model diagrams

I have several questions about UML diagrams as I am not finding them very clear (they are new to me). 1) When making a diagram with generalizations/specialization: if I do not have all of the ...
PeteyM's user avatar
  • 53
4 votes
1 answer
1k views

Should a Controller have a Model object as an attribute?

For context, this project is a personal budget program I am working on while I try to learn to use MVC patterns effectively. There is a SessionController that passes user commands to a ...
g_sue's user avatar
  • 49
5 votes
1 answer
281 views

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

I was discussing a project structure of mine with a friend and he pointed out an interesting point about how my architecture seems to introduce complexity and over abstraction into my layers by having ...
G.T.D.'s user avatar
  • 508
2 votes
1 answer
3k views

Clarification on Spiral Model Steps

Here's the representation of commonly seen Spiral Model: From what it has been written in book and articles that I have read that in every iteration, the four steps are carried out in a loop: ...
cpx's user avatar
  • 379
0 votes
0 answers
210 views

How to handle too many ViewModels in non-MVC project

I have big asp.net web-forms project, I'm using Linq2SQL, I have 1 model per table (same properties as generated classes by Linq2SQL, I add this models to have more controls of fields). For some ...
Mehdi Dehghani's user avatar
0 votes
1 answer
5k views

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

I am starting to design the architecture of my family's small hotel business. But I'm a junior js developper and I miss the big picture when programming on the go. I am afraid that this might lead to ...
user1780729's user avatar
1 vote
1 answer
92 views

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

For example, I have managers who are responsible for contracts. These contracts belong to a department. So what I have done is this: manager(1) belongs to a department(1) department(1) contains ...
imran.razak's user avatar
5 votes
2 answers
3k views

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

Note: The example in this question is for demonstration. Please focus on the question and not on problems in the example (such as tight coupling, lack of Dependency Injection etc.). I have a form to ...
Michael Haddad's user avatar