Now I can't make even a small website





In short, I well remember how in 2013 I sat down and wrote a small website in one day.



It was a site about the events of my hometown. All events for the coming week were displayed on one page.



I made a page with events, and a small admin panel where they were edited. I had a book on PHP, so I wrote the site in PHP, connected the MySQL database, laid out it in HTML and CSS, and uploaded it to shared hosting. The site was used, and I diligently added events every morning until I went into the army, leaving no one to support. So the site died.



The idea of ​​the site still seemed good, and I decided to revive it. It would seem, take it and do it, but what played against me was that I didn't really remember PHP, and had already managed to gain experience in development in very large, medium and small companies.



I decided to get down to business and began to think.



Hmm, I can't just take PHP and write a few pages in it mixed with HTML. How will I support this without OOP and generally normal code splitting? In addition, everyone says that PHP is not very good, and how many new versions have come out!



I probably need to take something more modern, Node.js or Python. But I, of course, will not just write on them because they are not Best Practices. Perhaps I'll take some framework, for example, Django or Express.js. However, these are the most popular frameworks, but there are others, more modern, you need to look.



Having decided that I would use either Python or Node.js, I realized that just giving entire pages from the server is not good. How can I make authorization pop-ups or dynamic loading in this case? Well, not with jQuery, God forbid! I'll probably use React or Vue.js to write a proper, component-based interface. Angular will be overkill, of course. Using the framework, I need to connect to the backend via API, so I use Django REST Framework or something like that. It's good that Express.js can do this on its own, perhaps it is worth choosing Node.js in the end. On the frontend, I should connect Axios, although there is now Fetch, but is it supported by all browsers? Or maybe I should use Svelte at all to learn something new at the same time ?!



Now it's worth setting up the IDE correctly in order to respect Code Styles, correct indentation, and never forget to write triple equals instead of double. Setting up is difficult because IDE plugins argue with each other and put semicolons in the wrong places.



Having figured it out, I understand that my code needs to be stored somewhere. Since I'm already pretty tired, I'll choose the most popular GitHub. After setting up Git and ssh authorization on my computer, I realize that I don't know which branching system to use. GitFlow is too redundant while I'm alone, but don't commit everything to the master branch? You never know, someone will join the project, or if I show the repository at the interview, everyone will laugh. There is also a non-idle question of what to write in the commit descriptions and in what language, but let's leave that for later.



It is worth thinking about how to deploy this whole thing on a hosting. If the backend is in Python, then you need to create a virtual environment and work in it. For some reason, this does not work outright on the server, something always falls. By the way, you need to run the application as a service so that everything restarts after a crash! That's it, now we definitely take Noda! For backing on Node.js, you need to find a hosting where Node.js works, and they are all cloud-based and very modern. There you need to configure the deployment of the project from the repository on GitHub, but I can't just connect the master branch, because then all my changes will immediately go to the server, which is not very good. Of course, you can deploy manually, but this is also somehow outdated. Perhaps I'll think about the branching system again.



Oh, still the same DB! It seems PostreSQL is good, and I even worked with it, but maybe I need a nosql database? The question remains, how to deploy it on the server, and how to maintain the same structure on my computer and in the cloud without losing data, but this is still a long way off.



Ah, I almost forgot. Since the frontend is on JS frameworks, then you need to think about Server Side Rendering, it is important that my project is indexed. Hmm, don't you need to use Next.js or Nuxt.js for this? Need to think.



Since I have already begun to forget something, I need to screw some task tracker to track tasks and progress. Should I use Scrum or Kanban methodologies? Or while I'm alone, can I do that? So how do you keep track of deadlines?



I also haven't thought of TS, ES6, SASS, PUG, GraphQL, OOP, functional programming, immutability and all that stuff. And it will be necessary to fasten the HTTPS certificate! Maybe I should get a couple of friends on the team to get it right together? Then you can't do without Scrum and Pull Requests.



On this note, I was finally tired and thought that maybe I should dig out an old book on PHP and do everything like in 2013, when I had no idea about anything above, and half of the technologies had not yet appeared? It seems like I'm thinking too much ahead. I'll solve all this later, now I'll watch the series and go to bed, and tomorrow I'll definitely start programming.



All Articles