How to become a professional PHP developer

Source: Internet
Author: User

How can I become a professional PHP developer? Bruno Skvorc, a veteran web developer, shared some insights on his blog.

When reading various PHP-related blogs, Quora issues, the Google + community, news, and magazines, Bruno Skvorc noticed that the issues discussed were polarized. For example, "How do I connect to a MySQL database?" ", or" How do I enable the messaging system to send more than 1 million emails per hour without adding servers? " ”

Bruno SKVORC divides the application into four categories based on the ability to use PHP: beginner, intermediate, professional, and elite .

Poles

In the PHP language, the novice will use some variables, includes, form processing, and so on. You will also learn some simple logical structures. With tutorials They can send emails in PHP, and they may even have access to some examples of object-oriented programming, but they don't necessarily understand the rationale behind them. They use WordPress to modify some CSS classes. They applied the knowledge to apply for a job, and unfortunately were rejected.

PHP Professional users can bring a lot of projects to life. They use a variety of frameworks to develop business applications, efficiently use different databases, participate in seminars, learn design patterns, and easily develop a complete project-from process design to final operation. They have long ceased to use procedural programming paradigms.

Elite programmers are legendary after 10000+ hours of professional professionals, write their own extensions to expand their own deployment of PHP functions, as long as a cursory view of the source files can catch the bug, the code layout is very fastidious, only to recognize the most complex projects, Find creative alternatives to solving problems before others are aware of them. They will also write some of the best-selling books on the PHP language, speak at a large number of seminars, and even create a PHP branch of their own or one or two very successful frameworks.

So, where are the intermediate users?

A missing link.

How does a programmer rise from beginner to professional or even higher? If a person only has basic programming knowledge, how can he improve his skills, abandon bad practices, and practice in advanced ways? Beginners often ask Bruno Skvorc this question. To become a professional programmer, the first step is to become an intermediate PHP programmer.

The following list points out some of the things you should be aware of when using PHP fluently:

Discard Spaghetti Code

Many people think that using a class means writing object-oriented code, whereas using a function means writing procedural code. Big mistake! Let's review the broad definition: Procedural code is code that does not use classes and objects, and object-oriented code uses classes and objects as much as possible.

Bruno Skvorc's advice was to completely abandon the code. Use the object-oriented style as much as possible-write classes, encapsulate logic, and consider real-world terminology. With reusability in mind, the performance advantages of the program code relative to class-based code are negligible. The right OOP code allows future developers to take over your project. Often people would argue: "But WordPress is a process!" "Honestly (maybe not), if the WordPress developer is the PHP developer, then the Instagram developer is the photographer. This doesn't mean WP is useless-it's great for blogs, simple websites, and one-day projects. With WP can quickly earn some money, for the users who do not know the technology is also very useful. But being proficient in WP doesn't mean you're a professional PHP developer-it's a bunch of spaghetti-like code that doesn't teach you reasonable design principles.

Start with the little things. Think about the concepts of the real world and try to express them in object-oriented code. Learn some basic tutorials and then move slowly to the advanced direction. Practice object-oriented programming until you really understand the class. Before you do that, don't be anxious to learn about the various frameworks and abstract terms like MVC.

Delve into existing projects

No matter where you see the source code, you need to delve into it carefully. For example, find PHP projects on GitHub, clone them, deploy them on your machine, and try to modify them. A file followed by a file, a line of code followed by a line of code, until you really understand what they mean.

Learning to build a PHP environment

Building a PHP environment is also a valuable skill. Not only does this allow you to tweak your configuration, but it also lets you familiarize yourself with how to build plugins through the source code.

Do not use Windows development-if your primary desktop is windows, you need to install a virtual machine software, then run a Linux virtual machine--windows case sensitive, end of line, and most of the server environment different weird, will cause you trouble. So it's best to develop in a similar environment to a server.

Virtual machines are also good for experimentation--if there's a problem, you can start again or roll back. You can also experiment without worrying about screwing everything up. It is important to master how the tools are used, but it is equally important to have a good working platform.

Experimenting with your own environment can also make you familiar with different servers-the Nginx or Apache, or the use of appserver, and so on.

Early application of best practices

When writing your own code, make sure that you have detailed comments, a perfect indentation, and a careful architecture. After building a class, project, and library, use well-known document tools (Phpdocumentor, Apigen) to extract the document and improve on that basis.

A good IDE is invaluable, and familiarity with a cross-platform editor will help you get into the code as soon as you set up your new environment, rather than wasting your time setting up keyboard shortcuts and themes. Make sure you keep your IDE configuration files in the cloud, such as Google Drive, so you can easily import them even if you have a new system installed. Bruno SKVORC recommends the Phpstorm and NetBeans two cross-platform Ides, which are free.

Adapting best practices early can help you stay consistent in your project process and help others to read your code fluently. Find your style and stick to it-it's good for you and for everyone else. Follow the PSR standards as closely as possible (PSR-0, PSR-1, PSR-2, PSR-3). The standard is not illusory. Most people follow these standards and love them because they increase the reusability and readability of each person's code.

For beginners, the PHP path is a very useful resource to provide timely guidance. With this book, you can familiarize yourself with the latest best practices, basic object-oriented concepts, security, deployment, code standards, and more.

Make a choice after trying different frames

PHP has long been a programming language with the most frameworks (JavaScript has recently caught up). It is hard to say whether this means the division of the community or the prevalence of language. But the truth is, choosing a framework is a very tangled thing, especially at the beginning.

After experimenting with most frameworks, Bruno Skvorc recommends a stable, high-quality Phalcon framework. In fact, Phalcon is written in C, can be installed as a PHP extension, so faster than the existing framework. In any case, it is absolutely necessary to try a different framework.

When you try different frameworks, you can learn new ways to solve common problems every time. Each frame has its own features and pits, but most importantly, you can learn the ideas of others (mostly framework developers). You will be exposed to new usages and methods, and refactoring your project with all the frameworks you can find is a great exercise. This will help you effectively measure the efficiency of a particular framework: speed and performance of development.

Read

Never ignore the tips and suggestions that others give you. Read as much as you can. Subscribe to a good blog, read the tutorials on the website, see Questions and Answers on StackOverflow, subscribe to mailing lists, and follow the high-quality resources on Google +. But to avoid the PHP Basic tutorial class of books, they will soon become obsolete. Instead, focus on the useful, up-to-date code snippets and tutorials on the web. Even a subject that has been touched can be read again, often to get a new idea from someone else's point of view.

If you don't have a job, invent something.

There's always something to do. Never say to yourself: "I don't have a project." "Don't even say to yourself:" I'm bored. "If you can't find a project to do, open a new one." Are you frustrated because the tools you use every day lack a feature? Make a better alternative! No ideas for new products? Then repeat the idea-try rebuilding a basic Facebook and re-creating some of your known projects to practiced hand.

The most important thing is never stop--if you stop, there won't be an amazing 10,000 hours! Continue to work, maintain their interest, and continue to invest. Do a simple address book application. Then refactor it with another frame. Then change the database (for example, replace MariaDB with Mongo). Stay busy!

Find a partner or mentor

It's easier to work with people to learn. Find a partner who is as passionate as you. Maybe you're a lucky few, and you can find a partner who can share your geek's interests. Maybe you're in school and you can find a companion who wants to start learning and need a partner. You can even find a mentor and receive some professional guidance.

Never underestimate the power of companionship!

Conclusion

As you focus on the various approaches mentioned above, you are on the way to becoming a PHP professional developer. Stick to the principle and never give up (even if the people around you give up) and keep practicing.

Original ecoming a PHP professional:the Missing Link

Compiling Segmentfault

Php
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.