我不明白为什么有人需要作曲家?

时间:2022-05-21 02:06:36

I think there is no need to include composer for loading any library etc. Loading some libraries is not hard task. Its easy to include...

我认为加载任何库都不需要包含composer等。加载一些库并不难。其容易包括……

Download library > extract > put into your project > use it

下载>解压>到你的项目>使用它

This task is only one time per project. I mean its not over and over again.

这个任务每个项目只有一次。我的意思是它不是一遍又一遍。

Updating is not huge task too... just download and replace with old files in your project.

更新也不是什么大任务……只需下载并替换项目中的旧文件。

this is just 30 seconds for each library. I do not see any reason to include one more layer (composer) to my project.

每个库只需要30秒。我不认为有任何理由在我的项目中再加入一个图层(composer)。

Plus if we add this layer (composer) to our project, it brings its own problems. Check this to see how many people dealing with composer errors; https://*.com/search?q=composer+error

另外,如果我们将这个层(composer)添加到我们的项目中,它会带来自己的问题。检查这个,看看有多少人在处理作曲家的错误;https://*.com/search?q=composer +错误

I think I overlook something here. Because almost everybody use composer and recommend.

我想我忽略了一些东西。因为几乎每个人都使用作曲和推荐。

Could you tell me what I do overlook about composer? What are the benefits of it?

你能告诉我关于作曲家我所忽略的是什么吗?它的好处是什么?

2 个解决方案

#1


3  

Composer allows you to very easily install a multitude of software for your project without dealing with the details.

Composer可以让你很容易地为你的项目安装大量的软件,而不需要处理细节。

It allows the authors to use another library themselves without you having to deal with all the details.

它允许作者自己使用另一个库,而不必处理所有细节。

For example, if you would want to manually install a library that requires to install two additional libraries in the correct version, with these libraries requiring one additional library each, and additionally you'd have to initialize the autoloading of all five libraries, this might be some task to tackle.

例如,如果您想要手动安装一个需要在正确版本中安装两个附加库的库,而这些库每个都需要一个附加库,此外,您还需要初始化所有五个库的自动读操作,这可能是需要处理的任务。

With Composer, you only require one library, and after that everything is done for you.

对于Composer,你只需要一个库,然后一切都为你完成。

Additionally, it makes updating way easier for you. If your library has a bug that got fixed in a newer version, you simply update and see if your application still runs. You'd spend most of the time checking everything still runs - and barely any time updating. That's productive.

此外,它使更新方式更容易为您。如果您的库中有一个bug在更新的版本中得到修复,您只需更新它,看看您的应用程序是否还在运行。您将花费大部分时间检查所有的东西仍然在运行——几乎没有任何时间更新。这是富有成效的。

Yes, you can do it manually. But why? But I can understand that you can't see the advantage if you don't update software extensively or don't use plenty of libraries.

是的,你可以手动操作。但是为什么呢?但是我可以理解,如果你不经常更新软件或者不使用大量的库,你就看不到好处。

#2


1  

The nice thing about Composer is that handles downloading libraries for you all by itself. All you have to do is specify a list of the libraries you want and Composer does the rest.

关于编写器的好处是,它可以自行处理下载库。您只需指定所需库的列表,Composer就可以完成其余的工作。

These things you think are easy to do manually (updating library versions, including them in your project etc) are all done automatically by Composer. What do you think is easier for yourself and your dev team? Installing a bunch of libraries manually - or installing Composer, writing a single composer.json file and typing "php composer.phar update."

您认为手工操作这些事情很容易(更新库版本,包括项目中的版本),它们都是由Composer自动完成的。你认为对你自己和你的开发团队来说什么更容易?手工安装一堆库——或者安装Composer,编写一个Composer。json文件,输入“php编写器”。phar更新。”

The biggest benefit of Composer is that it will automatically grab all libraries required by the library you want. Suppose you have a library A that needs B, and B needs C, and C needs D etc. Without Composer, you would have to do this yourself. And this takes time and risks error.

Composer最大的好处是它可以自动抓取你想要的库所需的所有库。假设你有一个库a需要B, B需要C, C需要D等等。这需要时间和风险。

Let me know if you have more questions about Composer. It will save you a lot of problems in the long run.

如果你有更多关于作曲家的问题,请告诉我。从长远来看,它将为你省去许多问题。

#1


3  

Composer allows you to very easily install a multitude of software for your project without dealing with the details.

Composer可以让你很容易地为你的项目安装大量的软件,而不需要处理细节。

It allows the authors to use another library themselves without you having to deal with all the details.

它允许作者自己使用另一个库,而不必处理所有细节。

For example, if you would want to manually install a library that requires to install two additional libraries in the correct version, with these libraries requiring one additional library each, and additionally you'd have to initialize the autoloading of all five libraries, this might be some task to tackle.

例如,如果您想要手动安装一个需要在正确版本中安装两个附加库的库,而这些库每个都需要一个附加库,此外,您还需要初始化所有五个库的自动读操作,这可能是需要处理的任务。

With Composer, you only require one library, and after that everything is done for you.

对于Composer,你只需要一个库,然后一切都为你完成。

Additionally, it makes updating way easier for you. If your library has a bug that got fixed in a newer version, you simply update and see if your application still runs. You'd spend most of the time checking everything still runs - and barely any time updating. That's productive.

此外,它使更新方式更容易为您。如果您的库中有一个bug在更新的版本中得到修复,您只需更新它,看看您的应用程序是否还在运行。您将花费大部分时间检查所有的东西仍然在运行——几乎没有任何时间更新。这是富有成效的。

Yes, you can do it manually. But why? But I can understand that you can't see the advantage if you don't update software extensively or don't use plenty of libraries.

是的,你可以手动操作。但是为什么呢?但是我可以理解,如果你不经常更新软件或者不使用大量的库,你就看不到好处。

#2


1  

The nice thing about Composer is that handles downloading libraries for you all by itself. All you have to do is specify a list of the libraries you want and Composer does the rest.

关于编写器的好处是,它可以自行处理下载库。您只需指定所需库的列表,Composer就可以完成其余的工作。

These things you think are easy to do manually (updating library versions, including them in your project etc) are all done automatically by Composer. What do you think is easier for yourself and your dev team? Installing a bunch of libraries manually - or installing Composer, writing a single composer.json file and typing "php composer.phar update."

您认为手工操作这些事情很容易(更新库版本,包括项目中的版本),它们都是由Composer自动完成的。你认为对你自己和你的开发团队来说什么更容易?手工安装一堆库——或者安装Composer,编写一个Composer。json文件,输入“php编写器”。phar更新。”

The biggest benefit of Composer is that it will automatically grab all libraries required by the library you want. Suppose you have a library A that needs B, and B needs C, and C needs D etc. Without Composer, you would have to do this yourself. And this takes time and risks error.

Composer最大的好处是它可以自动抓取你想要的库所需的所有库。假设你有一个库a需要B, B需要C, C需要D等等。这需要时间和风险。

Let me know if you have more questions about Composer. It will save you a lot of problems in the long run.

如果你有更多关于作曲家的问题,请告诉我。从长远来看,它将为你省去许多问题。