OPTIMIZE .NET APPLICATION Flashcards

1
Q

How do you optimize perfomance?

A
  • Async/Await:Use asynchronous programming to avoid blocking threads, especially with I/O operations.
  • Caching: Implements caching (like in memory caching or distributed caching with Redis) to reduce database hits.
  • DataBase: Using Entity Framework:
    Enabling AsNotTracking for read-only queries.
  • Middleware/ Pipeline: Only use necessary middleware and put the most critical ones first to reduce latency in the request pipeline.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you improve Code Quality?

A
  • Dependency Injection Use DI to keep the code loosely coupled and more testable, and make sure to follow the **SOLID ** principles to keep the code modular.
  • Error Handling Implement a global error-handling middleware to log and handle exceptions consistently across the app.
  • Logging: Use structured logging for instance SeriLog to capture log data, making troubleshooting easier.
  • Code Analisys Tool Using tools like SonarQbe to detect and fix code quality issues, technical debt and potential bugs early.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What do you do to Enhance Security?

A
  • Authentication & Autorization Use identity server or ASP.NET Identity with JWT for secure token-based authentication. Keeping authorization granular with role-based or policy based methods.
  • Data Protection Encrypt sensitive data and never store secrets in plain text. Use .NET Core’s Data-Protection API to handle encription, and enviroment variables or Azure Key Vault for secrets.
  • Input Validation and Sanitization Always validate and sanitize user inputs to prevent common vulnerabilites like sql injection, XSS, and CSRF attacks.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How improve Scalability and Reliability?

A
  • Containerization: Use Docker to containerize the app, making it easier to deploy across multiple environments. Combine it with Kubernetes for scaling.
  • Horizontal Scaling: Ensure your application can handle scale-out scenarios, such as load balancing across multiple servers.
  • Distributed Systems: Implement patterns like Circuit Breaker and Retry policies with libraries like Polly, which improve fault tolerance.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How enhance Development and Deployment practices

A

* Automated Testing Set up unit tests, integration test, using xUnit or MsTest for unit test and integrate with a CI/CD pipeline to ensure tests run on every build.

* CI/CD Use Azure Devops or GitHub Actions to ensure consistent and realiable deployments.

* Code Reviews and Pull Request Encourage the team collaboration through code reviews, which can help catch bugs, share knowledge and improve code quality.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How Monitoring an application?

A
  • Application Monitoring: Use tools like Application Insights, Dynatrace, or New Relic to track application performance, errors, and usage patterns.
  • User Feedback: Implement a way to capture user feedback to understand areas where the application can be improved based on real user needs and business rules.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Can you describe a recent project where you migrated applications from .NET Framework to .NET Core?

A

In my previous role, I led the migration of multiple applications from .NET Framework to .NET Core 7. This involved analyzing existing functionalities, refactoring code to align with .NET Core standards, and setting up a CI/CD pipeline with Azure DevOps to streamline the deployment process. We used Entity Framework Core 7 for data access, and I made significant improvements to performance and maintainability.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do you ensure code quality and maintainability in your projects?

A

I apply clean architecture principles, using design patterns that allow for modular, testable, and scalable code. Additionally, I implement unit testing with NUnit and Moq to validate functionalities and identify issues early. Code reviews and CI/CD processes help us maintain quality across the team, ensuring consistency and adherence to best practices.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is your approach to debugging and issue resolution in production environments?

A

I take a structured approach, starting with log analysis to identify error patterns. Then, I use debugging tools to pinpoint the exact source of issues. In critical situations, I work closely with QA to reproduce issues, apply fixes, and test extensively before deploying solutions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How do you stay updated on new technologies and practices?

A

I regularly take courses on platforms like Udemy to enhance my skills. Recently, I completed courses on Angular, ASP.NET Core, microservices, and Docker. I’m a technology enthusiast who enjoys exploring new tools, frameworks, and best practices to bring added value to my projects

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Can you provide examples of how you’ve led teams or collaborated in an agile environment?

A

I’ve participated actively in daily meetings, sprint planning, and retrospectives. My approach is to foster clear communication, set realistic goals, and ensure alignment on project deliverables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly