- Joined
- Mar 1, 2022
- Messages
- 1
- Reaction score
- 0
My Situation
I currently create a e-commerce system as a exercise.
For now I don´t want to use any frameworks, meaning I want to write my front and backend all by my self.
At the time, I´m thinking about a scalable folder structure.
My Idea
My Idea is, to subdivide my Projekt into the different subpages.
In this Subpages are subfolders, with 'elements' like for example categories.
And in each of this 'elements' ( and for the pages ) are model, view and controller folders for the php backend.
In the end I would put together all of the 'elements' on the respective index Pages and then link it to one index.php.
For example:
Main Question
Does my Idea make sense and when not how to structure it properly?
I currently create a e-commerce system as a exercise.
For now I don´t want to use any frameworks, meaning I want to write my front and backend all by my self.
At the time, I´m thinking about a scalable folder structure.
My Idea
My Idea is, to subdivide my Projekt into the different subpages.
In this Subpages are subfolders, with 'elements' like for example categories.
And in each of this 'elements' ( and for the pages ) are model, view and controller folders for the php backend.
In the end I would put together all of the 'elements' on the respective index Pages and then link it to one index.php.
For example:
Code:
/e-commerce
/indexPage
-index.php
-indexPage.css
-indexPage.js
/model
/view
/controller
/categories
-categories.php
-categories.css
-categories.js
/model
/view
/controller
/detailsPage
-index.php
-detailsPage.css
-detailsPage.js
/model
/view
/controller
/description
-description.php
-description.css
-description.js
/model
/view
/controller
Main Question
Does my Idea make sense and when not how to structure it properly?