Tools and Skills For . NET 8 Get the Career You Want with Good Practices and Patterns to Design, Debug, and Test Your Solutions
Elevate your career by mastering key .NET tools and skills, including debugging, source code management, testing, cloud-native development, intelligent apps and more. Purchase of the print or Kindle book includes a free PDF eBook. Key Features Coverage of key .NET tools and skills including refactor...
Otros Autores: | |
---|---|
Formato: | Libro electrónico |
Idioma: | Inglés |
Publicado: |
Birmingham :
Packt Publishing
[2024]
|
Edición: | First edition |
Colección: | Expert insight.
|
Materias: | |
Ver en Biblioteca Universitat Ramon Llull: | https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009841736206719 |
Tabla de Contenidos:
- Cover
- Copyright
- Contributors
- Table of Contents
- Preface
- Chapter 1: Introducing Tools and Skills for .NET
- Introducing this book and its contents
- Companion books to complete your learning journey
- Audiences for this book
- Tools
- Skills
- Testing
- Design and career development
- Setting up your development environment
- Choosing the appropriate tool and application type for learning
- Using Visual Studio for general development
- Using Code for cross-platform development
- Using GitHub Codespaces for development in the cloud
- Using Rider for cross-platform development
- What I used
- Deploying cross-platform
- Downloading and installing Visual Studio
- Visual Studio keyboard shortcuts
- Visual Studio Enterprise edition tools
- Downloading and installing Code
- Installing other extensions
- Managing Code extensions at the command prompt
- Understanding Code versions
- Code keyboard shortcuts
- Downloading and installing Rider
- Other JetBrains tools
- Chrome AI tools
- Making good use of the GitHub repository for this book
- Raising issues with the book
- Giving me feedback
- Downloading solution code from the GitHub repository
- Where to go for help
- Reading documentation on Microsoft Learn
- Getting help for the dotnet tool
- LLMs like ChatGPT
- Getting better help from LLMs using prompt engineering
- AI usage by developers
- Getting help on Discord and other chat forums
- Setting up a database and projects for this book
- Using a sample relational database
- Setting up SQL Server and the Northwind database
- Creating the Northwind database for a local SQL Server
- Creating the Northwind database for SQL Edge in Docker
- Creating a class library for entity models using SQL Server
- Creating a class library for the data context using SQL Server.
- Creating a test project to check the integration of the class libraries
- Running tests
- Using .NET 9 with this book
- Practicing and exploring
- Exercise 1.1 - Online-only material
- Exercise 1.2 - Practice exercises
- Exercise 1.3 - Test your knowledge
- Exercise 1.4 - Explore topics
- Summary
- Chapter 2: Making the Most of the Tools in Your Code Editor
- Introducing common tools and features
- Refactoring features
- Code snippets
- Editor configuration
- AI companions
- Tools in Visual Studio 2022
- Refactoring features
- Add method parameter checks
- Method parameter refactoring
- Convert foreach to for and vice versa
- Simplify LINQ statements
- Align code elements
- Refactor to primary constructors
- Code snippets
- Code snippets schema
- Creating and importing code snippets
- Distributing code snippets
- Editor configuration
- AI companions: GitHub Copilot
- Making the most of GitHub Copilot
- Navigating Visual Studio
- Copying and pasting a statement
- Switching between file tabs and tool windows
- Features to improve the editing experience
- Line numbers and word wrap
- Keyboard shortcuts
- Formatting code
- Task list
- Extension Manager
- Tools in Visual Studio Code
- Refactoring features
- Code snippets
- Decompiling .NET assemblies
- Creating a console app to decompile
- Decompiling using the ILSpy extension for Visual Studio
- Viewing source links with Visual Studio
- No, you cannot technically prevent decompilation
- Lowering C# code
- Custom project and item templates
- Creating a project for a template
- Testing the project template
- Practicing and exploring
- Exercise 2.1 - Online-only material
- Exercise 2.2 - Practice exercises
- Exercise 2.3 - Test your knowledge
- Exercise 2.4 - Explore topics
- Summary
- Chapter 3: Source Code Management Using Git.
- Introducing source code management
- Features of source code management
- Types of SCM system
- Common SCM systems
- Introducing Git
- Features of Git
- Why is Git hard to learn?
- Roles in a team for Git
- Downloading the latest Git
- Git integration with Visual Studio
- Configuring your Git identity
- Configuring SSH signature enforcement
- Configuring your default branch
- Getting help for Git
- Working with Git
- Starting with a Git repository
- Creating and adding files to a Git repository in theory
- Tracking changes in Git
- Creating a Git repository in practice
- Creating a new project
- Committing files
- Undoing a commit
- Cleaning a commit
- Stashing
- Ignoring files
- Reviewing Git repositories
- Viewing differences in files
- Viewing your commit history
- Filtering log output
- Managing remote repositories
- Branching and merging
- Walking through a branching and merging example
- Deleting and listing branches
- Summary of common Git commands
- Practicing and exploring
- Exercise 3.1 - Online-only material
- Exercise 3.2 - Practice exercises
- Exercise 3.3 - Test your knowledge
- Exercise 3.4 - Explore topics
- Summary
- Chapter 4: Debugging and Memory Troubleshooting
- Debugging strategies
- Introducing debugging strategies
- Understanding the problem
- How to start debugging
- When to give up debugging
- Interactive debugging with Visual Studio
- Creating code with objects to view
- Setting a breakpoint and starting debugging
- Navigating with the debugging toolbar
- Debugging windows
- Controlling what appears in debug panes
- Debugging test projects
- Asking GitHub Copilot Chat for debugging help
- Understanding stack and heap memory
- How reference and value types are stored in memory
- Understanding unsafe code
- Understanding pointers
- Other uses of pointers.
- Understanding boxing
- Understanding garbage collection
- Controlling the GC
- Managing resources with IDisposable
- Tools and skills for memory troubleshooting
- Common memory tools and skills
- Visual Studio tools
- Using Visual Studio Memory Usage
- Practicing and exploring
- Exercise 4.1 - Online-only material
- Exercise 4.2 - Practice exercises
- Exercise 4.3 - Test your knowledge
- Exercise 4.4 - Explore topics
- Summary
- Chapter 5: Logging, Tracing, and Metrics for Observability
- Logging and tracing in .NET
- Understanding ILogger in .NET
- How to log using ILogger
- Building a web service for logging
- Testing the basic functionality of the web service
- Monitoring with metrics in .NET
- Concepts for metrics and alerts
- Metrics
- Alerts
- Scenarios for metrics and alerts
- Implementing metrics
- Adding metrics to an ASP.NET Core project
- Viewing metrics
- Introducing OpenTelemetry
- Supported instrumentation packages
- Instrumenting an ASP.NET Core project
- Viewing the telemetry
- Practicing and exploring
- Exercise 5.1 - Online-only material
- Exercise 5.2 - Practice exercises
- Exercise 5.3 - Test your knowledge
- Exercise 5.4 - Explore topics
- Summary
- Chapter 6: Documenting Your Code, APIs, and Services
- Introducing documentation
- Benefits of documentation
- When not to document
- Documenting your source code
- When should you document your source code?
- Good practices for commenting your source code
- Documenting public APIs in class libraries
- XML comment documentation
- How to document code using XML comments
- Generating documentation using DocFX
- Creating a DocFX project
- Adding custom documentation content
- Markdown markup language
- Headings
- Formatting text
- Creating lists
- Links and images
- Code blocks and syntax highlighting
- Tables.
- Documenting services
- Considerations for documenting services
- Tools for documenting services
- Understanding the OpenAPI Specification (OAS)
- Documenting a Minimal APIs service using OpenAPI
- Documenting visually with Mermaid diagrams
- Rendering Mermaid diagrams
- Flowcharts using Mermaid
- Class diagrams using Mermaid
- Converting Mermaid to SVG
- Practicing and exploring
- Exercise 6.1 - Online-only material
- Exercise 6.2 - Practice exercises
- Exercise 6.3 - Test your knowledge
- Exercise 6.4 - Explore topics
- Summary
- Chapter 7: Observing and Modifying Code Execution Dynamically
- Working with reflection and attributes
- Metadata in .NET assemblies
- Versioning of assemblies
- Reading assembly metadata
- Creating custom attributes
- Understanding compiler-generated types and members
- Making a type or member obsolete
- Dynamically loading assemblies and executing methods
- A warning about reflection and native AOT
- Reflection improvements in .NET 9
- Doing more with reflection
- Working with expression trees
- Understanding components of expression trees
- Executing the simplest expression tree
- Creating source generators
- Implementing the simplest source generator
- Practicing and exploring
- Exercise 7.1 - Online-only material
- Exercise 7.2 - Practice exercises
- Exercise 7.3 - Test your knowledge
- Exercise 7.4 - Explore topics
- Summary
- Chapter 8: Protecting Data and Apps Using Cryptography
- Understanding the vocabulary of protection
- Techniques to protect your data
- Keys and key sizes
- IVs and block sizes
- Salts
- Generating keys and IVs
- Encrypting and decrypting data
- Encrypting symmetrically with AES
- Hashing data
- Hashing with the commonly used SHA-256
- Signing data
- Signing with SHA-256 and RSA
- Generating random numbers for cryptography.
- Authenticating and authorizing users.