T
T
TAnonim2016-08-08 17:12:27
PHP
TAnonim, 2016-08-08 17:12:27

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

8 answer(s)
M
Maxim Timofeev, 2016-08-08
@TAnonim

Is it worth spending time on learning the same yii or can you just write everything in php?

It costs 100%, besides, if you know php well, it will take a minimum of time. I think that learning yii2 and writing your simple project on it will take less time in total than writing on bare php. Of course, I do not take into account the case if you decide to give up on security and plan to write 4 php files that write everything to the database, do not use the cache, etc.
The only advantage is theoretically less resource consumption. Theoretically, because everything depends on the curvature of the hands of the programmer and his desire to do well and correctly.
You can list for a long time, but the main thing is the speed of development. Why write what has already been written?

A
Alexander Sharihin, 2016-08-08
@Pinsky

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.

M
Mr Hobot, 2016-08-08
@vashaaa

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.

S
Saboteur, 2016-08-08
@saboteur_kiev

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.

M
Max, 2016-08-08
@RozMakc

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 ...

E
Eugene 222, 2016-08-08
@mik222

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.

T
trevoga_su, 2016-08-08
@trevoga_su

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.
frameworks = it's fashion . who wouldn't say anything. web macaques follow the trends from the west as one. in fact, writing your own good code is not such a difficult task. it is only costly in terms of time, because it requires EXPERIENCE in the development and understanding of the main programming methodologies in a particular language.

N
Nikolay, 2016-09-04
@zzzmaikzzz

Get MODx

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question