{"id":4687,"date":"2016-09-28T15:29:24","date_gmt":"2016-09-28T14:29:24","guid":{"rendered":"http:\/\/smart--grid.net\/?page_id=4687"},"modified":"2022-12-03T23:00:12","modified_gmt":"2022-12-03T22:00:12","slug":"diagramme-de-paquetages","status":"publish","type":"page","link":"https:\/\/complex-systems-ai.com\/en\/software-analysis\/package-diagram\/","title":{"rendered":"Package diagram"},"content":{"rendered":"<div data-elementor-type=\"wp-page\" data-elementor-id=\"4687\" class=\"elementor elementor-4687\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-6ac587e elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"6ac587e\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-33 elementor-top-column elementor-element elementor-element-9654a87\" data-id=\"9654a87\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-e7f234c elementor-align-justify elementor-widget elementor-widget-button\" data-id=\"e7f234c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"button.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-button-wrapper\">\n\t\t\t\t\t<a class=\"elementor-button elementor-button-link elementor-size-sm\" href=\"https:\/\/complex-systems-ai.com\/en\/software-analysis\/\">\n\t\t\t\t\t\t<span class=\"elementor-button-content-wrapper\">\n\t\t\t\t\t\t\t\t\t<span class=\"elementor-button-text\">Software analysis<\/span>\n\t\t\t\t\t<\/span>\n\t\t\t\t\t<\/a>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<div class=\"elementor-column elementor-col-33 elementor-top-column elementor-element elementor-element-388b06a\" data-id=\"388b06a\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-214d3f0 elementor-align-justify elementor-widget elementor-widget-button\" data-id=\"214d3f0\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"button.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-button-wrapper\">\n\t\t\t\t\t<a class=\"elementor-button elementor-button-link elementor-size-sm\" href=\"https:\/\/complex-systems-ai.com\/en\/\">\n\t\t\t\t\t\t<span class=\"elementor-button-content-wrapper\">\n\t\t\t\t\t\t\t\t\t<span class=\"elementor-button-text\">Home page<\/span>\n\t\t\t\t\t<\/span>\n\t\t\t\t\t<\/a>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<div class=\"elementor-column elementor-col-33 elementor-top-column elementor-element elementor-element-5b60fc0\" data-id=\"5b60fc0\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-14a6645 elementor-align-justify elementor-widget elementor-widget-button\" data-id=\"14a6645\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"button.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-button-wrapper\">\n\t\t\t\t\t<a class=\"elementor-button elementor-button-link elementor-size-sm\" href=\"https:\/\/fr.wikipedia.org\/wiki\/Diagramme_des_paquetages\" target=\"_blank\" rel=\"noopener\">\n\t\t\t\t\t\t<span class=\"elementor-button-content-wrapper\">\n\t\t\t\t\t\t\t\t\t<span class=\"elementor-button-text\">Wiki<\/span>\n\t\t\t\t\t<\/span>\n\t\t\t\t\t<\/a>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-7f7c2f75 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"7f7c2f75\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-5c6bb693\" data-id=\"5c6bb693\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-333f9621 elementor-widget elementor-widget-text-editor\" data-id=\"333f9621\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewbox=\"0 0 24 24\" version=\"1.2\" baseprofile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1' ><ul class='ez-toc-list-level-2' ><li class='ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/complex-systems-ai.com\/en\/software-analysis\/package-diagram\/#Diagramme-de-paquetages\" >Package diagram<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/complex-systems-ai.com\/en\/software-analysis\/package-diagram\/#Dependances\" >Dependencies<\/a><ul class='ez-toc-list-level-2' ><li class='ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/complex-systems-ai.com\/en\/software-analysis\/package-diagram\/#Dependance-de-type-%C2%ABimport%C2%BB\" >&quot;Import&quot; type dependency:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/complex-systems-ai.com\/en\/software-analysis\/package-diagram\/#Dependance-de-type-%C2%ABaccess%C2%BB\" >&quot;Access&quot; type dependency:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/complex-systems-ai.com\/en\/software-analysis\/package-diagram\/#Dependances-de-type-%C2%ABmerge%C2%BB\" >&quot;Merge&quot; type dependencies:<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Diagramme-de-paquetages\"><\/span>Package diagram<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The package diagram is a structural (static) UML diagram that represents the packages (or namespaces) that make up a system, as well as the relationships between these different packages.<\/p>\n\n<p>When we are dealing with a large system, it can be interesting to break it down into several parts (called packages).<\/p>\n\n<p>A package is therefore a grouping of different elements of a system (grouping of classes, diagrams, functions, interfaces, etc.). This helps to clarify the model by organizing it. He is represented by a folder with his name inside.<\/p>\n\n<p>Packages can nest (hierarchical decomposition) but not overlap. A system element can only belong to one and only one package. Each package must have a different name.<\/p>\n\n<p>It is possible to represent the elements of the system belonging to the package: inside it or outside connected by a cross arrow.<\/p>\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Dependances\"><\/span>Dependencies<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n<p>Each element of a package is either:<\/p>\n\n<ul class=\"wp-block-list\">\n<li style=\"text-align: justify;\">private, that is, encapsulated within the package and invisible outside of it. A private element is designated by a sign - in front of it.<\/li>\n<li style=\"text-align: justify;\">public, that is, visible and accessible from outside the package. A public element is designated by a + sign in front of it.<\/li>\n<\/ul>\n\n<p>By default, the items in a package are public.<\/p>\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Dependance-de-type-%C2%ABimport%C2%BB\"><\/span>&quot;Import&quot; type dependency:<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n<p>It corresponds to the import by a package B of all the public elements of a package A.<\/p>\n\n<p>These elements:<\/p>\n\n<ul class=\"wp-block-list\">\n<li style=\"text-align: justify;\">will have &quot;public&quot; visibility in package B (and would therefore also be passed to a package C which would import package B).<\/li>\n<li style=\"text-align: justify;\">will be accessible to package B without having to explicitly use the name of package A.<\/li>\n<\/ul>\n\n<p>The &quot;import&quot; type dependency is represented by a dotted arrow with the &lt;&gt; stereotype.<\/p>\n\n<figure class=\"wp-block-image size-large\"><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone wp-image-4933 size-full\" src=\"https:\/\/complex-systems-ai.com\/wp-content\/uploads\/2016\/09\/paquet1.png\" alt=\"import dependency uml packages diagram\" width=\"652\" height=\"153\" title=\"\" srcset=\"https:\/\/complex-systems-ai.com\/wp-content\/uploads\/2016\/09\/paquet1.png 652w, https:\/\/complex-systems-ai.com\/wp-content\/uploads\/2016\/09\/paquet1-300x70.png 300w\" sizes=\"(max-width: 652px) 100vw, 652px\" \/><\/figure>\n\n<p><em>Package B imports Class1 and Class2 (not Class3 which has private type visibility). Class1 and Class2 have public type visibility in package B. Package C imports Class1, Class2, and Class4.<\/em><\/p>\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Dependance-de-type-%C2%ABaccess%C2%BB\"><\/span>&quot;Access&quot; type dependency:<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n<p>It corresponds to the access by a package B of all the public elements of a package A. These elements will have the private visibility in the package B, so they cannot be transmitted to a package C which would make an import or an access to package B (no transitivity).<\/p>\n\n<p>The &quot;access&quot; type dependency is represented by a dotted arrow with the &lt;&gt; stereotype.<\/p>\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" class=\"alignnone wp-image-4943 size-full\" src=\"https:\/\/complex-systems-ai.com\/wp-content\/uploads\/2016\/09\/paquet2.png\" alt=\"uml packages diagram access dependency\" width=\"644\" height=\"145\" title=\"\" srcset=\"https:\/\/complex-systems-ai.com\/wp-content\/uploads\/2016\/09\/paquet2.png 644w, https:\/\/complex-systems-ai.com\/wp-content\/uploads\/2016\/09\/paquet2-300x68.png 300w\" sizes=\"(max-width: 644px) 100vw, 644px\" \/><\/figure>\n\n<p><em>Package B has access to Class1 and Class2 (not to Class3 which has private type visibility). Class1 and Class2 have private type visibility in package B. Package C has access to Class4 (not Class1 and Class2 which have private type visibility in package B).<\/em><\/p>\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Dependances-de-type-%C2%ABmerge%C2%BB\"><\/span>&quot;Merge&quot; type dependencies:<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n<p>It corresponds to the merger of 2 packages into one. The \u201cmerge\u201d type dependency is represented by a dotted arrow with the stereotype &lt;&gt;.<\/p>\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" class=\"alignnone wp-image-4952 size-full\" src=\"https:\/\/complex-systems-ai.com\/wp-content\/uploads\/2016\/09\/paquet3.png\" alt=\"uml package diagram merge dependency\" width=\"740\" height=\"150\" title=\"\" srcset=\"https:\/\/complex-systems-ai.com\/wp-content\/uploads\/2016\/09\/paquet3.png 740w, https:\/\/complex-systems-ai.com\/wp-content\/uploads\/2016\/09\/paquet3-300x61.png 300w\" sizes=\"(max-width: 740px) 100vw, 740px\" \/><\/figure>\n\n<p><em>Package A is merged into package B (package A is not modified while package B is overwritten to accommodate the merging of the 2 packages).<\/em><\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>","protected":false},"excerpt":{"rendered":"<p>Software Analysis Wiki Home Page Package Diagram The package diagram is a structural (static) diagram of UML that represents the packages (or \u2026 <\/p>","protected":false},"author":1,"featured_media":0,"parent":4609,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-4687","page","type-page","status-publish","hentry"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/complex-systems-ai.com\/en\/wp-json\/wp\/v2\/pages\/4687","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/complex-systems-ai.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/complex-systems-ai.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/complex-systems-ai.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/complex-systems-ai.com\/en\/wp-json\/wp\/v2\/comments?post=4687"}],"version-history":[{"count":4,"href":"https:\/\/complex-systems-ai.com\/en\/wp-json\/wp\/v2\/pages\/4687\/revisions"}],"predecessor-version":[{"id":17951,"href":"https:\/\/complex-systems-ai.com\/en\/wp-json\/wp\/v2\/pages\/4687\/revisions\/17951"}],"up":[{"embeddable":true,"href":"https:\/\/complex-systems-ai.com\/en\/wp-json\/wp\/v2\/pages\/4609"}],"wp:attachment":[{"href":"https:\/\/complex-systems-ai.com\/en\/wp-json\/wp\/v2\/media?parent=4687"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}