Skip to content
This repository has been archived by the owner on Aug 8, 2020. It is now read-only.

Think about file-/folder structure for classes #112

Open
ghost opened this issue Apr 17, 2019 · 4 comments
Open

Think about file-/folder structure for classes #112

ghost opened this issue Apr 17, 2019 · 4 comments
Labels
question Further information is requested refactor Code-refactoring, cleaning up
Milestone

Comments

@ghost
Copy link

ghost commented Apr 17, 2019

We should think about where we put additional classes like in the getAllTags-EP.
We create the new class TagCount but we maybe should put such classes into a separate folder.
Maybe backend/lib/classes for the backend?
Same could be done for the frontend but primary the backend should be focused.

@ghost ghost added question Further information is requested backend Only relevant for our backend frontend Only relevant for our frontend refactor Code-refactoring, cleaning up labels Apr 17, 2019
@ghost ghost added this to the v0.x-NEXT milestone Apr 17, 2019
@Mondei1
Copy link
Member

Mondei1 commented Apr 17, 2019

This is a good question. For cases like TagCount I would leave it as it is. Because it get only used in that one file. But for our ConfigManager I would put it into that classes folder or leave it in the lib/ folder.

@ghost
Copy link
Author

ghost commented Apr 17, 2019

Maybe we should also move classes to some class-folder, even if it's not used somewhere else (yet).
Otherwise, if you want to change a class, you need to think about where it actually is declared^^°.

@ghost ghost removed backend Only relevant for our backend frontend Only relevant for our frontend labels Apr 17, 2019
@ghost ghost modified the milestones: v0.x-NEXT, v0.3-alpha Apr 17, 2019
@ghost
Copy link
Author

ghost commented Apr 18, 2019

@Mondei1 I would suggest, we use src/classes/ for the class-objects? Or do you think something like src/lib/classes/ fits better?
I would think of src/lib as a folder that's just for functions^^

@Mondei1
Copy link
Member

Mondei1 commented Apr 27, 2019

The lib folder is for everything which is a library (I know I'm genius ^^) that includes classes too. I would create that classes folder in lib.

Sure we can put single used classes in that folder but If the project grows, we search with VSCode anyway where that one class is.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested refactor Code-refactoring, cleaning up
Projects
None yet
Development

No branches or pull requests

1 participant