<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Mike Brocchi on Medium]]></title>
        <description><![CDATA[Stories by Mike Brocchi on Medium]]></description>
        <link>https://medium.com/@brocco?source=rss-eae5913abcc1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*fp8Thyvh2ZggoxK0IkGLWQ.png</url>
            <title>Stories by Mike Brocchi on Medium</title>
            <link>https://medium.com/@brocco?source=rss-eae5913abcc1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 09:52:32 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@brocco/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Angular 17, what does that mean for you?]]></title>
            <link>https://medium.com/@brocco/angular-17-what-does-that-mean-for-you-49fcacec3bb2?source=rss-eae5913abcc1------2</link>
            <guid isPermaLink="false">https://medium.com/p/49fcacec3bb2</guid>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Mike Brocchi]]></dc:creator>
            <pubDate>Wed, 08 Nov 2023 21:22:42 GMT</pubDate>
            <atom:updated>2023-11-08T21:22:42.835Z</atom:updated>
            <content:encoded><![CDATA[<h3>Angular 17 was released, what does that mean for you?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1HXCJCOpzKdmQI33ZrEIlg.png" /><figcaption>New Angular Branding</figcaption></figure><p>Angular version 17 released on November 8, 2023 and the hype is real! There are so many things to talk about and get your head around to create modern web apps and updating your existing Angular apps. You can read about the details of each of the new changes on the <a href="https://goo.gle/angular-dot-dev">Angular blog post</a>, but lets talk about why these changes are important to you as an Angular developer.</p><p>Before diving in, lets take a look at all the new things in v17…</p><ul><li>logo redesign</li><li>website moving from <a href="https://angular.io/">angular.io</a> to <a href="https://angular.dev/">angular.dev</a></li><li>standalone applications are now the default for new applications</li><li>signals are out of dev preview and are now stable</li><li>server-side rendering improvements</li><li>hydration is out of dev preview and is now stable</li><li>control flow (@if, @for, @switch) *developer preview</li><li>defer <em>(just going to leave this here because justice can not be paid this briefly)</em> *developer preview</li></ul><h3>Logo Redesign &amp; New Website</h3><p>While there is a lot to go in to about how much better the new website is, I think the bigger takeaway is that they represent a beacon to the ongoing Angular Revolution. A lot of effort by the team and community has led to some rather large changes in the Angular ecosystem, many of which you can read more about below. The overarching takeaway is that Angular is getting easier… easier to learn, easier to code, easier to debug and easier to find answers to your questions on the new website.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Klh1l7wkoG6PDPb9A5oCHQ.png" /><figcaption>New Angular Logo</figcaption></figure><h3>Standalone</h3><p>The recently introduced standalone project structure is now the default for new applications which may not contain NgModules. With a this new structure there are fewer concepts to understand and keep in mind as you build out an application. As a developer you can focus on creating a component tree that covers the needed features. Without standalone the focus of structuring/organizing an application was based upon NgModules, which also caused a disconnect from what a component needed in order to work (dependencies). With the dependencies being specified where they are needed refactors are cleaner. Why? because you know what dependencies are being used at that location with no guessing if something else in an NgModule requires that dependency. The other major benefit is that the structure of both a browser and server application share more code and organization. The bootstrap methods are slightly different in that a browser application calls the bootstrapApplication while the server application exports a function that calls bootstrapApplication. While they are slightly differentc all of the configuration is shared in a src/app/app.config.ts file, which means that changes to one are automatically included in the other. The app.config.ts file is where you will set up your external dependencies, like the Angular router, by calling provideRouter(routes) in the providers array. By standing firmly on the standalone application concept, the Angular team has really underscored the idea that standalone is the suggested way to build Angular applications and the team provided schematics to help you migrate your existing applications to standalone, you can learn more about them <a href="https://angular.io/guide/standalone-migration">here</a>.</p><h3>Signals</h3><p>Signals are intended to be a more ergonomic means of handling application state. The values of signals can be read in your template by calling the function.</p><p>Here’s a very small example:</p><pre>import { Component, signal } from &#39;@angular/core&#39;;<br>@Component({<br>  selector: &#39;app-signal&#39;,<br>  standalone: true,<br>  template: `&lt;p&gt;The count is: {{ count() }}&lt;/p&gt;<br>             &lt;button (click)=&quot;increment()&quot;&gt;+1&lt;/button&gt;`<br>})<br>export class SignalComponent {<br>  count = signal(1);<br>  increment() {<br>    this.count.update((c) =&gt; {<br>      return c + 1;<br>    });<br>  }<br>}</pre><p>What does this mean to you?</p><p>Signals are a means for Angular to understand when and where your application values are changed.</p><p>“Yeah, so?”</p><p>This means that if you are using signals to represent all values in templates that may update, you can potentially remove the dependency on zone.js. The other thing that could be applied with teh move to signals is fine-grained updates to templates. So the entire component may not need to be re-rendered upon update, just the portion(s) that need to be updated.</p><p>That short little paragraph packs a HUGE PUNCH for performance because not only will Angular be able to make more granular DOM updates, change detection will run only when needed throughout your application.</p><h3>Server-Side Rendering Improvements</h3><p>An introduction of a new application builder, aptly named “application” the process of setting up a local dev environment is streamlined; it’s now a single command. This means no more starting the server and then having to go start the client in a separate process! 🎉🎉🎉 “But I thought that Angular did SSR with Angular Universal?” GREAT QUESTION! This used to be true, but the logic and power of Angular Universal is now part of the SSR libraries offered directly from the Angular team. With the new performance boosts and single dev command creating SSR Angular apps is easier than ever so consider SSR enabling your application today!</p><h3>Hydration</h3><p>If you are not familiar, hydration is an improvement for SSR applications that allows the client application to not re-render components upon application-start in the browser... NO FLICKER! This feature was introduced in an earlier version as a developer preview, but with v17 the hydration API is now stable. If you have been on the fence about trying out SSR in Angular, v17 brings some very compelling reasons to the table.</p><h3>Control Flow (@if, @for, @switch) *Developer Preview</h3><p>New syntax! With the move towards the Standalone API, you can now specify your dependencies for anything your component needs including NgIf and NgFor, which the vast majority of components use. This can be redundant to have the same code throughout your application. Recognizing this potential pitfall, the Angular team introduced Control Flow; a new syntax built in to the framework for specifying logic within a component’s template.</p><p>The new syntax is well thought-out and matches well with their TypeScript counterparts so they will feel familiar to you. As a result of this logic being <strong>built in to the framework</strong>, as opposed to the structural directives <strong>built with the framework</strong>, the performance is much faster.</p><h3>Defer</h3><p>@defer is such a small marker in regards to the number of characters, but a MASSIVE feature with the given power it provides. The API is vast and powerful. You can read about it on angular.dev and also Netanel Basal’s amazing <a href="https://netbasal.com/a-comprehensive-guide-to-angulars-defer-block-468c74048df4">blog post</a>. What makes this feature so powerful is the ability to defer (great naming here) the loading of parts, or all, of a component’s template. But it is not just “hey, load this part later” it gives you the control to determine when to load it based upon the when conditional. Want to load something after the user scrolls to that part of a component, you can do that! Want to load something later, but only when the browser is idle, you can do that! Want to load something when the user takes some action or when a value satisfies some condition, you can do that!</p><p>Want to handle different states like a default placeholder, for before the defer conditional is met, you can do that! Or when the deferred content is loading, you can do that! Want to handle the scenario when an error occurs, you can do that!</p><p>So whether you’re deferring the content of some content that may not be needed, like a dialog or some compute-heavy component the defer block makes it seamless to implement!</p><p>* Developer Preview means that functionality has been added but the API may change in the future prior to it being declared stable. Use at your own risk in production, but certainly feel free to play with and investigate these features.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=49fcacec3bb2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Browser console debugging tips for arrays & objects using groups and tables]]></title>
            <link>https://medium.com/@brocco/browser-console-debugging-tips-for-arrays-objects-using-groups-and-tables-60b001316d8a?source=rss-eae5913abcc1------2</link>
            <guid isPermaLink="false">https://medium.com/p/60b001316d8a</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[es6]]></category>
            <dc:creator><![CDATA[Mike Brocchi]]></dc:creator>
            <pubDate>Thu, 05 Jan 2017 19:40:02 GMT</pubDate>
            <atom:updated>2017-01-05T19:40:02.483Z</atom:updated>
            <content:encoded><![CDATA[<p>How do you hunt down bugs in web development? Well you search and search and search until you find some code that may be causing the issue. GREAT! But now what? That’s right…</p><pre>console.log(&#39;some relevant message&#39;);<br>console.log(someRelevantVariable);<br>// or alternatively<br>console.log(&#39;some relevant message&#39;, someRelevantVariable);</pre><p>Which is super, unless your code is in a loop and you end up with a long list of repeating items:</p><pre>people.forEach(person =&gt; {<br>  console.log(&#39;person name&#39;);<br>  console.log(person.name);<br>});</pre><p>And the issue compounds if you’re logging multiple pieces of information:</p><pre>people.forEach(person =&gt; {<br>  console.log(&#39;person&#39;);<br>  console.log(person.name);<br>  console.log(person.id);<br>  console.log(person.email);<br>  console.log(person.phone);<br>});</pre><p>There are better ways to see your data in a more organized manner, first let’s take a look at console.group</p><pre>people.forEach(person =&gt; {<br>  console.group(person.name);<br>  console.log(person.id);<br>  console.log(person.email);<br>  console.log(person.phone);<br>  console.groupEnd();<br>});</pre><p>This gives you the ability to collapse each name in each <strong>group</strong>. Get it? Just make sure you close the group by calling console.groupEnd().</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/492/1*ZF5WDkXiUBTI5xEgIySxjw.png" /><figcaption>Manually collapsed for brevity</figcaption></figure><p>But what if your people array is actually inside of another loop? Well there’s good news, console groups can be nested:</p><pre>console.group(&#39;people&#39;);<br>people.forEach(person =&gt; {<br>  console.group(person.name);<br>  console.log(person.id);<br>  console.log(person.email);<br>  console.log(person.phone);<br>  console.groupEnd();<br>});<br>console.groupEnd();</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/492/1*fX0rii73DGEJeHmKEZk59w.png" /></figure><p>But sometimes you don’t want to be fully immersed in your data right away. Conveniently there’s a sibling function to console.group named console.groupCollapsed which will perform the same way as console.group, except that the group is collapsed, shocking, right?</p><p>So where can you use this?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NLFf9Iy1DLp974m6-ILEMw.png" /><figcaption><a href="https://developer.mozilla.org/en-US/docs/Web/API/Console/group">https://developer.mozilla.org/en-US/docs/Web/API/Console/group</a></figcaption></figure><p>Bonus tip for arrays:</p><p>Not only can you output data in groups, but wouldn’t it be nice to show an array as a table? Next time you have an array try this:</p><pre>console.table(people);</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1tuezpuL2jSe-8Bxp6Wd1Q.png" /></figure><p>As you’d expect you can nest these commands:</p><pre>console.group(&#39;people&#39;);<br>console.table(people);<br>console.groupEnd();</pre><p>Support for console.table is not quite as good, but still not bad:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9HiD_D6Q4-opGaGyNEE9Dw.png" /><figcaption><a href="https://developer.mozilla.org/en-US/docs/Web/API/Console/table">https://developer.mozilla.org/en-US/docs/Web/API/Console/table</a></figcaption></figure><p>I hope this helps to make data exploration of your web applications a little better.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=60b001316d8a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[RxJS: My Learning is Observable — Part 1]]></title>
            <link>https://medium.com/@brocco/rxjs-observe-my-learning-part-1-c9cdff63f544?source=rss-eae5913abcc1------2</link>
            <guid isPermaLink="false">https://medium.com/p/c9cdff63f544</guid>
            <category><![CDATA[angular2]]></category>
            <category><![CDATA[rxjs]]></category>
            <dc:creator><![CDATA[Mike Brocchi]]></dc:creator>
            <pubDate>Thu, 12 May 2016 14:52:14 GMT</pubDate>
            <atom:updated>2016-05-12T14:54:15.376Z</atom:updated>
            <content:encoded><![CDATA[<p>Today I made a commitment to myself, to learn and use <a href="http://reactivex.io/rxjs/">RxJS</a>.</p><h3>Mike Brocchi on Twitter</h3><p>I hereby pledge my commitment to learn &amp; use RxJS The above is a warning to @BenLesh @robwormald @jeffbcross @_davideast #QuestionsComing</p><p>I have been contributing to the <a href="https://cli.angular.io/">Angular CLI</a> rather aggressively for the past 6 months and decided it is time to focus on improving the Angular applications that I am writing as well. The best place to start, observables.</p><p>So where to begin? I have a little experience using observables but only enough to make one thing work (exposing an event from one angular component to another). I got that to work by just subscribing to the observable.</p><pre>this.http<br>  .get(&#39;http://fake-url&#39;)<br>  .map(res =&gt; res.json())<br>  .subscribe((data) =&gt; { this.httpData = data; });</pre><pre>&lt;ul&gt;<br>  &lt;li *ngFor=&quot;let item in httpData&quot;&gt;<br>    {{item}}<br>  &lt;/li&gt;<br>&lt;/ul&gt;</pre><p>And based upon the <a href="https://angular.io/docs/ts/latest/api/common/index/AsyncPipe-class.html">documentation</a> there is something called the AsyncPipe which will handle that subscription for me, which means that I don’t need to keep local state inside my component, <strong>WIN</strong>! But how do I go about using this in my code.</p><p>Turns out it is rather easy, by simply setting httpData property of the component to the observable which is returned by http.get and allowing the angular async pipe subscribe to the observable the component is no longer responsible for managing the subscription. Voila:</p><pre>this.httpData = this.http<br>  .get(&#39;http://fake-url&#39;)<br>  .map(res =&gt; res.json());</pre><pre>&lt;ul&gt;<br>  &lt;li *ngFor=&quot;let item in httpData | async&quot;&gt;<br>    {{item}}<br>  &lt;/li&gt;<br>&lt;/ul&gt;</pre><p>This is only a small sample of what can be done with observables, but it is best to start small and grow rather than be intimidated by looking at the entire landscape.</p><p>Next up: learning operators</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c9cdff63f544" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>