Skip to main content

Questions tagged [crud]

Create, Read, Update, Delete. Fundamental operations on data stores.

Filter by
Sorted by
Tagged with
1 vote
3 answers
185 views

How to avoid duplicating Create and Update UIs in CRUD apps

For most apps I've built which deal with CRUD operations, I end up two very similar UI pages: one for the creation of the object, one for updating it. An example would be StackExchange's UI for ...
Simon Farshid's user avatar
3 votes
2 answers
2k views

Is this approach to website design adequate or am I making a mistake?

I'm not conversant with this topic, and therefore I watched a tutorial about a one-page dynamic PHP website (quite educational in my opinion) in which the creator designed the following pages. For ...
Ismael Párica's user avatar
-2 votes
1 answer
102 views

CRUD for hierarchical data in ASP.NET - single view/controller vs. separate view/controllers?

I'm trying to develop a CRUD feature for an ASP.NET app that lets me manage customer information. Each customer can be subscribed to one or more services, and each service can have one or more terms. ...
David's user avatar
  • 1
2 votes
4 answers
549 views

When Is it worth writing your own CRUD generator for project?

I need to make an app for employees & employers. When is it worth writing your own CRUD generator for a project with the aim of process automation? With such a generator I wouldn’t need to create ...
Bekzod's user avatar
  • 129
3 votes
1 answer
841 views

CRUD is too simplistic for my usecases, how would you handle the repository pattern when using MediatR and EF Core?

I have a .Net 5 Web API project and use MediatR to encapsulate my business logic into commands and queries since I don't like to have a single CRUD service handling everything related to a specific ...
Olaf Svenson's user avatar
0 votes
2 answers
121 views

Delete filesystem data associated with database record by delete hook, or internally in service logic?

Let's have many rows in the SQL database where every record has an image property that holds the path to file in the filesystem. Many database libraries have the ability to set-up hooks that are ...
Baterka's user avatar
  • 165
-2 votes
1 answer
85 views

What controls should my help desk team have over our user's accounts?

We are building a software, which we have companies registering their products. We (the administrator) will have the help desk team that'll be able to help our users (companies) in case of problems. ...
RA828's user avatar
  • 115
5 votes
3 answers
2k views

When to derive user ID from authentication token vs. validate against?

I am using JSON web tokens, but this authentication token can be any token from which a unique user can be derived. I am designing a REST API that allows CRUD operations on resources owned by specific ...
Mario Ishac's user avatar
-2 votes
1 answer
168 views

Techniques for *large* CRUD apps?

Question, what is a good way to handle large CRUD web pages? My current process is this: I make/edit the SQL table with IDs I get another set of IDs in the HTML form, which is sent to a PHP page In ...
Kyle's user avatar
  • 37
0 votes
1 answer
1k views

CRUD use case and relative sequence diagram

I'm building my project with Visual Paradigm and I have some use cases that implements the CRUD pattern. As specified in the book Use Cases: Patterns and Blueprints, Övergaard and Palmkvist suggest ...
aculf's user avatar
  • 21
-2 votes
1 answer
111 views

Is it appropriate to include an option to edit multiple rows at once for a CRUD page?

Let's say we have a situation in which we have a particular entity, for example an User which has a set of related entities e.g Book. At some point in time, a group of users phisically receives a new ...
Acerbic's user avatar
  • 69
0 votes
1 answer
1k views

Which of these is a better practice to write Python unittest for CRUD operations of REST api?

I have a python class that has methods to perform the CRUD operations via REST api: class my_class(): def get_obj(self,...) -> requests.Response: res = requests.get(...); ...
Francesco Boi's user avatar
2 votes
1 answer
356 views

Design of dropdown lists to handle optional selection

Consider the following example in a CRUD application. A user can select their favourite food from a dropdown list ("Burgers", "Pies", "Chips"). This is an optional field i.e. not mandatory. Thus a ...
Aveer28's user avatar
  • 31
-2 votes
2 answers
270 views

Typescript, CRUD Applications, and the generation of resource identifiers

I am currently trying a create a fairly simple, declarative RESTful CRUD framework, whereby I can define a resource type, and have both the API endpoint created, as well as the the functions to Create/...
dwjohnston's user avatar
  • 2,677
1 vote
1 answer
78 views

Batching CRUD of individual models that need to be linked

I have a few models which need to be linked together during a workflow on my webapp and I'm having trouble thinking of a nice abstraction for the api. They are represented as individual constructs on ...
Anisotropic's user avatar
0 votes
2 answers
4k views

How to keep CRUD user stories from being trite and simplistic?

I'm having trouble keeping my user stories for basic operations from sounding ... basic. For example, suppose I'm building a CRM to keep track of clients: C: As a user, I want to create a client, so ...
Travis's user avatar
  • 109
1 vote
0 answers
65 views

How can I offload customer's data needs onto the customer?

I write code for an Engineering application where engineers keep giving me various specs in a form of tabular data - for example, a table with product model names and many various parameters for each ...
Dennis's user avatar
  • 8,247
2 votes
1 answer
1k views

How can I turn my CRUD database application into a REST application?

I may have gotten myself confused, when reading CRUD vs REST and how they are similar, so I wanted to explicitly ask: can I turn my CRUD application into a REST application, when I have a specific ...
Dennis's user avatar
  • 8,247
1 vote
2 answers
99 views

Should application double check if data was acted upon?

Assuming the context of a CRUD: After performing a database DELETE, should an application's deletion method check if the records were actually removed from the database? If so, how valid is it for ...
Guill's user avatar
  • 119
1 vote
0 answers
136 views

Correct method for handling edit/update scenario in repository pattern

I have a repository pattern employed in my .NET Core 2.1 project. While implementing the edit/update scenario, I have a doubt. My domain: public class Component { public int Id { get; set; } ...
Vivekanand Pujar's user avatar
6 votes
4 answers
2k views

How to do BDD for CRUD?

I want to understand how Behavior-Driven Development (BDD) can be applied to building CRUD applications. I have read a lot on the subject but I just don't get how I'm supposed to apply it. I learn ...
Gudradain's user avatar
  • 454
0 votes
2 answers
135 views

User rights in a webserver, CRUD is too course grained

In our user-rights management system we basically follow "CRUD", where at each incoming request the user is checked against his rights, and see if he has create, read update or destroy rights for the ...
paul23's user avatar
  • 1,111
3 votes
0 answers
915 views

Designing CRUD Messaging communication

There are endless resources on creating CRUD for REST resources but I can't find much on doing the same for Messaging. Given two services A and B where A receives incoming requests that initiates the ...
span's user avatar
  • 415
1 vote
1 answer
555 views

What is the common practice for implementing a microservice architecture? [closed]

so I'm trying to understand how microservices are set up in a language agnostic manner for purely experimental purposes. For the sake of having a more concrete example, how would a microservice ...
Duxducis's user avatar
  • 121
1 vote
1 answer
5k views

How to name a service that does CUD operations from CRUD tetrad?

There is a need to separate services working with data into two groups: ones that perform read-only operations and others doing Create(or Add) + Update(can also be called Modify) + Delete(Remove). ...
Jaded's user avatar
  • 143
3 votes
1 answer
1k views

Authorization server implementation - CRUD vs CQRS

I want to make simple authorization & authentification server (with proper audit logging). I used to see on my job or in many examples classic CRUD approach for this purposes. But now I'm ...
Danil Gholtsman's user avatar
1 vote
3 answers
3k views

Should an update method in CRUD Repository class always return something?

I am writing a repository class with entity framework. One of the method is an update method, which simply updates an entity. The controller does not need the entity. However, from a testing ...
Daan's user avatar
  • 191
1 vote
2 answers
1k views

Multiusers systems and CRUD

I am redesigning a large enterprise web system and a major concern has come across the table. The system allows for many users to Create, Read, Update, and Delete items in the system. This is problem ...
LOTUSMS's user avatar
  • 121
2 votes
1 answer
345 views

Algorithm suggestions for handling CRUD Soft Deletes for delete and restore with multiple owning models

I have an active record based ORM with soft deletes (Laravel Eloquent to be specific) in an SQL database. The 'soft delete' behavior that is built in to the ORM is: If the record is not deleted, then ...
Josh Petitt's user avatar
1 vote
0 answers
283 views

How should I implement generic datagrid for CRUD Operations?

I wrote multiple times different apps that have following requirement. CRUD Operations via DataGrid control... Everytime I start new prject I write new code for same requirement over and over - what ...
ChenChi's user avatar
  • 119
3 votes
1 answer
2k views

How does the Aggregate Root concept and the Repository Pattern solve DRY in database operations?

If I have ten classes, and they all need CRUD operations, how does an Aggregate Root and the Repository Pattern solve me having to write lots of boilerplate code (the DRY)? Take the example of a ...
johnny's user avatar
  • 3,679
2 votes
1 answer
101 views

Encapsulate multiple retrieval methods for a class

I'm doing a little bit of cleanup and I'm trying to gather all the spread SQL queries done to an object into a single place. I have a class whose responsibility is to present a CRUD interface to the ...
Sergi Juanola's user avatar
1 vote
0 answers
84 views

How to better manage beans?

In my application - I have to expose services using JAX-RS(for mobile platform) and consume the same set of services in a JSF based web app. Now, I have @Entity beans for persistence layer, @...
Tirath's user avatar
  • 111
0 votes
2 answers
349 views

CRUD app design

I am working on a CRUD app where I have things called requests that can have many iterations. I have an endpoint to hit called iteration/create/requestId. When this page is hit I show an empty table ...
newbish's user avatar
  • 21
1 vote
1 answer
268 views

What should a Read (as in CRUD) method return for a class that uses another class with a Read method?

I am trying to build a very basic instant messaging platform. I have three basic immutable types, and each of them has a subclass for dealing with CRUD (for SRP purposes, separating the class from the ...
Michael Haddad's user avatar
2 votes
2 answers
597 views

Why is it CRUD instead of GRAS? [closed]

Why is it Create Read Update Delete instead of Get Remove Add Set ? I've been working with an API that uses ADD and SET and REMOVE. Most accessor functions are named get...() and set...(). I ...
Chloe's user avatar
  • 438
4 votes
1 answer
4k views

CRUD without an ORM

I am putting together an web app with relatively complex but standard database relationships. I notice that anytime I use an ORM, in python/ruby/php etc, in general, a lot of queries are generated. ...
user974407's user avatar
2 votes
3 answers
373 views

Java/Android CRUD SQL design

All the SQL in my app... Should I be confining it to its own special class? For example a MyDatabase class that extends SQLiteOpenHelper and implements all the create-tables, defines all the table ...
AJJ's user avatar
  • 3,008
2 votes
4 answers
1k views

Should CRUD actions be Java classes?

I am working on a simple project developing a telephone directory application. As such, it requires the implementation of the CRUD actions. Right now I have them as individual classes (e.g. "AddEntry")...
SVN600's user avatar
  • 61
1 vote
1 answer
2k views

Should written use cases be consistent with use case diagram?

I'm developing a video web system like YouTube where users can upload, view, update and delete their own videos (CRUD operation). Original I drawn the use case diagram like this: But I learned later ...
IT_Layman's user avatar
  • 117
0 votes
3 answers
2k views

What do you call CRUD with soft delete?

I want to be clear when discussing an implementation that we're using soft-deletes (not immediately removing data from the database). What can I call our approach? The best I have is "CRUD with soft ...
lofidevops's user avatar
4 votes
1 answer
1k views

Architecture design for Web API with single endpoint

Scenario: I have a situation where I need to refactor a Web service with a single API endpoint that uses complex logic to insert, update and fetch data from a database. The clients use one call, and ...
Piotr's user avatar
  • 151
1 vote
1 answer
181 views

Better way to organize query methods in Android?

In my Android app I have: A SQLiteHelper class that extends SQLIteOpenHelper, and takes care of things like table-creation and upgrades. A SQLiteDatasource class that performs CRUD operations on the ...
AJJ's user avatar
  • 3,008
12 votes
3 answers
8k views

CRUD API: How do you specify which fields to update?

Let's say you have some kind of data structure, which is persisted in some kind of database. For simplicity, let's call this data structure Person. You are now tasked to design a CRUD API, which ...
Heinzi's user avatar
  • 9,818
3 votes
2 answers
4k views

What to Return with Async CRUD methods

While there is a similar question focused on Java, I've been in debates with utilizing Task objects. What's the best way to handle returns on CRUD methods (and similar)? Common returns we've seen ...
Eric J Fisher's user avatar
31 votes
7 answers
3k views

Is it possible for business logic not to creep into the view?

I've developed for several web application projects for the last 3 years, both personal and at work, and I can't seem to figure out whether it's possible for at least some business logic not ending up ...
vdaras's user avatar
  • 453
1 vote
1 answer
498 views

URL and Controller structure for parent-child-relationship

I use an MVC web framework to create an application which contains a hierarchy: Location <1-N> Devices <N-M> Services I have a number of Locations. Each Locations can have several ...
Peanut's user avatar
  • 111
1 vote
1 answer
285 views

How to handle when one user deletes the object while the other has it opened in edit mode in a webapp?

I am developing a CRUD type web application. It is a project management system having projects, milestones, tasks, employees etc. Each employee has his/her own account to login and view the system. ...
Karolis Valiulis's user avatar
1 vote
0 answers
1k views

Syncing client and server CRUD operations using json and php

I'm working on some code to sync the state of models between client (being a javascript application) and server. Often I end up writing redundant code to track the client and server objects so I can ...
Justin's user avatar
  • 165
14 votes
8 answers
3k views

Are there examples of non CRUD approaches?

I'm a programmer but also have worked as an archivist. As archivist it's a lot about keeping data. I often get into arguments with colleagues when it comes to operations on data. I don't like the U ...
Pieter B's user avatar
  • 13.3k