T
T
tooq2012-09-22 20:30:32
PHP
tooq, 2012-09-22 20:30:32

PHP: where to start, how to learn and what to know in the end?

Introduction

Exactly 2 months ago I asked here about how to become a professional web developer in 7 years ( http://habrahabr.ru/qa/21830/ ). It immediately became clear that I could not do without English, with which everything is not very smooth for me. For 2 months, I improved my knowledge of English at the level of reading technical literature, got a poppy and improved my knowledge in html5.

Get down to business

It's time to learn php. Although I already taught him. I know data types, functions, mysql at the level of simple queries, a little OOP and a small part of the GD2 library. It’s very bad with practice, that is, I don’t know how to apply all this in practice. I will be able to write a very simple logging system with data stored in a mysql database; login with cookies and sessions; guest book and some simple search.

Questions


1. How to learn php to implement projects on it professionally?
2. What books are worth reading for this? How to teach? How many hours a day?
3. How to learn how to use php correctly in practice? What can he do?
4. What databases to use?
5. What about frameworks?
6. What is git (github) and why is it needed?
7. What do you need to know and be able to do in the end? And how long will it take? Thanks in advance!

Answer the question

In order to leave comments, you need to log in

7 answer(s)
F
FanatPHP, 2012-09-23
@FanatPHP

For the first few points I will try to write free-form recommendations.
First and foremost, to learn PHP programming well, you need to learn programming well. This is a very important thing. Most people who write in PHP have no idea about programming. Even about such basic things as code formatting, debugging, profiling, error handling, file operations. You may notice that I am not talking about OOP. This is a completely separate topic, OOP must be taught specifically. Unfortunately, out of 100 people who say they know OOP, 90 are banal copy-pasters who have learned the syntax, but do not understand the meaning of objects. But to play chess, it is not enough to know how the pieces move.
It would also be nice to answer the question - why do you want to learn programming in PHP? The question is not at all idle. Many people mix a bunch of different concepts in it. For example, CMS has already been mentioned here. and indeed, if we are talking about making money, then customizing Jumla and writing shit modules for it is financially much more profitable than the ability to write something from scratch. For freelancing, anyway.
In general, PHP can be used in many different ways. And for each case it will be its own language.

  • You can rivet a guest or business card site on a "naked" PHP - and there is nothing wrong or shameful in this. On the contrary, this is a plus of a language that is also suitable for such purposes, without dragging along a couple of million lines of code for the sake of a site of five hundred.
    Plenty of options! so you need to decide what you want first.
    They talked about JS + CSS above - no need to listen, this is complete nonsense. Front-end programming is a completely separate thing, much more visual than abstract. And, thank God, more and more employers are beginning to understand this. Although, again, if you freelance and are a master of all trades, then you can’t do without it.
    But if you work as a hardcore server programmer in a team, then you only need to have a general idea about HTML / JS / CSS (since texts in these languages ​​are, in fact, almost the only result of PHP work).
    But what you definitely need to know well from related technologies is the HTTP protocol, the file system device, working with the command line in Linux.
    Now for the rest
    Mysql is still the cornerstone of data storage on the web. You need to know and understand joins, indexes
    . Frameworks are a must. Here, however, there is a problem of choice, but there is no fundamental difference between them. Yii is a good choice.
    You don't need Github, you don't need to know it. Need to know git.
    But what is mandatory for a web programmer is the ability to use Google. At least at the level of ability to copy-paste an error message into a search form or write a question “What is git” ;-)
    Because you need to know some version control system to work in a team, and git is a de facto standard. Understand the principle of operation and basic commands - checkout, commit, push.

V
Vitaly Zheltyakov, 2012-09-22
@VitaZheltyakov

PHP is useless to learn separately. It must be learned in conjunction with PHP + JS + HTML + CSS + SQL (or some other). It follows that a professional level can only be achieved through practice.
Practical experience can be gained in two ways:
- get a job as a trainee / student;
- try to implement your complex project yourself (the result is not important, the main thing is the experience gained).
I can also advise you to “disassemble” some framework in terms of code, see its insides, how it works, how it works.

Y
Yuri Morozov, 2012-09-23
@metamorph

Now, I'm probably going to say a wild thing, but it's better to start learning php from MVC frameworks (for example, Yii).
The fact is that php is a language that, with its whole appearance, calls for writing shitty code. If you start with the framework, your thoughts will slowly settle down, and then it will become interesting how exactly such and such a function works, and then another function, and then ... And so on.
PS. I started with CakePHP, without knowing the language at all (I wrote in pearl all my life). Cake was good for his tough policy on the architecture of the application (in Yii, by the way, this is softer). Well, somehow, word for word, after a couple of weeks, I already launched the first project, and then sort of figured out the language.

D
Denis Pushkarev, 2012-09-22
@rock

1. Not from books "for dummies"
2. For beginners - I don't even know. You can start with this . For a slightly higher level - Matt Zandstra. PHP. Objects, Patterns, and Programming Techniques .
3. They answered well here , although it would not hurt to poke around with the CMS :)
4. It would be better to think better about choosing a language :) Of course, they use MySQL most often, move on as you master it.
5. Yii , for example, fit.
6. Git is a version control system designed to manage the development of the Linux kernel. What for? In order not to get confused in the changes that are out in the code.
GitHubis the largest service for collaborative project development. Free for open-source, you can see the source of many interesting projects and even participate in the development.

I
Igor, 2012-09-22
@igoravr

The best option is to find yourself a job as an intern or assistant. There will be real tasks and live specialists at work. Solving real problems, you will study the documentation and immediately apply new knowledge in practice. You don't have to start writing your own CMS. :)

N
niko83, 2012-09-22
@niko83

1. Of course, English is important, but you overestimated its necessity for starting a career, there are a lot of excellent books (in Russian) (namely, books with a methodical presentation of information, and not scattered articles on the Internet). Books on programming should be read regularly!
2. When I started, I came up with a real project for myself and came up with tasks for myself within the framework of this project and solved them (which was not clear, looked at how it was implemented by others, and consulted with a familiar programmer), studied someone else's code. Not understandable moments worked out, researched.
3. Went to interviews, listened to smart questions, the answers to which I then carefully worked out.
4. Not a day without a line of code.

I
izharskiy, 2012-09-25
@izharskiy

as a result, ruby, in extreme cases, a python,
infa 100%

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question