What a novice PHP developer should know


    I am often asked such a question, and I decided to answer it.

    I wanted to write another article about the interviews, but it seems to me that the format has outlived itself , so we read and shake it off.

    Foundation


    Consider and use Google. The first is difficult to evaluate, for this a lot of “stupid” questions were invented for interviews. The second item is either vaccinated in the first days of the trial period, or the developer owns it initially, no one is considering another option ...

    General knowledge



    I have a question for an interview on the general development of what happens after entering domain.com/index.phpand pressing enter, you should tell the following:
    • where and how does the browser know the server IP address
    • why our request will be processed by apache
    • why apache will run PHP to handle index.php
    • how PHP handles index.php script

    I again go back to the interviews, and beckons me straight

    What does an HTTP request / response consist of (yes, open firebug or whatever is installed there and look)
    Installing the Apache + PHP + MySQL Bundle - Practice, this is awesome .
    This is a bit about linux - about the differences in file systems compared to windows, about the distribution of rights (chmod) and how to exit vi without saving.

    A couple of days will be required to master basic knowledge.

    Php


    Fundamentals of basics - receiving and processing incoming parameters.

    Submit the form:


    And here is the listing index.php, and as a result of the script we will see ...:
    function some_logic($a, $b = 24) {
        return ($a+$b)/$_REQUEST['b'];
    }
    $var1 = $_GET['a'];
    echo some_logic($var1);
    


    Work with loops, arrays and strings. And yes, a simple task from the interview (it's time to calm down):
    // переставьте буквы в словах в обратном порядке
    $str = "Hello world!";
    


    Work with the database and with files. For assimilation of the material - here's the task for you: write an anonymous bulletin board (with a black ... image loading)

    Must know how the session mechanism works - i.e. what happens from the moment session_start is called, and how sideways this is all related to cookies (remember, did I talk about HTTP?).
    Know what include, require is and what the difference between them is.
    The difference between echo and print is not only known, but also understood.
    So learn how to work with objects, understand the difference between an abstract class and an interface.
    Know and use namespace.

    Separately, it is worth mentioning code hygiene - it is necessary to comply with coding standards, out of many existing ones I recommend Zend Framework’s coding standards

    The more experience, the better, but you tighten the basics in a week, the AKI will require another week.

    SQL



    SQL syntax basics. A little understanding of MySQL and understand the differences between MyISAM and InnoDB.

    Know how the LEFT / RIGHT / INNER JOIN'y - clearly in the article the Visual Representation of the SQL Joins (picture link for the lazy - . Visual_SQL_JOINS_orig jpg O_o)

    To be able to design a database for a small project. Here are the requirements for the library database:
    The following information should be stored in the database:
    • What kind of books do we have available
    • Book authors
    • Library visitors
    • Librarians


    Allows you to perform the following queries:
    • Which will pull out all the authors read by the visitor "Ivanov"
    • Which will allow you to find out who is currently reading books for more than 3 days


    Redo the database, as the library often has more than one copy of the book, but you need to know which copy the visitor took.

    A focused study during the week is enough for you.

    HTML and CSS


    Make up a couple of pages, from and to (HTML must be valid). Do not listen that this is the work of the designer / layout designer / someone else. Believe my experience - they will give you a page, no one will integrate an HTML template into your system for you, so knowledge of HTML and CSS is mandatory.
    Forget that Smarty was created for layout designers, and they will give you ready-made templates - these are fairy tales. Forget about Smarty, too, although there isn’t - to have an idea what this is of course necessary, but to use it is not.

    They should understand the following CSS:

    #my p.sel:first-line, .main li li a:hover + span {
        color:#f00; /* Что это за цвет? Включи логику! */
    }
    


    Find out what the block model is, and how the float works. What is margin and padding.

    Five days is enough for you to master the basic skills of a layout designer.

    Javascript


    Know: the syntax of how events work, understand what a closure is, and how AJAX works. I recommend reading the textbook by Ilya Kantor . This is not much, studying these questions will not take you more than a week.
    Next, read the first six parts of my jQuery for Beginners series — a couple more days to learn.

    Just a little more stress


    Understanding the MVC pattern. Acquaintance with a thread framework (Zend Framework, Symfony, Yii, etc.). You can go through Quick Start from Zend Framework.
    Learn to work with databases through PDO . Know what SQL injection is.
    Get to know a thread with a modern version control system (yes even with SVN)

    And what can I count on?


    A month of study, and you can already apply for the position of Junior PHP developer. The answer to the mercantile question, look at DOU

    PS There is something to supplement - write comments, saw a mistake - better in PM

    Also popular now: