Skip to main content

2 posts tagged with "Coding standards"

View All Tags

· 3 min read
Sivabharathy

TypeScript is a powerful tool for enhancing JavaScript with strong typing. But like any tool, it can be misused. A common anti-pattern in TypeScript is duplicating types instead of leveraging its utility types. This leads to bloated, harder-to-maintain code.

Let’s explore this with an example and how to improve it by "typing smartly."

· 5 min read
Sivabharathy

Explore an optimized Angular folder structure for large-scale applications using CSS. Learn best practices for modularization, lazy loading, state management, and component organization to ensure maintainability, scalability, and performance in your Angular projects.

1. Base Folder Structure​

src/
│
├── app/
│ ├── core/ # Core module (singleton services, utility classes)
│ ├── shared/ # Shared module (components, directives, pipes, etc.)
│ ├── features/ # Feature modules (for specific domain functionality)
│ ├── assets/ # Static files (images, fonts, etc.)
│ ├── environments/ # Environment-specific configurations
│ ├── app.component.ts # Root component
│ ├── app.module.ts # Root module
│ └── app-routing.module.ts
│
├── assets/ # Global assets (images, styles)
│
├── environments/ # Environment configuration files (dev, prod, etc.)
│
└── styles/ # Global styles