Right now I’m making my first site that actually stores content/posts.
Here’s what the structure looks like right now:
The user plugs in data into an HTML form
HTML inputs are passed to a PHP script, which makes a .json file containing said data in a subdirectory. It also modifies a file that has a list of all the .json files made so far, and creates a file that holds a value (which is used in a python script that the PHP executes).
When the posts are being viewed, a Js file gets the file with the list of posts, and passes it to another Js file
Js file iterates through said list and makes each of the posts an element in the webpage
First of all, I’ve only been doing web development for about 2 months (inconsistently), so I have no idea how efficient this site is right now. It feels like I am going about this in strange/inefficient ways. I’ve heard that when you’re doing content management you should use a database. If that’s true, how would that work, and what type of database should I use?
Really the only thing I am asking for right now is feedback, because this is really complicated to me. It works, but I don’t now if things could be working any better. I posted what I have done so far on github if you want to take a look at the actual code. Any feedback is appreciated.