DEV Community

mitchelln11
mitchelln11

Posted on

1 1

Proper Folder Structure with Dynamic Methods?

If I have dynamic methods that could be used on several Controllers, where should those go?

Is this a possibility? Is it the wrong way to go about folder/file structure?

Ex:



-ParkController
--with FetchParkApiMethod() inside file

-TrailController
--with FetchTrailApiMethod() inside file

--OR--

-ParkController
-TrailController

-HelperFolder
--FetchDynamicApiMethod() which could be referenced in the Park or Trail Controllers.

Top comments (0)

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay