Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CRUD vs AGUD vs AFUD...what's your naming convention of preference [closed]

Do you write createSomething() or addSomething()?

Do you write readSomething(), getSomething() or fetchSomething()?

This is totally a petty gripe. In the meeting room we refer to it as CRUD, but in actual code, it's becoming AGUD.

What's your naming convention of preference? Does it matter?

thnx.

like image 285
user45441 Avatar asked Dec 11 '08 18:12

user45441


2 Answers

CRUD works better as an acronym. In practice, I generally use IACREUD:

  • Index lists the elements available for editing; also displays the delete form.
  • Add is the view used to display the form for adding content;
  • Create is the backend code that handles the Add form;
  • Retrieve is the only view used in the frontend application;
  • Edit is the view used to display the form for editing existing content;
  • Update is the backend code that handles the Edit form;
  • Delete is the backend code that handles the Delete form.

I can't really think of a good acronym for that..

like image 156
Nathan Strong Avatar answered Sep 30 '22 11:09

Nathan Strong


BREAD - browse, read, edit, add, delete.

like image 30
monzee Avatar answered Sep 30 '22 12:09

monzee