Posts

Showing posts with the label DotNet

What’s the Difference Between Razor and Blazor

What is the Difference Between Razor and Blazor, ANGULAR WITH CORE .NET AND MVC RAZOR ENGINE Blazor Blazor enables sharing code across client- and server-side processes, server-side rendering functionality, and more. When building a single-page application, Angular or React are popular JavaScript frameworks to use.  Blazor is a framework for building interactive client-side web UI with .NET: ·          Create rich interactive UIs using C# instead of JavaScript. ·          Share server-side and client-side app logic written in .NET. ·          Render the UI as HTML and CSS for wide browser support, including mobile browsers. ·          Integrate with modern hosting platforms, such as  Docker . Using .NET for client-side web development offers the following advantages: ·          Write code in C# instead of JavaScript. ·          Leverage the existing .NET eco

Testing & Debugging

Image
Testing and Debugging, ANGULAR WITH CORE .NET AND MVC RAZOR ENGINE                                                Testing & Debugging Here I'll brief some important points on debugging and why it is essential. as well as dive into the implementation details for creating  unit and integration tests. Why Is Testing Important? Since from last few years, software testing has become an integral part of product quality assurance (QA). We all do some level of testing(Manual or Automation) of our code before deploying it to a production environment, be it a simple little quick-and-dirty exploratory testing or full-blown automated testing that covers nearly 104 percent of the code. One can imagine what would happen if car companies just designed, built, and released their vehicles without first doing some form of testing. Software is no different. Just like in the case of cars, users rely on working software to do their daily tasks. In the c

API Security in C#

Image
API Security , ANGULAR WITH CORE .NET AND MVC RAZOR ENGINE                                 Security Implementation in API Having APIs everywhere is excellent, but they need to be secure externally as well as internally. Even a small breach has the potential risk of a damaging ripple effect. API security is not limited to authentication or authorization but also includes protecting the underlying infrastructure, like rate limiting to prevent denial of service (dos) or distributed denial of service (DDoS) attacks. Attackers continuously come up with new and creative ways to breach systems, and it’s important to keep on standard and up-to-date with the latest threats out there. ASP.NET Core offers a wide range of features to help us configure and manage the security of our APIs. The framework provides a rich identity model for securing applications and integrates with third-party identity providers like Facebook or Twitter, as well as off

Logging and Error Handling | Exception Handling

Image
Logging and Error Handling | Exception Handling , ANGULAR WITH CORE .NET AND MVC RAZOR ENGINE   Logging and Error Handling | Exception handling Mechanism Application logging plays a crucial role in tracking and identifying issues that may  surface as well as in providing useful insights into the workflow processes of solutions. When things go wrong, one of the first sources to look at is the application’s log. Depending on the number of details that are logged, each entry represents an action that occurred at a specific date and time. Logs can contain system-generated events as well as events explicitly defined by the developer and are usually grouped into categories like errors, informational, and warning. Application logs are application-specific, hence the name, and do not often include OS-specific events. Let's begin Adding Logging  Logging can be used anywhere in ASP.NET Core, and to create a log we merely need to inject an I

Configuration Model in c#

Configuration Model in c# , ANGULAR WITH CORE .NET AND MVC RAZOR ENGINE  Configuration Model Configuration data should live outside the application. If you feel the urge to hardcode something, stop and think about the impact it may have on the scalability of the application in the future. When we separate the configuration from the application, it allows us to deploy the same code to do different things in different environments  There is a saying " Don’t code hard, hardcode instead.” As .NET developers, we should be familiar with the good old app.config and web. config files, which offer a mechanism for a specific configuration for each application. ASP.NET Core is no different, but with a much better mechanism for storing and providing configuration data. In fact, the new configuration model in ASP.NET Core is much more simplified, flexible, and extendable. Compared to its predecessors, it sets the bar quite high. In laymen’s terms, i