Questions tagged [file-organization]

This tag refers to the method by which files are organized on a system.

Use this tag for questions related to the order, categorization, or sorting of files on a particular system.

70 questions
94
votes
4 answers

Split Python Flask app into multiple files

I'm having trouble understanding how to split a flask app into multiple files. I'm creating a web service and I want to split the api's into different files (AccountAPI.py, UploadAPI.py, ...), just so I don't have one huge python file. I've read…
user1751547
  • 1,821
  • 3
  • 16
  • 25
78
votes
13 answers

Multiple classes in a header file vs. a single header file per class

For whatever reason, our company has a coding guideline that states: Each class shall have it's own header and implementation file. So if we wrote a class called MyString we would need an associated MyStringh.h and MyString.cxx. Does anyone else do…
Mike Baker
  • 1,206
  • 2
  • 12
  • 14
73
votes
9 answers

Should I use #include in headers?

Is it necessary to #include some file, if inside a header (*.h), types defined in this file are used? For instance, if I use GLib and wish to use the gchar basic type in a structure defined in my header, is it necessary to do a #include ,…
Victor
  • 739
  • 1
  • 6
  • 3
64
votes
3 answers

Workflow to create Xcode groups as file system folders

I like organizing my classes into groups, in the Xcode 4 project navigator pane. I also use GIT versioning via the terminal, which works better for me than the Xcode 4 integration. To me it makes the most sense when the groups I create in Xcode…
epologee
  • 10,851
  • 9
  • 64
  • 102
31
votes
3 answers

How to store images in your filesystem

Currently, I've got images (max. 6MB) stored as BLOB in a InnoDB table. As the size of the data is growing, the nightly backup is growing slower and slower hindering normal performance. So, the binary data needs to go to the file system. (pointers…
Jacco
  • 22,184
  • 17
  • 83
  • 104
28
votes
8 answers

Organization of C files

I'm used to doing all my coding in one C file. However, I'm working on a project large enough that it becomes impractical to do so. I've been #including them together but I've run into cases where I'm #including some files multiple times, etc. I've…
Kyle Cronin
  • 72,761
  • 40
  • 144
  • 160
22
votes
1 answer

Eclipse Organize Packages into Folder Hierarchy

I have a bunch of packages in an Eclipse project they have names like: edu.xxx.proj.app edu.xxx.proj.demo edu.xxx.proj.utils Is there a way in Eclipse to automatically collapse them into a folder structure? I would like them to be as follows on the…
Nate Glenn
  • 5,926
  • 6
  • 38
  • 89
21
votes
2 answers

How to split an ansible role's `defaults/main.yml` file into multiple files?

In some ansible roles (e.g. roles/my-role/) I've got quite some big default variables files (defaults/main.yml). I'd like to split the main.yml into several smaller files. Is it possible to do that? I've tried creating the files defaults/1.yml and…
myrdd
  • 2,272
  • 1
  • 17
  • 22
16
votes
2 answers

Webapp file organization convention (development structure)

For the webapps I'm developing, I usually use the following files organization, since I think it respects the convention: src |-- main |-- resources | |-- *.properties | |-- *.xml | |-- spring | |--…
sp00m
  • 44,266
  • 23
  • 127
  • 230
14
votes
2 answers

Best practices for maintaining cronjobs and shell scripts?

I have inherited a sprawling crontab that I need to maintain and update. I don't have much experience with it or bash scripting (I think I've got a decent grip on the basics) and I want to do a good job. Short request: Any guidelines for…
Azazo
  • 221
  • 2
  • 8
11
votes
9 answers

Should I put many functions into one file? Or, more or less, one function per file?

I love to organize my code, so ideally I want one class per file or, when I have non-member functions, one function per file. The reasons are: When I read the code I will always know in what file I should find a certain function or class. If it's…
Frank
  • 58,417
  • 87
  • 227
  • 317
7
votes
10 answers

How Granular are your SVN "projects": one big project containing several releated apps or one "project' per app

I define a project as an SVN directory containing trunk, branches, tags sub dirs. What criteria do you use when determining when to split a project into two or consolidate several projects into one? - One App per "Project" with a shared projects for…
Peter Kahn
  • 10,918
  • 14
  • 64
  • 108
6
votes
14 answers

On XP, best way to synchronize files and folders

I'm using SyncToy 1.4 and it would be fine for what I need except that: It can't handle the assigned drive letter changing between systems (e.g. syncing a USB drive), it leaves its own (hidden) files in the folders being synched (is this a…
Rob Kam
  • 9,537
  • 14
  • 52
  • 64
5
votes
1 answer

How to organize Interfaces/classes/implementations in the project

I found some questions about how to organise projects (namespace, one class per file etc), but on a more specific note, how do you organize "things" that are very tightly related ? I usually end up with : an interface IMyStuff a base (sometimes…
tsimbalar
  • 5,348
  • 6
  • 37
  • 55
5
votes
6 answers

PHP organize uploaded photos

I am building a PHP application that lets users upload photos. To make it manageable, a folder shall have maximum of 5000 photos. Each uploaded photo will be assigned an ID in the database, and the photo will be renamed to the ID. How do I check if…
WebNovice
  • 2,156
  • 3
  • 20
  • 39
1
2 3 4 5