Php framework-is it really important to use php as a website or app?

Source: Internet
Author: User
Create an sns website and select php framework. Every time I see a lot of arguments on the internet, I despise and say which framework is good or bad. What I want to know is that the framework is really important? Create an sns website and select php framework. Every time I see a lot of arguments on the internet, I despise and say which framework is good or bad. What I want to know is that the framework is really important?

Reply content:

Create an sns website and select php framework. Every time I see a lot of arguments on the internet, I despise and say which framework is good or bad. What I want to know is that the framework is really important?

Not important. In fact, no matter what project you do, the most significant impact of the framework is the development speed, without affecting the code quality, post-maintenance, and business logic. For example, if you want to use RESTful, but select a framework that does not support RESTful, you have to handle the routing problem on your own.

The framework is essentially a set of rules. The framework is important, but it does not mean which framework is important.
You can find one that suits your taste, or write one that you think is best. I believe you will benefit from this!

The framework is the accumulation of others' experience.
"Others", that is, this experience is owned by others, and may not all be suitable for you. "experience accumulation" refers to many excellent things in it and can be used directly.

Therefore, whether you are willing to use the framework or not, you should study it carefully, compare it, and finally select the one that best suits you. Even if you don't need one at the end, you can also learn a lot.

In fact, programs that have been written for several years usually have regular solutions for certain problems (such as input filtering, image uploading, and Verification Code). This is your own "framework ".

It's a waste of time to think about this problem if you haven't written much code, just like the language I was thinking about.

It is not important for people who do not need a framework to survive. It is very important for people who are stunned by the framework, it is especially important for people not to get anything out of 3 or 4 frameworks.

In fact, this is not important. It mainly depends on whether you want development efficiency or operation efficiency.
The framework will sacrifice your running efficiency, but it will greatly improve the development efficiency. For example.
Now I want to write a program named www.xxx.com/api
Using laravel as an Example

Route::get('api',function(){    echo 'hello';})

In this way, we have completed a page for accessing www.xxx.com/api and outputting hello.
So there is no framework? Well, I don't think the code can be installed on this page.

I didn't say how good the framework is. Today's silver bullet law still exists, and we cannot improve the development efficiency and running efficiency at the same time.
Therefore, you must select development efficiency and operation efficiency. This is why the framework is born.

As for the good or bad framework, it depends on my personal preferences. For example, some people like thinkphp's automatic controller routing and some people like laravel's Manual controllable routing, so someone starts ......

After all, the advantages and disadvantages of the framework are not so easy to assess. After all, there are so many users.

Therefore, you should choose a framework based on your requirements. Your boss says that you don't need a framework to create a blog within one hour. If it's not a big touch, I think it will actually crash.
If you select a framework, it is estimated that it will take 10 minutes.

The main function of the framework is to help you save most of the boring code.

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.