Answer the question
In order to leave comments, you need to log in
What are the disadvantages of a site on pure php?
Many people say that in order to develop a normal site (and I want to make a multi-page site with authorization, commenting, admin panel, etc.), you need to use some kind of framework, for example yii2. What are the advantages and disadvantages of a site on regular php without using frameworks? It's just that I can write something sensible in php, but I have no experience with frameworks. Is it worth spending time on learning the same yii or can you just write everything in php?
Answer the question
In order to leave comments, you need to log in
Is it worth spending time on learning the same yii or can you just write everything in php?
There is a difference between pure PHP and spaghetti code.
If you make a high-quality code base that will be written with the competent use of design patterns, will be readable and meet the maximum number of PSRs - write it yourself, however, in this case you will write 70 percent of the same framework.
Perhaps you should consider using Symphony components if you are so critical to reduce the number of layers.
If, however, the point is that you simply do not know the framework, I recommend mastering it. A lot of things can be sorted out in the head and speed up the development of applications in the future.
If you want to write your own. From the very beginning, you need to develop an algorithmic base so that when your favorite technology or framework goes into oblivion, you will not be kicked out into the cold with a bare ass. And only then take the programming language first (let’s pretend that you didn’t take php) and file your crutches with bicycles, for common tasks (strings, data, graphs, hash tables, etc.), try to sort without built-in functions. Do I need it, you ask? I'm a cool proger, I want to rivet sites, and not teach your algorithms. This was done in order to be a programmer and not a coder, and if necessary, jump on the technologies that you need (like peaks, or whatever you like) with minimal learning costs. After that, you write your Frankenstein with hands from the sphinctor and eyes on them (your own MVC framework), trvmpunk will envy crutches, then look at other people's crutches in the form of frameworks (unlike your crutches, these are debugged as needed and tested more than one hundred times, as well as recognized and used in a wide range) and finish their crutches to a sane state. But I do not advise, use debugged and tested crutches. Time to study will more than pay off and not only in time but also in money.
Learning something new is necessary and useful.
If there is a job that requires here and now - write as you can.
If there is a job, doing which you can learn new things in parallel, study it for sure.
Having understood some framework, you can not only make projects on it, but also support other people's projects that someone else wrote on this framework. The circle of possible earnings is increasing.
Popular CMS and frameworks are written by people with good experience, studying them you can get ideas and interesting solutions.
Well, of course you can write in pure PHP, this has its own advantages.
I myself eat sites in php, but I understand that I need to learn something new to grow, so to speak) I decided to study laravel, but later, I will finish the project and then ... or maybe one more and then ... :)
as far as I understand, the framework reduces time by writing code at times, and applications probably work faster, but I need to spend a lot of time studying, so I put it off all the time ...
Today, the fashion is more for libraries than for frameworks.
For example, I use net/http, mustache, and sqlx in my work (on Go) for typical sites.
The admin panel can be installed separately, for example https://github.com/simov/express-admin
The framework is a hodgepodge of third-party libraries plus authors' cockroaches (which also need to be taught).
==========
UPD. Yes, I agree, my answer is provocative.
However, what you need for the site:
What did I miss? (Not trolling, I really don’t know why a framework is needed in this situation, what does it give?)
According to my acquaintance with Django, there is exactly the same thing, only assembled together in advance.
What are the advantages and disadvantages of a site on regular php without using frameworks?no advantage if you know how to write programs so that they remain extensible, with a clear architecture.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question