MicahWW / Money-Tracking-Functions

The backend to a service to help track how one's money is being spent
0 stars 0 forks source link

Naming scheme for files and functions #4

Open MicahWW opened 4 months ago

MicahWW commented 4 months ago

Many routes, file names, folders, and class names have the item they are trying to describe as either plural or singular. There should be consistency.

Across these 4 the plurality can change but it should be consistent within.

MicahWW commented 4 months ago

Routes

I think with the current routes (excluding setup routes) that we have they should all be plural as their only function so far is to grab data and by default, they grab all of the items from their corresponding tables and some have a query ability.

Folders

I think these should be plural as they hold multiple files in them. Somewhat related, I think all of the setup functions should be moved to be in their own folder nested under the Functions folder instead of the root folder.

File names & Class names

The file names and class names are mostly tied to each other, which should stay as such in my opinion, so I'm grouping them. This one I am not 100% sure which way it should go.

@codyswanner I am not sure if it is because I have been staring at code for over 8 hours today or that it is getting late but what is your input on this?

codyswanner commented 4 months ago

What you have written here sounds reasonable to me, although I have yet to really take a deep dive into reading all the code as it exists (especially any recent changes in this last eight-hour session). The only notes I have based on what you said so far is that if setup functions are going into their own folder/module/however that will work, and that directory includes specifically setup functions, then it should be called SetupFunctions rather than Functions. We love specificity in naming, helps with having to rename things again later when a different set of functions with a different role and purpose are also being bundled into their own directory and need a distinct name.

I'll try to take a closer look at the code soon so I have more direct context for this.

MicahWW commented 4 months ago

All routes have been changed to use the plurality that makes sense in 9ca70d

Setup functions got moved into the Functions folder in 234af41

@codyswanner, can you take a look and see if you notice anything for the routes that should change?

codyswanner commented 3 months ago

I still have not gotten to read through this codebase to the level I'd like, but the routes seem fine to me at a high level. @MicahWW if you want to set up a call sometime and go through it with a fine-tooth comb I'd be willing to do that, I may have smaller naming/structure suggestions.