Answer the question
In order to leave comments, you need to log in
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
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...
wrote a website on WordPress
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.
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.
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."
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 questionAsk a Question
731 491 924 answers to any question