cfwheels / cfwheels

An open source ColdFusion framework inspired by Ruby on Rails.
https://cfwheels.org/
Apache License 2.0
199 stars 105 forks source link

Proposed Directory Structure Changes in CFWheels 3.0 #1381

Open bpamiri opened 8 months ago

bpamiri commented 8 months ago

Discussed in https://github.com/cfwheels/cfwheels/discussions/1380

Originally posted by **bpamiri** January 16, 2024 Hi everyone, I wanted to open a discussion and get the community's input on a proposed directory structure change in CFWheels 3.0. We are working towards a 3.0 release candidate release in the next week or so and a couple of the features that have already been integrated into the bleeding edge branch are the capability to reorganize or move the application code and `wheels` directories with a configuration change. This feature was integrated into the framework as a direct result of a request from the community for the ability to move the `wheels` directory or the application code out of the root of the website. Alas, one of the mantras of our framework is convention over configuration, so it doesn't seem right to add the capability to modify the directory structure and not actually change the directory structure if most users will want that directory structure to be changed. I'm getting myself all twisted in the words, basically what I'm trying to say is this, now that this capability has been added to the framework, should we entertain the idea of reorganizing the default directory structure of the framework to better align with other modern frameworks and even modern Ruby on Rails itself. Currently a CFWheels application has the following directory structure: ``` webroot ├── config │   ├── development │   ├── maintenance │   ├── production │   └── testing ├── controllers ├── events ├── files ├── global ├── images ├── javascripts ├── miscellaneous ├── models ├── plugins ├── stylesheets ├── tests ├── views └── wheels ``` What I'm proposing as the default new directory structure is this: ``` webroot ├── app │   ├── config │   │   ├── development │   │   ├── maintenance │   │   ├── production │   │   └── testing │   ├── controllers │   ├── events │   ├── global │   ├── migrator │   ├── models │   ├── plugins │   ├── tests │   └── views ├── files ├── images ├── javascripts ├── miscellaneous ├── stylesheets └── vendor └── wheels ``` As indicated above, the `app` and the `vendor` directories can be moved completely out of the webroot and there are times when this is the desired solution, but the proposed structure aligns better with modern application design, I think. I would love to hear your input on this proposed change as well as your thoughts weather the `config` directory should be in the webroot as Ruby on Rails has it or in the `app` directory as indicated in the proposed directory structure above. -Peter
bpamiri commented 8 months ago