Angular Munich – Telegram
Angular Munich
179 subscribers
554 photos
41 videos
9 files
705 links
Stay up to date with Angular Framework ;-)

Need more: https://linktr.ee/ngxsamurai
Download Telegram
🅰️Angular tip: Make your directive more powerful with advanced selectors

🔷 You can use directive selectors to apply directives on specific HTML elements automatically

🔶 You can use directive selectors to prevent specific HTML elements from applying the directive

🔷 You can use directive selectors to apply directives on specific HTML elements automatically unless you apply a do not apply selector

🔶 You can automatically apply your directives for elements that declare a specific CSS class

🔷 You can automatically apply your directives for elements that declare a specific attribute

You can go wild and combine these things to make very powerful selectors for your directives.

#Angular #frontenddevelopment
👍1
🎧🎧🎧🎧🎧🎧🎧🎧
Please open Telegram to view this post
VIEW IN TELEGRAM
👍1
This media is not supported in your browser
VIEW IN TELEGRAM
6️⃣ Popular API Architecture Styles

1. gRPC: A high-performance, language-agnostic remote procedure call (RPC) framework for efficient communication between distributed systems, often used in microservices architectures.

2. SOAP: A protocol for exchanging structured information in the implementation of web services, known for its strict standards and XML-based message format.

3. GraphQL: A query language and runtime for APIs that allows clients to request only the data they need, reducing over-fetching and under-fetching of data.

4. Webhook: A mechanism for real-time communication where an application sends HTTP POST requests to a predefined URL to notify and trigger actions in another system.

5. REST: Representational State Transfer, an architectural style for designing networked applications, using standard HTTP methods (GET, POST, PUT, DELETE) to manipulate resources.

6. WebSocket: A protocol that enables bidirectional, real-time communication between a client and server over a single, long-lived connection, ideal for applications requiring low-latency updates, such as chat or gaming.
👩‍💻
Please open Telegram to view this post
VIEW IN TELEGRAM
💡 Angular Tip

Did you know that VSCode has a built-in Angular profile template which is packed with popular extensions and handy settings out of the box?

📢 VSCode profiles are a great way to setup your development environment easily. It is fully customizable so that you can also share it with your dev team!

https://code.visualstudio.com/docs/editor/profiles#_angular-profile-template
💡Small Tip

If you wanna create all your @Angular components as standalone in one shot without adding --standalone option to every single #Angular CLI command ?

Just add the property "standalone" to your "angular:component" schematic in the angular.json file
Frontend Unit Tests.
🟡 The Gold Standard 🟡

Everyone racing for top coverage.
But reality looks much much different.

When NOT to Write Frontend Unit Tests:

• PoCs/MVPs: Here today, irrelevant tomorrow.
• UI part that is changed a lot: Don't waste your time.
• Experimental features: Can change any minute.
• Basic static components: Not worth it.
• Overwhelming mocking: Value > Effort.
• Deadlines: Especially in startups.
• Limited resources: Business value first/early phase.
• Redundant scenarios: 100% coverage is not the goal.
• Backend is more important: Frontend is changing much more often.

When TO Write Frontend Unit Tests:

• Critical features: Some things just can't fail.
• Complex logic: Once stable of course.
• Reusable components: The Foundation.
• Regression prevention: When it breaks often.
• Set in stone features: Worth the effort.
• Documentation: Tests can be great for that.
• Pre-refactoring: Before embarking on refactoring.
• Integration points: Vulnerable places.

Business Perspective:

• User Focus: E2E reflecting customer experience.
• Cost Efficiency: E2E tests can catch critical bugs.
• Time Savings: Reducing emphasis on unit tests can speed up development cycles.
• Real-world Relevance: E2E tests in near-production environments offer tangible insights.
• Simplified Reporting: E2E results are often more digestible for non-technical stakeholders.
• Coverage Overkill: Extensive unit tests can be redundant with a strong E2E suite.
• Maintenance Overhead: Frontend changes might require frequent unit test updates.

Businesses often lean towards ROI.
E2E tests often provide clearer value.
👍1
Angular Munich pinned «Frontend Unit Tests. 🟡 The Gold Standard 🟡 Everyone racing for top coverage. But reality looks much much different. When NOT to Write Frontend Unit Tests: • PoCs/MVPs: Here today, irrelevant tomorrow. • UI part that is changed a lot: Don't waste your time.…»