V
V
Vasily Pupkin2016-03-20 20:40:41
Yii
Vasily Pupkin, 2016-03-20 20:40:41

Is it worth it to write your bikes to a beginner?

For starters: I know PHP syntax, basics and general understanding of OOP, I understand MVC pattern, html / css, quite a bit of javascript, MySql, I wrote a site on WordPress, and so I decided to start learning the framework (yii2 in my case).
But before that, I didn’t write anything like that in pure PHP (a simple blog in which there was essentially no architecture (well, like MVC), I just don’t count php files in the same folder in a row).
Question: should I write something of my own from scratch, in pure PHP, but using patterns, or continue to study the work of the framework and use ready-made solutions for my needs, grow to a middle developer and only then try to write something similar? Tell me please.

Answer the question

In order to leave comments, you need to log in

6 answer(s)
T
trevoga_su, 2016-03-20
@nikosson

Now the holy war will begin. On, recently it was just - Your blog from scratch, is that right?

- Hello, Doctor! I have a problem's.
Doctor (writes something in the case history):
- Sit down, my dear ... Tell me.
- I have ... a faded look ... And my right shoulder is twitching!
Doctor (continuing to write):
- Valerian and two tablets of nothing for the night - and like a hand, like a hand ...
- At night I dream that I am building underground pyramids in Tuscany. I am terribly concerned about the safety of the frescoes and the behavior of the binder solution in contact with groundwater...
Doctor (looks up):
- What are you talking about! How are you reinforcing the foundation? I highly recommend twisted four-hot rods - for centuries, you know, a run-in technique ...
- Doctor, something is going wrong... On the identifier are the phones of people who did not call me, all the words on the signs and posters that the eye clings to are of the same root...
My hamster does not talk to me for the fourth day, he sits motionless in the corner of the cage and looks at me with the eyes of a barlog aiming at Gandalf with the tip of a whip ...
- What, however, is a well-read animal! Have you tried giving him Russian classics?
- Doctor, I feel and understand women...
Doctor (dropping his glasses on the table, in an undertone):
- Oh, panki...

N
newpy, 2016-03-21
@newpy

wrote a website on WordPress

The Wordpress site does not give exactly any understanding of OOP and MVC. Can you answer the question what is the difference between an abstract class and an interface? What are static methods and properties? Not? Fill this gap before you get into frameworks.
I advise you to fill this gap before you take on the frameworks.
You can not me, but yourself, without looking into the literature, answer the question - what is the difference between LEFT / RIGHT JOIN, INNER / OUTER JOIN? This is a simple question, and if you can't answer them, you need to fill this gap before you take on frameworks.
For the sake of learning and checking if you really understand MVC - yes it's worth it. Write, put the code on Github. Then offer here, or somewhere else, so that more experienced comrades appreciate your approach, receive a portion of criticism, or vice versa, a wave of approval. In the first case, this is a signal for a more thorough study of those points that you will be pointed to, in the second, a signal that you can take on any existing framework today.
Bicycles are not worth writing. There are already enough of them and you will have to write them, because the framework is just a tool and it cannot solve all business problems or implement logic, you actually as a programmer will have to solve it. If you need to hammer in a nail, you don't pick up a bar of soap, because that's what you came up with, and you don't start hammering nails with a bar of soap. Theoretically, according to your assumption, this is possible, but why, if there is a hammer. A hammer can drive nails crooked, but this is probably the best way and tool for this. It remains only to learn how to use it correctly, hold it correctly, do it correctly. Those. the problem will not be with the hammer, but with you. I hope I explained clearly.
Instead of an afterword: I tried my best to resist the wave of indignation))). Well, you can’t build your learning process like that. Write something there on WordPress, a blog without MVC and OOP (everything in one folder and a heap - according to you, it means that you probably don’t even know how autoload works and what are the spl_autoload() and spl_autoload_register() methods), and say that you understand OOP and MVC. Understand any experienced programmer will reveal all your "understanding of OOP and MVC" in 1 minute when you go to get a job or want to "freelance".
You are not doing this for anyone, but for yourself. Build the right learning process (at least take a look at the program of any online PHP course, and what place do frameworks take there). Decide what is really needed and important. And what can be postponed until a solid backbone of basic knowledge appears. A framework, as I mentioned above, is a tool. It's like taking a probe - a tool, and climbing into electrical installations over 1000V, without having a permit for the electrical safety group, and having basic concepts from a school course on Electricity.
Don't take it personally as criticism. You are not to blame for this. But it's worth thinking about. You are not the first one to walk this path.

A
Anton Natarov, 2016-03-20
@HanDroid

I'm telling you as a Junior who went through this not too long ago. Definitely worth working with the framework. But in the end, you will run into knowledge only in the framework and will not be able to think in terms of PHP. In other words, it's hard enough to do something productively in a framework if you don't know how to implement it in pure Php.
In the end, there will be situations when you need to solve some difficult task, where you need the capabilities of Php itself, and the framework does not provide its own solutions.
A bicycle on a framework will give you the variability in solving complex problems in a simple way, but you will need to think of complex solutions yourself. And it is difficult for a novice developer to find the right solution without prompts (!=impossible).
Bicycle in pure PHP- will give knowledge of the language itself, if you apply the MVC pattern - you can expand your bike and figure it out in a year. If you screw ORM yourself, Doctrine for example, you will understand how it simplifies development time. If you add Service Locator patterns, dependency injection - you will understand how much more flexible your classes will become.
Naturally, after such a stack of technologies developed by hand. A framework won't seem like magic to you, and complex frameworks like Zend won't seem so complicated.

S
Saboteur, 2016-03-20
@saboteur_kiev

It makes sense to write your bike for small procedures, small scripts.
For anything complex (which will take more than a week to write), it is better to look for ready-made solutions.
If you have time, you can write your bike in parallel and put ready-made solutions, and compare what turned out better.

D
dev400, 2016-03-20
@dev400

Holivar on this topic usually. Someone says "You must! You will understand how and what works, in comparison with the framework you will see your mistakes!" , and someone says "What the heck? If smart people have already written everything for you."

P
Pshkll, 2016-03-20
@Pshkll

Depends on the task and your time to complete it. If there is a ready-made solution and you understand how it functions, then why not use it for your own purposes? If you have a lot of time and want to gain more experience - write from scratch in pure php (well, or using frameworks if you understand php well).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question