Angular πŸ‡ΊπŸ‡¦ - practical notes
1.63K subscribers
1.6K photos
1 file
532 links
Angular - practical notes

This group is for posting practical notes for Angular developers. Mostly all posts are for quick implementation https://t.me/angular_practical_notes (Commenting on posts only in ENG and UA langs here). Welcome!
Download Telegram
🫠 Circular References in JavaScript

#js #info #BestPractics

...A circular reference, also known as a circular dependency, occurs when two or more objects reference each other in a way that creates an endless loop...


Why Circular References Matters:

1. Memory Management:
β€” Circular references can prevent objects from being garbage collected by JavaScript’s memory management system.
β€” This can lead to memory leaks, where memory is consumed unnecessarily, potentially causing your application to slow down or crash.

2. Behavioral Issues:
β€” Circular references can cause unexpected behavior in your code, making it challenging to predict how your program will behave.

3. Debugging Difficulty:
β€” Identifying and debugging issues related to circular references can be complex, especially in large codebases.

βœ… Article link
πŸ‘1
ℹ️ Angular History of Updates 1/2

#angular #info

βœ… Article link
πŸ‘3
ℹ️ Angular History of Updates 2/2

#angular #info

βœ… Article link
πŸ‘3
πŸ“„ 1/3 100+ FREE Resources Every Web Developer Must Try

#frontend #info

FREE Resources to Learn Web Development πŸ”₯

Websites: freeCodeCamp, MDN Web Docs, W3Schools, Scrimba, Codecademy, TheOdinProject, Frontend Mentor, Javascript30, Coursera, Khan Academy

YouTube Channels: Traversy Media, The Net Ninja, Code with Harry (Hindi), Web Dev Simplified, Coder Coder, The Coding Train, FreeCodeCamp

FREE Hosting Platforms for Your Websites πŸ”₯

β€” Netlify: Deploy your web projects with ease.
β€” Render: Host web applications and static sites effortlessly.
β€” GitHub Pages: Host your static websites directly from your GitHub repository.
β€” Firebase Hosting: Scale your web apps effortlessly with Firebase.
β€” Vercel: Deploy websites and applications with automatic deployments.
β€” Cyclic.sh: Host your static sites with zero configuration.
β€” Appwrite: Open-source backend server for web and mobile developers.
β€” Supabase: Build modern apps with a scalable backend.
β€” InfinityFree: Free and unlimited web hosting with PHP, MySQL, and more.
β€” Surge: Static web publishing for front-end developers.

FREE APIs for Your Projects πŸ”₯

β€” OpenWeatherMap API: Access current weather data for any location.
β€” News API: Retrieve live news articles from various sources.
β€” REST Countries API: Get information about countries worldwide.
β€” Chuck Norris Jokes API: Lighten up your projects with Chuck Norris jokes.
β€” Open Food Facts API: Access food product information and ingredients.
β€” Reddit API: Fetch Reddit data, including posts and comments.
β€” OneDrive API: Manage files and folders on Microsoft OneDrive.
β€” Dogs API: Bring adorable dog images and information to your projects.
β€” GIPHY API: Integrate GIFs and stickers into your applications.
β€” OMDb API: Access a database of movies and TV shows.
β€” VirusTotal API: Analyze suspicious files and URLs for malware.
β€” PokeAPI: Retrieve PokΓ©mon data for your gaming-related projects.
β€” NASA API: Access a wealth of NASA data, including imagery and information.
πŸ‘5πŸ”₯1
πŸ“„ 2/3 100+ FREE Resources Every Web Developer Must Try

#frontend #info

FREE Sites for Vectors, Images, and Illustrations πŸ”₯

β€” Freepik: Discover free vectors, photos, PSDs, and icons.
β€” Vecteezy: Find high-quality vector art, graphics, and illustrations.
β€” Unsplash: Access over a million free high-resolution photos.
β€” Pixabay: Explore a vast library of free images and videos.
β€” Flaticon: Download free icons, SVG, PSD, PNG, EPS format, or as ICON FONT.
β€” Openclipart: Share and use free clipart and images.
β€” SVGRepo: Download SVGs for free.
β€” Vectorportal: Free vectors, clip art, and icons.
β€” SVGBackgrounds: Customizable SVG patterns and backgrounds.
β€” FreeDesignFile: High-quality graphic design resources.
β€” Pexels: Find free stock photos and videos shared by talented creators.
β€” Vectorian: Download royalty-free vector art, stock photos, and stock footage.

FREE Icons for Your Projects πŸ”₯

FontAwesome, Flaticon, Iconfinder, Material Icons, Icons8, BoxIcons, Feather Icons, IcoFont, SVGHUB, Tabler Icons, Iconsmind, Iconmonstr, SVGRepo

FREE Fonts for Your Projects πŸ”₯

Google Fonts,1001FreeFonts, Fontjoy, Fontsly, FontSpace, AbstractFonts, FontZone, DevFonts, DaFont, FontSquirrel, FontFabric

FREE Cheat Sheet SitesπŸ”₯

β€” HTML Cheat Sheet: Quick reference guide for HTML elements and attributes.
β€” CSS Cheat Sheet: Comprehensive guide to CSS properties and selectors.
β€” JavaScript Cheat Sheet: Handy reference for JavaScript syntax and concepts.
β€” Git Cheat Sheet: Essential commands and workflows for Git.
β€” Markdown Cheat Sheet: Markdown syntax guide for creating rich text formatting.
β€” React Cheat Sheet: Quick overview of React concepts and syntax.
β€” Learn x in y minutes: Concise tutorials to learn various programming languages and tools quickly.
β€” SQL Cheat Sheet: Comprehensive SQL commands and queries reference.
β€” OverAPI: Collection of cheat sheets for various programming languages and frameworks.
πŸ‘2
πŸ“„ 3/3 100+ FREE Resources Every Web Developer Must Try

#frontend #info

FREE Sites for HTML/CSS Templates πŸ”₯

HTML5UP, HTMLRev, Free-CSS, Templated, FreeHTML5, Start, Bootstrap, Bootswatch, BootstrapTaste, Cruip, Tooplate, HTML5xCSS3

Learn CSS by Playing Games πŸ”₯

CSS Diner: Practice CSS selectors with a fun game.
Flexbox Froggy: Learn CSS Flexbox by playing this game.
Grid Garden: Master CSS Grid layout by playing this game.
Flexbox Defense: A game to learn CSS Flexbox.
CSSBattle: Compete against others by writing CSS code.
Flexbox Zombies: Learn CSS Flexbox by playing this game.

FREE Code Editors πŸ”₯

β€” Visual Studio Code (VS Code)
β€” Sublime Text
β€” Brackets
β€” Vim

JavaScript Animation Libraries πŸ”₯

β€” Anime.js: Lightweight JavaScript animation library.
β€” ScrollReveal.js: Easily reveal elements as they enter the viewport.
β€” Popmotion: A functional, flexible JavaScript motion library.
β€” AniJS: Declarative handling library for CSS animations.
β€” Wow.js: Reveal CSS animation as you scroll down a page.
β€” Typed.js: A JavaScript library that types.
β€” Velocity.js: Accelerated JavaScript animation.
β€” GSAP: Professional-grade animation for the modern web.
πŸ‘4❀2πŸ”₯1
πŸ€“ Cheat Sheet for REST API Design

#info #restApi #guide

REST Principles

Resource-based: REST APIs are designed around resources, which are identified by unique URIs (Uniform Resource Identifiers).
Stateless: Each request from the client to the server must contain all the necessary information for the server to understand and process the request. The server should not rely on storing any client context between requests.
Cacheable: Responses from the server should be labeled as cacheable or non-cacheable, allowing clients to cache responses and improve performance.
Uniform Interface: REST APIs should follow a consistent interface, using standard HTTP methods (GET, POST, PUT, DELETE) to perform operations on resources.
Layered System: REST APIs can be composed of multiple layers, allowing for load balancing, caching, and proxy servers.


βœ… Article link
πŸ‘3
πŸ€“ Understanding Default vs OnPush Change Detection

#angular #info

βœ… Article link
πŸ“„ Difference Between Native Federation, Module Federation, and Single-Spa

#info #module_federation #native_federation

βœ… Article link
πŸ‘2
❀️ 10 Angular Architecture Mistakes

#angular #info #guide

Not having an architecture (or a plan) at all!
What is unfortunately often forgotten is that if we want to be able to keep moving fast also one year after we started our project, then we also need to make sure that our project doesn’t become an overconnected ball of mud or to use more technical term, we don’t end up with a tangled dependency graph with lot’s of circular dependencies…

One of the best way to know if this is your case is the constant feeling of being stuck in a spider web when trying to fix one thing leads you to a journey of changing half of the codebase, adding condition after condition just to make it work just this one more time.

Not thinking about eager and lazy parts of the app
Typical example is when we have some feature specific service which manages some kind of feature specific state and then we realize that it would be really great to be able to get that state also in some service in the eager core.

In that case, it’s very easy to just import and inject the feature service in the core service and overlook this eager / lazy boundary violation (or just miss it during the PR review). The outcome will be that the service (and everything else it imports) will suddenly become part of the eager Javascript bundle!

This is bad for performance and for architecture as well as we’re introducing dependencies between parts which should have been isolated (or only depend on each other in one direction, eg feature can consume core, but not the other way around!

Not lazy loading ALL the features
Another common offender that tends to happen also in reasonably architected projects is that even though they mostly embraced the eager / lazy split and have most of the logic implemented as the lazy loaded features, for some reason, some of the features are β€œforgotten”…

The best way to remedy this is to always implement everything including the first (original feature) as a first lazy loaded feature.

Using more than one way to achieve the same
Let’s take routing as an example, currently there are at least 4 ways to do it

β€” eager route to a component with component
β€” lazy route to a component with `loadComponent`
β€” lazy route to a module with `loadChildren`
β€” lazy route to routes based feature (feature-x.routes.ts) with `loadChildren`

In this case, we most likely want to pick one and stick with it.

I would personally recommend to always define lazy route with the routes based feature with loadChildren which is the most modern and flexible way of doing things. Then, in case our lazy feature contains sub navigation, we can lazy load additional components with loadComponent .

Focusing on DRY instead of ISOLATION

The DRY is a principle aimed at reducing the code repetition in the codebase, replacing duplicate code with abstractions.

If the same information or logic is repeated in multiple places, any new requirement which necessitates a change in how it should work will require us to change the logic consistently in all these places which can lead to errors and inconsistencies.

The argument we’re trying to make is that in frontend codebases it’s better to have some amount of duplicated code (e.g. in multiple lazy features) because that will allow them to evolve independently as the requirements change, and they do change!

Madge
Madge is a developer tool for generating a visual graph of your module dependencies, finding circular dependencies, and giving you other useful info

β€” madge npm docs

Not using standalone components

Using standalone components instead of NgModules means that our dependency graph becomes more granular and this higher resolution allows us to gain better insight of how each parts of app relate to each other and discover more issues!
Besides that, it allows lazy features to cherry pick only those UI components which is actually needs instead of depending on all of them, as was often the case when applications grouped and exposed them in commonly used SharedModule !


βœ…
Article link
Please open Telegram to view this post
VIEW IN TELEGRAM
❀3πŸ‘1
🌐 What is coming in Angular 19?

#angular #info

βœ… Article link
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘2
πŸ†š A Scalable CSS Architecture for Modern Web Applications

#css #info #guide

The Core Challenge of Scaling CSS

As applications evolve, managing styling consistently becomes even harder. Web projects often face issues like:

β€” Inconsistent UI elements: Without a unified system, different pages or features can drift apart visually.
β€” Hard-to-maintain styles: Styling becomes scattered and unorganized, making future changes tedious and error-prone.
β€” Difficulty in updating themes or branding: Modifying a color or spacing may involve updating hundreds of individual styles.


βœ… Article link
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘4
🌐 ❕ Angular vs. React: Comparison for Front-End Developers

#angular #react #info

Before we start the comparison, let’s briefly define Angular and React:

- Angular: A full-fledged front-end framework developed and maintained by Google. It is a complete solution for building large-scale applications, offering built-in tools for everything from routing to state management.

- React: A JavaScript library created by Facebook for building UI components. Unlike Angular, React focuses on the view layer only, offering flexibility to developers by allowing them to choose other libraries and tools for state management, routing, and more.


βœ… Article link
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘3
πŸ€“β€οΈ 10 Commonly Made Coding Mistakes in Angular

#angular #guide #info

βœ… Article link
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘3
πŸ†š CSS New Features

#css #guide #info

This is a list of the new changes (more details below):

β€” Changes to attr() function: so it can be used with any attribute and in any CSS property (not only on content).

β€” calc-size() function: use intrinsic values such as auto or min-content in calculations.

β€” New first-valid() function to avoid issues with custom properties with invalid values.

β€” New *-mix() family of functions with a new notation for ratios.

β€” New *-progress() family of functions to calculate the progress ratio between a range or within a media or container.

β€” Randomization with new random() and random-item() functions, to return random values from a range or list (finally!)

β€” New sibling-count() and sibling-index() functions that provide integer values to operate depending on the order and size.

β€” New toggle() function for styling nested elements easily cycling over a list of values.

β€” New functional notation for arguments with comma-separated lists of values, to avoid ambiguity with the comma separating the arguments.

β€” New URL modifiers to provide more control over url() requests.

β€” Extension of the position type to allow flow-relative values.


βœ… Article link
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘5
πŸ“„ Button Design β€” UI component

#info #button #design #guide

βœ… Article Link
πŸ‘1