Home  >  Article  >  Backend Development  >  How long does it take to learn a new framework in PHP?

How long does it take to learn a new framework in PHP?

(*-*)浩
(*-*)浩Original
2019-09-16 11:41:313355browse

There are many PHP frameworks emerging today. I am not an expert in this field, and I can’t even use one of them proficiently, so I don’t make recommendations, and I don’t want to discuss which ones are frameworks and which ones are not. What I want to discuss here is how to start using a new framework faster.

How long does it take to learn a new framework in PHP?

#First of all you must choose a framework, such as ZendFramework, Cake, Symfony, atk, Yii, CodeIgniter, Solar, PRADO, etc. Which one to choose? Some frameworks provide great "step-by-step" tutorials, while others are more difficult to get started with. (Recommended learning: PHP Programming from entry to proficiency)

I like this article very much: "Exercises required to learn a new programming language", but I Because you are already familiar with PHP, this method cannot be used in the learning framework. So I would like to list some similar exercises for learning PHP framework.

If you don’t know how to use the framework yet, why not follow the exercises in this article to learn?

1. Hello world

I won’t explain the necessity of practicing here. Build an application on a new framework and display "'hello world" on the page. Of course, it won't be that simple.

2. Calculator

Write a simple calculator program, combine the form, perform operations such as addition, subtraction, multiplication and division on the two operands, and put The results are output to the page. You need to set up a separate action, or method (called differently in each framework) for each operation, and also use the form validation function in the framework (if the framework provides this function).

3. Guestbook

Let’s go back to 1998 - create a guestbook program, display a form on the page for users to fill in, and then Submit it to this application, then store it in a database or text file (depending on your own situation), and display the content of the user's message on the page. If the framework provides functionality for creating HTML forms, object models, or layers, use them.

4. Parse and paginate (parse and paginate)

Select an RSS source or other XML source, parse the entries and display them. At the same time, a paging function is added, allowing users to browse five items by five, and add page numbers at the top or bottom of the page. If the framework provides such functionality, use it.

After completing the above exercises, you should be able to clearly know how to use this framework, and can use it to complete more complex work, or continue to explore other functions of this framework. If you still don’t know how to use it, or you spend a lot of time completing the above exercises, then I think this framework is not suitable for you, so you should find something else to use.

Remember, if you encounter difficulties when using a framework, remember to seek help from the framework’s community. A framework with such strong community support will bring great help to your future work, and it also shows that this framework is a good framework. No one wants to use a framework six months later, and the developer of the framework announces that development is discontinued. This is very annoying. ID card specifically distinguishes the differences between the same behavior and status.

The above is the detailed content of How long does it take to learn a new framework in PHP?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn