I ask because in programming they try to systematize everything and create a certain style of writing. I used to surf the Internet a lot in search of information on this issue and the result - everyone writes as they please. Maybe this is correct, for security purposes. For example, do not create the folder "adm", and instead, "aifjdh". I decided to rewrite my website and faced a dilemma, to do it right or as always. I want to teach myself to order.

  • Today I watched the source code of one portal system, the whole thing is messed up. The code is written in a very high quality, but made a conclusion - no matter how confused it is, the system has got into third-party hands all the time and can be downloaded free of charge on the net, just to find it. - Palmervan
  • one
    Use MVC frameworks - they train to a certain order. - Specter
  • Do not use frameworks, first write a couple of sites without using frameworks but using the MVC paradigm to write correctly. At a minimum - to share the logic of working with the database and output, the most pleasant :) PS: I personally first studied MVC, then wrote to CI, Zend ... I didn’t like it, wrote a very simple framework in toga (which helps to follow the MVC paradigm), and the rest already writing, connecting, as needed. Actually, it’s not important whether you use frameworks, the most important thing is splitting any code into logical components. And you don’t even have to write OOP code .. - Zowie
  • > And it is not even necessary to write an OOP code ... facepalm, then what logical components are we talking about? - Specter
  • in the sense of? corny: <br> <br> view folder - templates are stored here <br> model folder - here are scripts for working with databases <br> controller folder - controllers are here ... <br> <br> frontControlelr is also easily written with using a procedural code, if you think that without OOP, it is not possible to break the code into logical components, this is just your opinion, I personally worked with the site where the MVC paradigm was used and all the code was written in a procedural style. <br> PS: I write the code myself using OOP, I just wrote that <b> OOP in MVC is not mandatory </ b> <br> Any more questions? - Zowie

2 answers 2

@Monsi , protection in this way is not protection. The maximum can be confused for a while lazy)

On adequate sites use either English words or their abbreviations.

  • / admin /
  • / catalog /
  • / engine /
  • / images /
  • / style /

Or

  • / admin /
  • / cat /
  • / sys /
  • / img /
  • / css /
  • / js /

And so on. It is necessary to develop a directory tree applicable to the project, taking into account the separation of file types (you don’t need to push pictures with styles into one folder, but you don’t need to do it for each js either). It should be convenient to you in the first place, make a start from it.

  • I found in the internet several options for sticks and they differ from each other. Since I decided not to redo everything again - to find out if there is a rule, but it turned out that there are no hard and fast rules. Thanks a lot, everyone. - Monstrs-Inc

I would look in the direction of the Zend Framework

Let it be difficult at first and very difficult

but gradually, everything will fall into place

  • Thank. I will try to figure it out. - Monstrs-Inc