Why do many frameworks now use Composer to install them, making it more difficult to learn?

WBOY
Release: 2016-07-07 14:01:29
Original
1474 people have browsed it

Reply content:

Are you learning PHP because it's easy? Disaster?

The difficult thing is not using composer, but letting you accept new things.

Dependency management and automatic loading are not too fun to use.
Once you use composer, you'll never be able to live without it.

JavaScript has npm
Java has Maven
After Python 3.4, pip is directly integrated.
What about PHP? That's composer.

Using composer is as easy as ordering food, unless you have choice syndrome. Composer is a new dependency management tool in the PHP world. When I first met Composer, I felt like I had just met it too late.

PHP can also use pear and pecl for dependency management. The former manages PHP libraries and the latter manages PHP extensions. It's also convenient in some cases, I especially like using pecl to install PHP extensions.

The advantage of Composer is that you only need to provide a composer.json file to declare the third-party libraries that need to be used, and all its dependencies can be installed with a simple command. It is also convenient for project deployment and release, because you only need to provide a composer.json.

The current disadvantage is the lack of direct support for some static resources (such as js, css), which may be related to its positioning.

Of course, Composer is not only a dependency management tool, but also provides automatic loading support. This involves the PSR-0 specification of the php-fig organization. If you are interested, please visit its official website: PHP-FIG — PHP Framework Interop Group.

The difficulty of learning is limited, but the convenience it brings is unlimited! Dependency management tools, something needed for larger projects
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!