Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [model]

The tag has no usage guidance.

0
votes
1answer
30 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 ...
4
votes
1answer
387 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 ...
1
vote
0answers
145 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,...
1
vote
0answers
43 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.
1
vote
1answer
32 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 ...
2
votes
6answers
340 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....
1
vote
2answers
52 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 ...
-2
votes
1answer
114 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. ...
0
votes
0answers
189 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 ...
1
vote
1answer
55 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 am just stuck at two points, I have completed all the actors and use cases. Problem Statement News Mobile Application offers ...
1
vote
1answer
218 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 ...
4
votes
1answer
125 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 ...
5
votes
1answer
166 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 ...
1
vote
1answer
542 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: ...
0
votes
0answers
90 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 ...
-2
votes
1answer
843 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 ...
1
vote
1answer
80 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 ...
4
votes
2answers
1k 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 ...
1
vote
1answer
88 views

If I have to check integrity of the strings coming from the View, where should I do it?

The scenario: I have a GUI with textfields and radio buttons where the user insert information for a 'Person' Here are the classes of the model and of the view-model: enum Gender { case Male, ...
1
vote
1answer
421 views

Real case of append-only models

I've been studying architecture lately, and came across the terms Event Sourcing, Event Streaming and Historical Modeling, all of them referring to "append-only" models, but all the concepts I've read ...
1
vote
2answers
193 views

CSV file processing in MVC

I am using a MVC framework and I have developed a module where .csv file is being imported into the database, I am little unsure about certain things which I'll try to explain below: Step 1: .csv ...
0
votes
1answer
70 views

Do context diagrams have cardinalities?

Can someone explain if the context diagrams(as used in requirements engineering) have cardinalities(as defined in UML diagrams)? What I want to ask is, are cardinalities part of a context diagram's ...
0
votes
0answers
228 views

When splitting a Node.JS server between model and controllers, who should tranform the data for the database to understand?

I have a node.js server for an API that is split between controllers and models (there is a router which is autopopulated on runtime). So for example here is a classic end point for fetching config ...
3
votes
5answers
2k views

Class with large number of properties

I have a class which will have a huge number of properties (30 to 50). A huge numnber of these properties will be read only on the client. Is it a good practice to have one class with lots of ...
0
votes
2answers
612 views

Can someone explain the Model in ASP.NET MVC?

I have developed in the past always classic ASP.NET solution. I am starting currently to develop ASP.NET MVC solutions, but i have a problem understanding what a Model is and what it should contain. ...
0
votes
2answers
480 views

Prescriptive and descriptive models of SW development - why it is not clear?

I have always thought that “descriptive” models says “what” but do not specify “how”, while “prescriptive” ones do exactly that. But when I started checking the topic, I found a lot of contradictions. ...
0
votes
1answer
488 views

How can you have a Repository with dynamic data-sources?

Usually the Repository pattern looks like : What would be the best practice to make the repository handle more gateways (for Cache Redis, FTS/filtering Elasticsearch, Db Mysql etc.) My ideas so far ...
1
vote
1answer
55 views

Consistency for disk write in a model object graph

You're writing an app where the model (as in MVC) is an object graph. Occasionally, you want to save this object graph to disk. What are some best practices to ensure that the write is consistent? (...
0
votes
2answers
2k views

How does two-way data binding differ from simple auto-sync?

The AngularJS documentation mentions that it considers one-way data binding to be 'bad' and two-way data bind to be 'good*'. However, on looking over the definitions of two-way data binding used, all ...
3
votes
2answers
103 views

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

Some time ago I switched from Microsoft ASP.NET 2.0 (WebForms, never knew Microsoft's MVC) to Ruby on Rails and learned it's MVC approach, after which some things in ASP.NET MVC seem to be weird. In ...
3
votes
2answers
963 views

Reverse Engineering a Spreadsheet into a Model and Controller

I need some help with the approach to a specific project. We have a large excel workbook with a ton of worksheets. There are many user inputs, which formula fields pull, return, repeat. This all ends ...
0
votes
0answers
42 views

Should I use weak entity instead of regular to describe my kind of components?

First time trying to make a E/R model of my database. Trying to understand weak entities and regular entities. Should I make the CPU, RAM, Mainboard, etc. entities weak instead of regular?
2
votes
3answers
76 views

Mapping all properties of business objects vs Mapping needed properties of business objects

I'm receiving objects in JSON, and currently the app only uses a small amount of the properties I receive. I'm wondering which of the following is best practice, or simply generally advised. Would it ...
5
votes
2answers
196 views

Should Modelling Document Analysis?

I use UML I, like most (I think), use UML as my main diagramming toolset. UML is clear and useful for representing OOP and has sufficiently diverse diagrams that there is something for whatever area ...
5
votes
3answers
471 views

“Smart create” method naming

Every class of a model in my application has a create method. The framework gives me the default implementation of create which is “create in the DB”. Sometimes I need to perform some extra actions ...
0
votes
1answer
83 views

Automated data processing in BPMN/BPEL?

In order to run complex simulations, I need to do preprocessing of data from various data sources. This is done by a bunch of Postgresql scripts. However, having only these is unsatisfactory, because ...
1
vote
1answer
459 views

Why is conditionally using an empty panel in Apache Wicket a bad practice?

When Apache released its list of best practices, they recommended avoiding the addition of an empty panel conditionally and gave the following example of what NOT to do: if(MySession.get()....
-1
votes
1answer
196 views

Terminology: abstraction vs models [closed]

I'm building a model of the SQL query language. It doesn't attempt to abstract SQL at all - instead, it tries to model it directly, so it has model objects named Query, Table, Column, Variable, ...
-2
votes
1answer
465 views

Best way to control serialisation of posted form data [closed]

I'm working on an ASP.NET MVC project. I have a form that is strongly typed. Is it considered good practice to add serialisation attributes to the same view model to control how the data is serialized ...
3
votes
1answer
241 views

Business logic in the models?

I use the repository pattern for data handling. In my DAL folder i have IUserRepository, UserRepository and UserContext. Inside the models folder i have a class called User like id, username etc. I ...
5
votes
1answer
2k views

Threads: the difference of concurrency between many-to-one model and one-to-one model

I am studying "Threads" part with a textbook, Operating system concepts written by Abraham Silberschatz, Peter, Greg. First, I'm going to say something in the textbook related to my question, and ...
5
votes
1answer
261 views

MVP / MVC role of the Model (not anemic one) clashes with presenter / controller role (responsibilities in the right place, Model OR Presenter)?

Problem? I have been looking at MVP implementation and process to design a good domain model (not anemic). It says that the domain model should have its own behavior and not being a simple data model ...
3
votes
2answers
210 views

How to handle multiple models that relate to a single model

First of, sorry for the vague title. In our website framework, we have modal classes to represent our database tables, that hold a rows data. I'm currently working on a stat style page, and I'm ...
10
votes
2answers
633 views

How much should a view know about model?

I am building an application in python with a python wrapper for WPF and with DAG support. I am currently at a point where I have to decide a consistent way of interacting between the data and the ...
2
votes
1answer
2k views

MVVM model vs viewmodel

I am trying to wrap my head around MVVM and "models should not have behaviour". If my getter depends on an environment variable, should it be in the model or viewmodel? Does it make a difference if ...
16
votes
3answers
3k views

Is that good idea to add ViewModel exactly same as Model

I have following layers in my solution: App.Domain App.Service App.Core (maybe you call this one App.DataLayer) App.Web Software design pattern is not my question, I have following Model in Domain ...
4
votes
2answers
461 views

Can a model have itself as a foreign key?

I am doing a coding project in rails. I have a user model, and I want to add a "spouse_id" to it (which would reference other users). Can a model reference itself in a foreign key?
0
votes
1answer
636 views

Designing the model layer to be serializable

I am creating simple desktop application in javaFX 8 and I would like to be able to save the state of the model and load it next time the application starts. Therefore I am implementing the ...
2
votes
1answer
140 views

How valuable is decoupling in proprietary software?

When developing with Symfony2 PHP framework I often see reccomendations to decouple code but most of the time that is accompanied by a 'if you want to release as a third party bundle'. Which begs the ...
1
vote
2answers
115 views

Application model management questions

Consider the following type of Java / Spring web application, with an SQL database: there are multiple data entity types (about 100) with relations between them the entities are viewed, edited or ...