Difference between revisions of "Use Composer on our shared"

From EN Ikoula wiki
⧼vector-jumptonavigation⧽ ⧼vector-jumptosearch⧽
 
(6 intermediate revisions by 2 users not shown)
Line 26: Line 26:
  
 
==What si JSON ?==
 
==What si JSON ?==
'''JSON''' (JavaScript Object Notation) is a textual data format derived from the notation of JavaScript language objects. It allows you to represent structured information as XML allows.
+
'''JSON''' (JavaScript Object Notation) is a textual data format derived from the notation of JavaScript language objects.JSON allows you to represent structured information as XML allows.
 +
If you stored data in a JavaScript objects, you can convert the object into JSON, and send it to a server, you can also convert any JSON received from the server into JavaScript
 +
JSON can makes it possible to store Javascript as text.
  
 
==The big strengths of JSON==
 
==The big strengths of JSON==
 
* Considering it's a simple character string , JSON works in all environments and languages that can handle text.
 
* Considering it's a simple character string , JSON works in all environments and languages that can handle text.
* It is learned in 5 minutes, as its syntax is short to know.
+
* JSON can be learned in 5 minutes, as its syntax is short to know.
* It is less verbose, therefore lighter than the XML while remaining readable to humans.
+
* JSON is less verbose, therefore lighter than the XML while remaining readable to humans.
* It allows you to transmit all types of data (table, chain, whole, object...)
+
* JSON allows you to transmit all types of data (table, chain, whole, object...)
 
* Since it is almost universal; it is very simple to dialogue from one language to another via JSON (PHP to Javascript is a common example)
 
* Since it is almost universal; it is very simple to dialogue from one language to another via JSON (PHP to Javascript is a common example)
 +
* JSON is lightweight format for storing and transporting data
 +
* JSON is used when data is ent from a server to a web page
 +
* JSON is self-describing and easy to understand
  
  
Line 45: Line 50:
  
  
Simply put, call allows you to set up and update the libraries used in your PHP projects through a single JSON format file  : ''composer. JSON ''.
+
Simply put, call allows you to set up and update the libraries used in your PHP projects through a single JSON format file  : composer. JSON  
  
  
Line 117: Line 122:
  
  
[[Category:Shared_hosting]]
+
[[Category:Web Hosting]]
 
[[Category:Plesk]]
 
[[Category:Plesk]]
[[Category:Plesk_12.5]]
+
 
  
 
<br />
 
<br />
 
<comments />
 
<comments />

Latest revision as of 16:29, 23 January 2022

en:Use Composer on our shared he:השתמש מלחין המשותפת שלנו ro:Utilizaţi compozitor pe nostru comun ru:Используйте композитор на нашей общей pl:Użyj kompozytor na nasze wspólne ja:我々 が共有の作曲家を使用します。 ar:استخدم الملحن على جهودنا المشتركة zh:使用上我们共享的作曲家 de:Verwenden Sie Komponist auf unserer gemeinsamen nl:Gebruik onze gedeelde componist it:Compositore di uso sul nostro comune pt:Use o compositor na nossa compartilhada es:Uso Composer en nuestro compartido fr:Utilier Composer sur nos offres mutualisées

What si JSON ?

JSON (JavaScript Object Notation) is a textual data format derived from the notation of JavaScript language objects.JSON allows you to represent structured information as XML allows. If you stored data in a JavaScript objects, you can convert the object into JSON, and send it to a server, you can also convert any JSON received from the server into JavaScript JSON can makes it possible to store Javascript as text.

The big strengths of JSON

  • Considering it's a simple character string , JSON works in all environments and languages that can handle text.
  • JSON can be learned in 5 minutes, as its syntax is short to know.
  • JSON is less verbose, therefore lighter than the XML while remaining readable to humans.
  • JSON allows you to transmit all types of data (table, chain, whole, object...)
  • Since it is almost universal; it is very simple to dialogue from one language to another via JSON (PHP to Javascript is a common example)
  • JSON is lightweight format for storing and transporting data
  • JSON is used when data is ent from a server to a web page
  • JSON is self-describing and easy to understand


Compose is now integrated with Plesk (version 12.5 at the time of writing this tutorial, cf page associated with the site of Plesk)


In fact, it is now quick and easy to install the dependencies to yor r projects.


If you do not know call, you can find more information on the official : https://getcomposer.org/


Simply put, call allows you to set up and update the libraries used in your PHP projects through a single JSON format file : composer. JSON


Relevant libraries are retrieved from the site https://packagist.org/ and the implementation of the dependencies is therefore quick and convenient.


If you use dial to your different developments, you gold-and-already know its operation.


In this tutorial we will see how to use call from Plesk.


You will find most of the PHP file composer. JSON frameworks (This is also the case for the various expaces projects PHP Github now ).


The composer. JSON file structure allows easy reading of the file and therefore can know what are the prerequisites necessary for the establishment of a framework or PHP project (version of PHP, necessary libraries, etc.) :

Structur file


So let's create a file  composer. json at the root of our service, in the directory  httpdocs as below  :
create file

Note that you can also create and edit file composer. json through your FTP client if you want.


We now edit the file to inform the prerequisites and the libraries we need for our project :

Edit file Json


We must now ask cope to interpret the JSON file that was created. To do this, we will go to the tab Applications and click on the button Scan (ou Analyze Depending on the used language ) so that Plesk search any file composer. json.

Scan file


Research being terminated, you should then see the presence of a new application :

new app


Then click on the name of your application to continue :

access app


Finally, it you just click on the button Install Dependencies so compose repatriates your project dependencies :

1


Next the necessary dependencies, the establishment may be shorter or longer. You can also consult the progress by clicking on "View the utility output " in the pop-up in the bottom right of your screen :

2


Therefore, you will have something similar like this :

3


Once the operation is complete, the file vendor containing all the dependencies in your project will be created and complete (If the operation is performed without a hitch, if applicable, you will be notified through the pop up located at the bottom right of your screen ) :

4


You can then proceed to update dependencies returning in the application of your delivery tab and then click on the Update button dependencies as shown below :

5




You are not allowed to post comments.