Folder Structure mixing front and backend for scalable Projekt

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:

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?
 
Joined
Mar 11, 2022
Messages
227
Reaction score
32
Alright. First of all it seems to me that you don't really know about MVC in PHP.
So what exactly is your goal with that?
 
Joined
Jul 12, 2020
Messages
89
Reaction score
9
The only difference between the front and back end is the use of forms and controls.
1. Layout your HTML documents for both front and back end first!
Include login, logout, listings, item detail pages etc. even the way you want your
shopping cart to look. The whole shootin' match.

2. Connect all pages to simulate both the front and back end experience! This will help
you to understand how to setup your directory structures.

That should get you started anyway...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top