Code/File Structure That Juce Developers Recommend

Hello Everyone,

I’ve been using JUCE for about a year or so now – only to build small apps that aren’t too complicated. I’m not a professional C++ developer and am about to graduate college and I wanted some advice regarding code structure.
When developing a larger scale JUCE project, what is the basic code structure that most of you all would recommend. As an example, should the basic GUI layout of an application be made in the MainComponent file or should the MainComponent file use other header files to determine the GUI structure at a given time?

I apologize if the question is too broad, but I am about to embark on my first larger JUCE project and wanted some guidance in regards to this topic.

I appreciate your time and thank you.

the Juce DEMO is a pretty large project. i think it’s pretty well organized given what it does…

The best place to look for an example non-trivial JUCE app is the Projucer. It includes not only lots of complex views (like the JUCE demo) but also lots of examples of state loading/saving/management.

1 Like

This is a question I often wish I had a one-fits-all answer. Whenever I come back to a project, I see things I would do different when starting over.
The challenge is to know, when it makes sense to rewrite things and when just to live with it and only do minor adjustments.

Either way, don’t spend too much time contemplating, get your hands dirty. The only thing is, make sure to use source/version control from the beginning.

And if you intend to keep a project for long, not just for the exam, it makes sense to break out partial problems and solve them in a playground project, and move them back to the actual project later.

Good luck!

3 Likes

Wow. Thanks for the quick responses. I guess I’ll get down to it.

Appreciate it everyone.