DEV Community

Cover image for Episode 24/04: .ng & .analog, DDD with Manfred Steyer, Angular Query Tomasz Ducin
ng-news for This is Angular

Posted on • Updated on

Episode 24/04: .ng & .analog, DDD with Manfred Steyer, Angular Query Tomasz Ducin

Analog's ng file format got renamed after some discrepancies in the community. Jeremy Elbourn was guest at the AngularAir podcast. Manfred Steyer published an article on DDD, and Tomasz Ducin on Angular Query.

.ng to .analog

The ng file format from the Analog project, which is a meta-framework to Angular, is no more. In short, the ng File is an alternative component/authoring format that focuses on the template part and is functional-based.

Why no more? Introducing a new feature from the community always differs from when it would come from Angular itself.

The ng file caused quite some friction, especially if the future should be functional or stay class-based.

Another element that caused some of the main points of confusion was the term "ng" itself. Some people understood that it might become part of the Angular framework itself.

Changing names instead of concepts is easy. That's why the Analog team removed the support for *.ng files and re-introduced them as *.analog format.

fix(vite-plugin-angular): remove experimental support for .ng files #869

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • [x] Bugfix
  • [ ] Feature
  • [ ] Code style update (formatting, local variables)
  • [ ] Refactoring (no functional changes, no api changes)
  • [ ] Build related changes
  • [ ] CI related changes
  • [ ] Documentation content changes
  • [ ] Other... Please describe:

Which package are you modifying?

  • [x] vite-plugin-angular
  • [ ] vite-plugin-nitro
  • [ ] astro-angular
  • [ ] create-analog
  • [ ] router
  • [ ] platform
  • [ ] content
  • [ ] nx-plugin
  • [ ] trpc

What is the current behavior?

Experimental support for .ng files was enabled through Analog

Closes #

What is the new behavior?

Support for .ng files is removed

Does this PR introduce a breaking change?

  • [ ] Yes
  • [x] No

Other information

This was experimental in supporting an alternate way of authoring Angular components and directives. Despite various disclaimers, the .ng file associated causes too much confusion that this is an Angular team project that intends to replace the usage of class components in Angular.

[optional] What gif best describes this PR or how it makes you feel?

feat(vite-plugin-angular): enable `.analog` support #870

nartc avatar
nartc posted on

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • [ ] Bugfix
  • [x] Feature
  • [ ] Code style update (formatting, local variables)
  • [ ] Refactoring (no functional changes, no api changes)
  • [ ] Build related changes
  • [ ] CI related changes
  • [ ] Documentation content changes
  • [ ] Other... Please describe:

Which package are you modifying?

  • [x] vite-plugin-angular
  • [ ] vite-plugin-nitro
  • [ ] astro-angular
  • [ ] create-analog
  • [ ] router
  • [ ] platform
  • [ ] content
  • [ ] nx-plugin
  • [ ] trpc

What is the new behavior?

This PR enables support for .analog file extension via the supportAnalogFormat flag under vite.experimental.

This replaces the .ng file extension support. With .analog, the separation is clearer (and intentional). Level of support is around the same as .ng with the following difference:

  • templateUrl is now supported for external HTML file
  • styleUrl and styleUrls are now supported for external style file(s)
  • <style> (for inline style) is now converted to styles property in the Component metadata instead of prepend in the <template> content
    • Multiple <style> is not guaranteed. If folks need multiple stylesheet, use styleUrls instead

Does this PR introduce a breaking change?

  • [ ] Yes
  • [x] No

Other information

[optional] What gif best describes this PR or how it makes you feel?

A+ Show S6 E21 | Could .ng be the new authoring format for Angular? | Brandon Roberts & Chau Tran

In this episode Lara, Ankita and Jay talk to Brandon Roberts, the creator of Analog, and Chau Tran, nerd sniper extraordinaire, about a new component authoring for Angular leveraging a Vite plugin that makes it simple and easy to build single file components and directives. More about our guests: BlueSky:https://bsky.app/profile/nartc.bsky.social https://bsky.app/profile/brandonroberts.dev X:https://twitter.com/Nartc1410 https://twitter.com/brandontroberts LinkedIn: https://www.linkedin.com/in/chauntran

favicon spreaker.com

Jeremy Elbourn at AngularAir

Jeremy Elbourn, Angular tech lead, was guest at the Angular Air Podcast. He doesn't see performance improvements or zoneless applications as the main benefit of Signals. To Jeremy, it is the better developer experience.

From his perspective, it would also make sense to un-deprecate ng-deep, a special CSS selector, and bring it back under a different name like ng-global.

How Angular evolves over time with Jeremy Elbourn - YouTube

Jeremy’s Handle: jelbourn@hachyderm.io/@jelbourn🎈Angular Air is sponsored by Kendo UI, check out their 100+ components today! kendoui.comTo catch up with ou...

favicon youtube.com

Manfred Steyer on DDD

Manfred Steyer wrote an article about domain-driven design. He gave a historical overview and explained that DDD is not just about design patterns or functional vs. object-oriented programming.

We should see more the strategical aspect where, for example, the ubiquitous language plays a central part.

His article references many links to books, articles, and talks.

Tomasz Ducin on Angular Query

Tomasz Ducin published an article about Angular Query, which is also known as Tan Query. According to Tomas, it is a state-management library specifically designed to synchronize data with the backend. He explained the mental model behind it and its core concepts.

Angular Query is still in its early phases, and Thomas announced already that we can expect more article from him about this topic.

Top comments (4)

Collapse
 
spock123 profile image
Lars Rye Jeppesen

Thanks

Collapse
 
ng_news profile image
ng-news

No problem Lars

Collapse
 
jangelodev profile image
João Angelo

Thanks for sharing !

Collapse
 
ng_news profile image
ng-news

You're welcome!