<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Arboricum</title>
    <description>The latest articles on DEV Community by Arboricum (@arboricum).</description>
    <link>https://dev.to/arboricum</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1082011%2Fb5a9fe8c-4136-4367-9e7c-314843e0ceff.png</url>
      <title>DEV Community: Arboricum</title>
      <link>https://dev.to/arboricum</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/arboricum"/>
    <language>en</language>
    <item>
      <title>Proposal for a framework.json file in Angular applications</title>
      <dc:creator>Arboricum</dc:creator>
      <pubDate>Sun, 14 May 2023 18:06:25 +0000</pubDate>
      <link>https://dev.to/arboricum/proposal-for-a-frameworkjson-file-in-angular-applications-epn</link>
      <guid>https://dev.to/arboricum/proposal-for-a-frameworkjson-file-in-angular-applications-epn</guid>
      <description>&lt;p&gt;Proposal for a framework.json file in Angular applications&lt;/p&gt;

&lt;p&gt;It is really hard sometime to figure out all the relationships between angular components, expecially when they become many.&lt;br&gt;
You'd want to know with a first glance who's child of who, or parent of who, or where a component is being used.&lt;br&gt;
Maybe you'd wish to know which service or directive is being shared.&lt;br&gt;
I found nothing on the web helping with this problem.&lt;br&gt;
So I figured out a framework file where the app framework is actually displayed.&lt;br&gt;
This will be a JSON file, with the following features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Component: camel case string -&amp;gt; components' class name -&amp;gt; it's an object where the properties are:

&lt;ul&gt;
&lt;li&gt;@string (see below), in the following order: services (@Ser), directives (@Dir), models (@Model), 
modules (@/Mod), @router-outlet;&lt;/li&gt;
&lt;li&gt;other components;&lt;/li&gt;
&lt;li&gt;the object will be an empty one if there are no children or @string.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;@string properties key-value -&amp;gt; 

&lt;ul&gt;
&lt;li&gt;@Ser is an array of services, elements are the services' class names (camel case);&lt;/li&gt;
&lt;li&gt;@Dir is an array of directives, elements are the directives' class names (camel case);&lt;/li&gt;
&lt;li&gt;@Model is an array of models, elements are the models' class names (camel case);&lt;/li&gt;
&lt;li&gt;@/Mod is an array of modules, elements are the modules' selector names (exact match);&lt;/li&gt;
&lt;li&gt;@router-outlet, is an object where the properties are components&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;same indentation -&amp;gt; siblings&lt;/li&gt;
&lt;li&gt;different indentation -&amp;gt; lower is child of higher parent (or is displayed in router-outlet)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is an instance of an example app:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "AppComponent": {
        "HeaderComponent": {},
        "@router-outlet": {
            "RecipeComponent": {
                "@Ser": ["RecipeService"],
                "RecipeListComponent": {
                    "@Ser": ["RecipeService"],
                    "@Model": ["Recipe"],
                    "RecipeItemComponent": {
                        "@Model": ["Recipe"]
                    }
                },
                "@router-outlet": {
                    "RecipeStartComponent": {},
                    "RecipeEditComponent": {
                        "@Ser": ["RecipeService"]
                    },
                    "RecipeDetailComponent": {
                        "@Ser": ["RecipeService"],
                        "@Dir": ["DropdownDirective"],
                        "@Model": ["Recipe"]
                    }
                }
            },
            "ShoppingListComponent": {
                "@Ser": ["ShoppingListService"],
                "@Model": ["Ingredient"],
                "ShoppingEditComponent": {
                    "@Ser": ["ShoppingListService"],
                    "@Model": ["Ingredient"]
                }
            }
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It could be a best practice to provide the app with such a file, which I would nest inside the app folder.&lt;br&gt;
Suggestions and comments are welcome.&lt;br&gt;
GitHub: [&lt;a href="https://github.com/Arboricum/Improvements-for-Angular"&gt;https://github.com/Arboricum/Improvements-for-Angular&lt;/a&gt;]&lt;/p&gt;

</description>
      <category>angular</category>
      <category>readability</category>
      <category>bestpractice</category>
    </item>
  </channel>
</rss>
