It takes a lot of time and effort to learn any technology stack, whether it is front-end or mobile app development. For those who are just getting acquainted with programming, it is not always clear whether it is worth diving in it. Especially if you already have a job in another sphere that greatly limits the personal resource for learning a new profession.
In a series of articles “What you’ll be able to code in a year being engaged for two hours a day”, we with the help of professional developers show what learning a particular stack consists of and what you will be able to learn by studying it. In this article, we analyze back-end development.
Hello, I’m a PHP developer. I have been working as a programmer for 5 years, I have seen more than 20 projects, met a crowd of managers, developers, testers, analysts and other people from the IT field.
I want to share with you a development plan which helped me learn the inside out of the job and which then helped me teach another person to code almost from scratch. By sticking to this plan, by the end of the year you will master one programming language, understand at least one framework, learn how to work with API and compile a resume with your own database of projects that can be shown to the employer.
Before You Begin: Stack and Tasks
To successfully master the annual programming training plan, I recommend that you adhere to the following rules:
- Try to set aside at least two hours a day. Not everyone, but desirable.
- Don’t limit yourself to one source of information. In parallel with the official documentation, read forums, study courses, ask silly questions to Google and watch video tutorials. But do not exploit the latter – it is fraught with the role of a passive spectator.
- Avoid boredom. You need to constantly come up with a “challenge” for yourself. As an author of one book for beginners once said, “This is programming! Have fun!
- Remember that this plan is not the ultimate truth. Change it for yourself taking into account your characteristics.
The plan is universal: all that will differ in another stack is the name of the language and the list of related technologies. Replace PHP with Python (Django), Ruby (Ruby on Rails), or C# (ASP.NET), and MySQL with PostgreSQL or MSSQL, nothing will change. And in the two most popular code editors – IntelliJ IDEA and VS
Code – support for a particular language is switched on with a five-minute plugin installation.
In our case, the programming language is PHP. Next to it will be an nginx web-server (I don’t like Apache) and any database (say, MySQL). This is the mainstream solution in the PHP stack, so let’s stick with it.
On average, the stack of any language is similar, because the tasks are about the same everywhere. In the backend, most of them come down to accepting a request from the user, taking the data on request from the database and returning the data in some format. Therefore, at the initial stage, it is important to learn how to identify and solve such typical tasks.
What will we meet at the edges of the backend
- object-oriented programming (OOP);
- work with the database – for example, hang an index or optimize a query;
- work with API for sending and receiving data;
- applications with MVC architecture;
- work with data storages and third-party services;
- design patterns;
- version control system.
Don’t relax, the list doesn’t end there. These are the basic requirements for a person who applies for the job of a back-end developer.
The first stage: the basics of the language, OOP, databases — 4 months
At the very beginning of the journey, answer yourself the question: why am I doing this at all, what do I want to achieve? Maybe you want to find a job, maybe you decided to find entertainment for cozy winter evenings, or maybe there is nothing to write in the Intro on Tinder. At your discretion, the main thing is to announce it to yourself. This is your carrot which will not let you abandon halfway what you have already started.
At first, the plan will be quite strict and clear as it relies on the PHP documentation. But the further we go, the more blurry it will become – the choice of specific technologies will increasingly depend on your preferences and needs.
Time: 1–1.5 months
Open the language guide and begin to break it into logical blocks. We take the first five: types, variables, operators, constructions and functions. This is the first point of the plan: the basics of the language.
With the format “about two hours a day”, this will take a month and a half. During this time, you need to be able to install PHP, write something on it for the sake of pampering, break everything and start to dig it in. Remember the third rule – avoid boredom. You can immediately come up with a project for yourself, and you don’t have to say that there are no ideas. Make an application related to your interests or hobbies. A home library book catalog, a tool for keeping records or spending on a cat – go ahead and put your best foot forward! In a month you will have an application – crooked and slanting, but it will already work, and you will be its author.
Object Oriented Programming (OOP)
Time: 1 month
Here I advise you to postpone the documentation for a couple of days. Read the articles, try to understand the basic things about OOP, at least the difference between a class and an object. After that, immediately, before the knowledge has disappeared, we open the documentation and begin to study everything related to OOP, namespaces, class loading. This is not the easiest topic, and in order for a stable understanding of the issue to appear, you will have to spend about a month.
And, of course, practice is everything! We take our application for planning the expense of pocket money for a cat to replenish the home library and begin to rewrite it taking into account the knowledge gained. Here, at the same time, you can start thinking about the architecture of the application: how functional parts are separated, how they delegate responsibility to each other, how to make parts of the application interact with each other.
Time: 1–1.5 months
We have already written an application and even rewritten it in OOP, but we still store data in arrays? Nuisance! At this stage, you need to install some kind of database (the simplest is MySQL) and deal with the SQL language. It happens in life that people first learn databases and only then OOP, but, in my opinion, this is not very convenient: OOP is a difficult thing, it takes more time. While a person will deal with it, all SQL can disappear from his head, and he will have to learn it again. So it is better to start with OOP first, and then move on to the database.
Start by creating tables, fill them with data, make queries with and without conditions. Perhaps in a week of study you will reach the holy JOIN. If not, then two is fine. Most importantly, don’t get hung up on SQL per se. For now, databases just act as a data store for our application, and you will learn optimization tricks later. It is enough to figure out how it works and switch to sending requests from PHP. In PHP, for these purposes, the PDO library is used – a built-in mechanism for working with any databases. Once you understand how to work with the database from PHP, you can screw it all into your application.
So 4 months of our dive have passed. You figured out the basics of programming and wrote your first application that does something useful. I suggest to raise a mug of coffee to this and look at your old code to understand how you have advanced.
Second stage: version control systems, frameworks, design patterns – 4 months
So, after learning the basics of OOP, the language and working with databases, you already know a lot, but it’s too early to relax. There are still a lot of new things ahead, in particular, we have to learn how to work with the version control system in order to participate in large projects in the future and not have problems with team development.
Version control systems
Time: 3-5 weeks
The most popular version control system at the moment is Git. Install it and get yourself an account on GitHub where you will be able to upload your works. Start to understand its basic features, and if one of your goals is to find a job, then a GitHub account is your resume.
Further, the plan becomes more and more blurred, and the steps given in it are rather conditional. The choice of specific steps will depend on your goal. Each stage takes an average of a month and a half. The clearest item on this list is frameworks. You can move on to them if you have already studied OOP and databases.
Time: 1–1.5 months
In modern web development, little is written from scratch, because there are development tools and frameworks that already have the necessary functionality. For starters, I recommend Yii2 or Laravel frameworks (Yii will be a little easier for a beginner, but Laravel, in my opinion, is better organized). Just start the same way by studying their documentation and rewriting from scratch your application that you wrote at the very beginning of the tutorial. The implementation of the same idea using different tools will allow you to see the fundamental differences in the code. If the old project bored you, write something new. It is not necessary to invent a startup – just take a ready-made idea and rewrite it in your own way, for experience and not for entering an IPO.
I highly recommend to get to the bottom of everything you encounter as much in detail as possible. You saw QueryBuilder – write your own if you didn’t do it when you dealt with PDO. We saw the routing – see how it is done in the framework, and try to come up with it yourself. What for? First, to get hand in it. Second, in order to better understand the work and internal processes of so many things that they don’t look like magic for you. Thirdly, as I said at the very beginning, to create a resume in the form of a repository of your projects. If you want, you can even try to write your own home microframework, also an interesting way to study this area: I have at least two frameworks of my own, creating them helped me figure out such a thing as metaprogramming.
Time: 2–5 weeks
There is a section in OOP that for some reason a lot of people have a treasured talk about – it’s “OOP templates”, or patterns. The very appearance of this section and the book of the same name is due to the fact that developers faced the same design problems over and over again, as a result, a list of 23 templates was proposed that solves typical problems. This is so, a brief digression into history. Why didn’t we do this sooner? Because without practice, it is difficult to immediately dive into this rather academic area. A banal example – how to explain the device and the benefits of the Builder pattern if a person has not studied QueryBuilder before? It will be too difficult.
At this stage, we study design patterns of all stripes – naturally, with an emphasis on practice. At a given moment, you will understand that the main models are all about the same thing, the essence is in the nuances of implementation. Were able to master the patterns – master the methodologies.
Third stage: related technologies – 4 months
Next, we come to the vaguest part of our plan – the variety of related technologies, and not only in the field of the backend, but programming and development in general. Software development is limitless, and your next steps will depend on your needs (or the needs of the employer). Have you studied Laravel or are you just tired of it – study Symfony, this framework is no less in demand. If you want a little bit in the frontend – study JS, Angular, React, or at least jQuery. If you want to learn something beyond the REST API, web sockets and GraphQL are waiting for you. If you want to try NoSQL to store documents that you can’t put into a regular database without pain, or store data so disparate that no SQL can handle it, take MongoDB or Redis and figure it out until you’re blue in the face. If you want to know what search engines are and how text search works for “hot shots”, ElasticSearch and Sphinx are at your service.
Be sure to learn Docker, an application packaging system for a more convenient deployment. How can this be useful for a home project? If you want to change the PHP version or the language in general, you don’t have to install anything on the working machine: just change the Docker configs, and the application will start without your participation. And it will also help a little with understanding how the individual parts of the application interact with each other: frontend, web server, backend, base, what is the return of static (images and fonts). Thus, Docker allows you not to depend on the environment on the server, on the environment on the workplace, it simplifies the assembly and deployment of the project, and increases the security of work by isolating all parts of the application, including from each other. A word of advice: if you’ve worked on Windows so far, it’s time to get to grips with Linux. Because Docker and Windows are very bad friends.
If in a year you have mastered all of the above, I honestly applaud you. Because personally, at necessary time I mastered not everything from this list. If it didn’t work out, don’t despair and don’t rush to sprinkle ashes on your head – everyone learns differently.