<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Edwin Klesman</title>
    <description>The latest articles on DEV Community by Edwin Klesman (@eekayonline).</description>
    <link>https://dev.to/eekayonline</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F33518%2F97777f33-b67c-4f42-a41a-75efb26cfc22.png</url>
      <title>DEV Community: Edwin Klesman</title>
      <link>https://dev.to/eekayonline</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/eekayonline"/>
    <language>en</language>
    <item>
      <title>Choosing the Right ASP.NET Core API Approach: Minimal or Controller?</title>
      <dc:creator>Edwin Klesman</dc:creator>
      <pubDate>Wed, 04 Oct 2023 12:19:23 +0000</pubDate>
      <link>https://dev.to/eekayonline/choosing-the-right-aspnet-core-api-approach-minimal-or-controller-2cc7</link>
      <guid>https://dev.to/eekayonline/choosing-the-right-aspnet-core-api-approach-minimal-or-controller-2cc7</guid>
      <description>&lt;p&gt;As a .NET developer, you are no stranger to building web applications using ASP.NET Core. With the introduction of ASP.NET Core 6, Microsoft has provided developers with two distinct approaches to building APIs: Minimal APIs and Controller APIs. In this article, we will explore both types, understand their pros and cons, and discuss scenarios where you might choose one over the other.&lt;/p&gt;

&lt;h2&gt;
  
  
  ASP.NET Core Minimal API
&lt;/h2&gt;

&lt;p&gt;Minimal APIs are a lightweight and streamlined way to build web APIs in ASP.NET Core. They are designed to make API development faster and more concise. &lt;br&gt;
Minimal APIs allow you to define routes and handle requests using a single file, often referred to as a “Program.cs” file.&lt;/p&gt;

&lt;p&gt;As Microsoft &lt;a href="https://learn.microsoft.com/en-us/aspnet/core/fundamentals/apis?view=aspnetcore-7.0"&gt;describes them&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The design of minimal APIs hides the host class by default and focuses on configuration and extensibility via extension methods that take functions as lambda expressions.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let’s dive into an example of building a Minimal API.&lt;/p&gt;

&lt;h2&gt;
  
  
  Minimal API Implementation Example
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Hosting;

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();

var app = builder.Build();

if (app.Environment.IsDevelopment())
{
    app.UseSwagger();
    app.UseSwaggerUI();
}

app.MapGet("/hello", () =&amp;gt; "Hello, Minimal API!");

app.MapPost("/greet", async (HttpContext context) =&amp;gt;
{
    using var reader = new StreamReader(context.Request.Body);
    var requestContent = await reader.ReadToEndAsync();
    return $"Received POST request with content: {requestContent}";
});

app.Run();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It is pretty straight forward, right? Using the &lt;em&gt;MapGet&lt;/em&gt; function, we have defined a function that handles the GET request to the “/hello” endpoint, which gives back a string.&lt;br&gt;
Using the &lt;em&gt;MapPost&lt;/em&gt; function, we’ve added a POST request handler for the “/greet” endpoint, which reads the request body and returns a response with the body of the request added to it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pros
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Minimal Boilerplate:&lt;/strong&gt; Minimal APIs require less code and fewer files compared to traditional controller-based APIs. This can lead to quicker development and easier maintenance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Faster Startup:&lt;/strong&gt; Due to their lightweight nature, Minimal APIs have faster startup times, making them suitable for microservices and serverless architectures.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Functional Approach:&lt;/strong&gt; Minimal APIs embrace a functional approach, allowing developers to define routes and handlers using a more functional and expressive syntax.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Cons
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Limited Features:&lt;/strong&gt; Minimal APIs may not offer as many built-in features and conventions as Controller APIs. You might need to implement certain functionality manually.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Useful Resources
&lt;/h2&gt;

&lt;p&gt;Check out these resources to read more about Minimal APIs for your ASP.NET Core project:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/aspnet/core/tutorials/min-web-api?view=aspnetcore-7.0&amp;amp;tabs=visual-studio"&gt;Microsoft’s official Learn documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://blog.jetbrains.com/dotnet/2023/04/25/introduction-to-asp-net-core-minimal-apis/"&gt;JetBrain’s Introduction to ASP.NET Core Minimal API&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  ASP.NET Core Controller API
&lt;/h1&gt;

&lt;p&gt;Controller APIs are the traditional approach to building APIs in ASP.NET Core. They rely on controllers, which are classes responsible for handling HTTP requests and returning responses. Controllers give a more structured way of implementing your API, but also require more understanding of how to set them up properly.&lt;br&gt;
As Microsoft &lt;a href="https://learn.microsoft.com/en-us/aspnet/core/fundamentals/apis?view=aspnetcore-7.0"&gt;describes them&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Controllers are classes that can take dependencies via constructor injection or property injection, and generally follow object-oriented patterns.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let’s look at a simple example showing a controller-based implementation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Controller API Implementation Example
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;

[Route("api/[controller]")]
[ApiController]
public class GreetingController : ControllerBase
{
    private readonly ILogger&amp;lt;GreetingController&amp;gt; _logger;

    public GreetingController(ILogger&amp;lt;GreetingController&amp;gt; logger)
    {
        _logger = logger;
    }

    [HttpGet]
    public IActionResult Get()
    {
        return Ok("Hello, Controller API!");
    }

    [HttpPost]
    public IActionResult Post([FromBody] string content)
    {
        if (string.IsNullOrEmpty(content))
        {
            return BadRequest("Request content cannot be empty.");
        }

        // Process the content as needed
        _logger.LogInformation($"Received POST request with content: {content}");

        return Ok($"Received POST request with content: {content}");
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, I’ve mimicked the implementation of the Minimal API code example. I’ve added simple functionality to the POST handler function, to check if the content is empty, and which writes logging. &lt;br&gt;
I wanted to show you the logger as with a controller class, it is easy to use dependency injection to add dependant functionality in its constructor, which can be used to quickly expand the API controller’s functionality. In this example, it was done for logging.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pros
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Rich Features:&lt;/strong&gt; Controller APIs offer a wide range of features, such as model binding, validation, action filters, and routing attributes. These features can be especially helpful in complex applications.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Convention Over Configuration:&lt;/strong&gt; Controller APIs follow a convention-based approach, reducing the need for explicit configuration. This can lead to a more structured and organized codebase.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ecosystem Support:&lt;/strong&gt; Controller APIs have been around for a while, which means there are extensive resources, libraries, and community support available.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Cons
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Boilerplate Code:&lt;/strong&gt; Building Controller APIs often involves writing more code and creating additional files, which can slow down development.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Slower Startup:&lt;/strong&gt; Controller APIs may have slightly longer startup times compared to Minimal APIs, making them less suitable for scenarios requiring rapid scaling.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Useful Resources
&lt;/h2&gt;

&lt;p&gt;Check out these resources to read more about implementing Controller APIs for your ASP.NET Core project:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/aspnet/core/web-api/?view=aspnetcore-7.0"&gt;Microsoft’s official Learn documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.yogihosting.com/aspnet-core-api-controllers/?utm_content=cmp-true"&gt;Yogi Hosting tutorial on How to Create WEb APIs in ASP.Net Core&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  When to Choose Minimal API vs. Controller API
&lt;/h2&gt;

&lt;p&gt;Now that we understand the characteristics of both types, let’s discuss when to choose each variant. &lt;br&gt;
But before I dive into reasons to choose between the one or another, I’d love to emphasize that you are allowed and can implement both ways in your solution. For instance, when you have a full-blown function API for a web application, and you want to expand the API by adding a basically smaller subset of functionality (i.e.: for internal use in your company), ASP.NET Core allows you to mingle both. &lt;br&gt;
Make sure these kinds of decisions are clear when you are working with a team of developers, so everyone understands why you’ve chosen the Minimal-, Controller-, or a combination of both API implementations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Reasons to favour Minimal API
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;You need a quick and lightweight solution for a simple API or microservice.&lt;/li&gt;
&lt;li&gt;Fast startup times are critical for your application.&lt;/li&gt;
&lt;li&gt;You prefer a functional and minimalistic coding style.&lt;/li&gt;
&lt;li&gt;You want to reduce boilerplate code and keep your codebase concise.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Choose Controller API When
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;You are working on a complex API with advanced features like model validation and custom action filters.&lt;/li&gt;
&lt;li&gt;Convention-based routing and extensive attribute support are beneficial for your project.&lt;/li&gt;
&lt;li&gt;You have an existing codebase that follows the Controller API pattern.&lt;/li&gt;
&lt;li&gt;You need the full feature set and ecosystem support provided by Controller APIs.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In the world of ASP.NET Core, the choice between Minimal APIs and Controller APIs boils down to the specific needs of your project. Minimal APIs offer speed and simplicity, while Controller APIs provide a robust and feature-rich environment. Consider your project requirements, development team’s familiarity, and long-term goals when making this decision.&lt;br&gt;
To recap what we’ve discussed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You’ve seen the definition and a code example of both a Minimal- and Controller-based API implementation&lt;/li&gt;
&lt;li&gt;Minimal APIs are quick, lightweight, and minimalistic. Ideal for simple APIs and microservices&lt;/li&gt;
&lt;li&gt;Controller APIs are feature-rich, convention-based, and suited for complex and/or more structured applications&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the end, both Minimal APIs and Controller APIs have their place in ASP.NET Core development, and the right choice depends on the unique demands of your project.&lt;/p&gt;

&lt;p&gt;Let me know in the comments or hit that &lt;strong&gt;♥️&lt;/strong&gt; if you liked my article. I'm curious what kind of API implementation you use most often and for what scenario.&lt;/p&gt;

&lt;p&gt;Code Hard, Ship Harder&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;.NET Developers, increase your productivity when working with databases: &lt;a href="https://www.linqmeup.com"&gt;LINQ Me Up - Convert SQL into LINQ Code, vice versa and create LINQ code from your data samples&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>dotnet</category>
      <category>aspdotnet</category>
      <category>development</category>
      <category>api</category>
    </item>
    <item>
      <title>Enhancing Your ASP.NET Core MVC Project: CDN vs. Libman for Client-side Library Integration</title>
      <dc:creator>Edwin Klesman</dc:creator>
      <pubDate>Thu, 28 Sep 2023 08:34:35 +0000</pubDate>
      <link>https://dev.to/eekayonline/enhancing-your-aspnet-core-mvc-project-cdn-vs-libman-for-client-side-library-integration-2ieg</link>
      <guid>https://dev.to/eekayonline/enhancing-your-aspnet-core-mvc-project-cdn-vs-libman-for-client-side-library-integration-2ieg</guid>
      <description>&lt;p&gt;Web development offers a plethora of libraries and resources to improve the functionality and aesthetics of your ASP.NET Core MVC project. When it comes to integrating external libraries, choosing between a Content Delivery Network (CDN) and Microsoft’s Libman can be a pivotal decision. In this blog post, we’ll explore these two approaches to library integration, examine their advantages and disadvantages, and later, we’ll illustrate both methods using the popular Font Awesome icon library.&lt;/p&gt;

&lt;h2&gt;
  
  
  CDN vs. Libman: Adding External Libraries to Your ASP.NET Core MVC Project
&lt;/h2&gt;

&lt;p&gt;In the realm of web development, the inclusion of external libraries can significantly enhance your project. To better understand the choices available, let’s first explore the general principles of using a CDN and Microsoft’s Libman for library integration.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where is NuGet?
&lt;/h3&gt;

&lt;p&gt;“Why isn’t NuGet package installer mentioned”, you might ask. That’s basically because in this article, I’m focussed on &lt;strong&gt;client-side&lt;/strong&gt; dependency management. Although NuGet can be used to install client-side frameworks, etc. it is primarily used for managing server-side dependencies, such as .NET libraries and packages. It’s a package manager for .NET projects.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using a CDN (Content Delivery Network)
&lt;/h2&gt;

&lt;p&gt;Before we dive into the pros and cons, it’s important to note that a Content Delivery Network (CDN) is a globally distributed network of servers that serve web content, including libraries and assets. This approach is often favoured for its simplicity and speed in delivering resources to your web application.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;em&gt;Pros:&lt;/em&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Simplicity: Incorporating libraries through a CDN is straightforward and requires minimal configuration. You typically only need to include a single line of code in your HTML or layout file.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Instant Updates: Libraries hosted on CDNs are updated automatically, ensuring you have access to the latest features and bug fixes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reduced Hosting Load: CDNs handle the hosting and distribution of files, reducing the load on your server.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;em&gt;Cons:&lt;/em&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;External Dependency: Your application relies on an external service, making it susceptible to downtime or changes in the CDN’s availability.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Performance Concerns: External requests to the CDN may impact your site’s loading times, especially if the CDN experiences delays.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Using Microsoft’s Libman (Library Manager)
&lt;/h2&gt;

&lt;p&gt;On the other hand, Microsoft’s Libman (Library Manager) provides a different approach to managing libraries in your ASP.NET Core MVC project. It offers local control and customization options, making it a versatile choice for web developers who seek greater control over their project’s dependencies.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;em&gt;Pros:&lt;/em&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Offline Availability: Libman allows you to download and store libraries locally, ensuring your application remains functional even when the CDN is inaccessible.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Version Control: You can specify the library’s version, preventing unexpected issues caused by updates.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Security: Local management of libraries allows for code auditing and adherence to security standards.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Customization: Selectively include only the parts of the library that your project requires, reducing unnecessary bloat.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;em&gt;Cons:&lt;/em&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Initial Setup Complexity: Configuring Libman may be more involved compared to the simplicity of CDN integration, especially for beginners.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Maintenance Responsibility: With Libman, you are responsible for keeping libraries up-to-date and managing dependencies.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Want to boost your .NET coding productivity? Check out &lt;a href="https://www.linqmeup.com" rel="noopener noreferrer"&gt;www.linqmeup.com &lt;/a&gt;— the AI powered SQL vs LINQ code converter &amp;amp; generator&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Illustrating with Font Awesome Integration
&lt;/h2&gt;

&lt;p&gt;Now, let’s have a closer look at how you can integrate Font Awesome using both methods:&lt;/p&gt;

&lt;h3&gt;
  
  
  Step-by-Step: Adding Font Awesome via CDN
&lt;/h3&gt;

&lt;p&gt;The CDN integration method is fairly straight forward, as you can see in the steps it takes to include Font Awesome:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Open your ASP.NET Core MVC project.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Navigate to your HTML or layout file.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add the following line inside the &amp;lt;head&amp;gt; section:&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjt0au92x1zcab28v8prc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjt0au92x1zcab28v8prc.png" alt="Integrating Font Awesome in your ASP.NET Core project using CDN."&gt;&lt;/a&gt;&lt;em&gt;Integrating Font Awesome in your ASP.NET Core project using CDN.&lt;/em&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Save the file, and you’re done!&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;Of course, you’ll need to add the HTML into the views to actually use the library and display the icons, but the integration part is quite easy.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step-by-Step: Adding Font Awesome using Libman
&lt;/h3&gt;

&lt;p&gt;The integration part, when using Libman at itself, isn’t all that harder than the CDN variant:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Open your ASP.NET Core MVC project.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Right-click on the project in Solution Explorer and select “Add” &amp;gt; “Client-Side Library.”&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Search for “font-awesome” and select the desired version.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Choose which files you want to include (e.g., CSS, fonts).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click “Install,” and Libman will download and add the selected files to your project.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Although the integration steps are quite simple for both the CDN and Libman variants, the actual difference is both the &lt;em&gt;strength&lt;/em&gt; and &lt;em&gt;constraint&lt;/em&gt; of the Libman way: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;after integrating, you’ll have &lt;strong&gt;zero dependency&lt;/strong&gt; on other services (CDN’s)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;you are responsible&lt;/strong&gt; for using the right version, and updating the client-side library when the time comes&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The choice between a CDN and Libman for library integration in your ASP.NET Core MVC project is a critical one, impacting performance, reliability, and maintenance. &lt;/p&gt;

&lt;p&gt;CDNs offer simplicity and immediate updates, while Libman provides offline availability, version control, and enhanced security.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb1p9xn1eucjjd7n858gp.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb1p9xn1eucjjd7n858gp.gif" alt="Now you know the differences, pros and cons about Libman and CDN you can choose your path."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;While we’ve used Font Awesome as an example, the principles discussed here apply to many external libraries you may incorporate into your web projects. As you embark on your web development journey, understanding these approaches will empower you to make informed decisions, ensuring your projects thrive in the dynamic realm of web development.&lt;/p&gt;

&lt;p&gt;My personal take: If you’re solo and just starting out, are not working on a business-critical corporate solution, or are working on a Minimum Viable Product, don’t be scared to take advantage of the simplicity of using a CDN. Use Libman when you want to fixate things, don’t want all the CDN dependencies clogging up your loading speed, or need to have control for a production environment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;🙏🏻 Thanks for reading, and let me know if you liked this article, and I’m curious which approach you take and why, so don’t hesitate to share in the comments.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>dotnet</category>
      <category>programming</category>
      <category>tooling</category>
    </item>
    <item>
      <title>Method Syntax vs. Query Syntax in C# LINQ: Unveiling the Differences, Pros, and Cons</title>
      <dc:creator>Edwin Klesman</dc:creator>
      <pubDate>Wed, 30 Aug 2023 17:49:47 +0000</pubDate>
      <link>https://dev.to/eekayonline/method-syntax-vs-query-syntax-in-c-linq-unveiling-the-differences-pros-and-cons-2f4f</link>
      <guid>https://dev.to/eekayonline/method-syntax-vs-query-syntax-in-c-linq-unveiling-the-differences-pros-and-cons-2f4f</guid>
      <description>&lt;p&gt;In the world of C# programming, LINQ (Language Integrated Query) stands as a powerful tool that enables developers to seamlessly interact with various data sources using a consistent syntax. When diving into LINQ, developers often encounter two primary ways of expressing queries: Method Syntax and Query Syntax. Each of these approaches has its own set of advantages and trade-offs, catering to different coding styles and scenarios. In this blog post, we’ll explore the key differences, pros, and cons of using Method Syntax and Query Syntax in C# LINQ.&lt;/p&gt;

&lt;h2&gt;
  
  
  Method Syntax: Concise and Fluent
&lt;/h2&gt;

&lt;p&gt;Method Syntax is characterized by its concise and fluent nature. It employs a sequence of chained methods to define a LINQ query. Each method performs a specific operation on the data source, and the output of one method serves as the input for the next. This method chaining is not only readable, but also allows developers to create complex queries in a linear fashion.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2760%2F1%2AqYJsJzKkz9c9c2oK78ObNA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2760%2F1%2AqYJsJzKkz9c9c2oK78ObNA.png" alt="An example of Microsoft LINQ C# code using Method Syntax"&gt;&lt;/a&gt;&lt;em&gt;An example of Microsoft LINQ C# code using Method Syntax&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Pros&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Conciseness: Method Syntax is often considered more compact and succinct, making it suitable for scenarios where brevity is essential.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;IntelliSense Support: Modern code editors provide excellent IntelliSense support, which assists developers in quickly discovering and selecting appropriate methods.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Performance: In certain cases, Method Syntax might offer better performance due to its streamlined execution pipeline.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Cons&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Learning Curve: For newcomers to LINQ, Method Syntax might pose a steeper learning curve, as understanding the sequence of methods and their specific purposes requires some familiarity.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Readability for Complex Queries: While Method Syntax is great for simple and moderately complex queries, highly intricate queries can become hard to read and comprehend due to the dense method chaining.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Query Syntax: SQL-Like Clarity
&lt;/h2&gt;

&lt;p&gt;Query Syntax, on the other hand, resembles SQL queries and provides a more declarative approach to constructing LINQ queries. It allows developers to express their intentions clearly, resembling a structured language for querying data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2760%2F1%2AjIPG-6GDLOSKPdnL0K-9dQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2760%2F1%2AjIPG-6GDLOSKPdnL0K-9dQ.png" alt="An example of Microsoft LINQ C# code using Query Syntax"&gt;&lt;/a&gt;&lt;em&gt;An example of Microsoft LINQ C# code using Query Syntax&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Pros&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Familiarity: If you are accustomed to SQL, Query Syntax can be a natural choice, as it resembles SQL statements, making it easier for SQL developers to transition into LINQ.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Readability: For complex queries involving multiple joins, grouping, and aggregations, Query Syntax can be more readable and maintainable than its method-based counterpart.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Less Error-Prone: Query Syntax reduces the likelihood of certain errors, like missing or out-of-order method calls, that might occur in Method Syntax due to the chaining nature.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Cons&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Limited Expressiveness: While Query Syntax is excellent for many scenarios, it might struggle to handle very complex queries as efficiently as Method Syntax due to its higher level of abstraction.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Verbose: Query Syntax can become verbose for simple queries, as it often requires more lines of code compared to the concise chain of methods used in Method Syntax.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Performance Overhead: In some cases, Query Syntax might introduce a bit of performance overhead due to the additional translation step required to convert the query into method calls.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Choosing the Right Syntax
&lt;/h2&gt;

&lt;p&gt;The choice between Method Syntax and Query Syntax in C# LINQ ultimately depends on the context and the developer’s preference. Consider the following factors when making your decision:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Familiarity: If you have a strong background in SQL or prefer a more declarative approach, Query Syntax might be a more intuitive choice.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Readability: For complex queries involving multiple operations, Query Syntax could be more readable and easier to maintain.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Performance: If performance is a critical factor and you are comfortable with method chaining, Method Syntax might provide slight performance advantages in some cases.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the end, the beauty of LINQ lies in its flexibility. You can even mix and match these two syntaxes within the same project, tailoring your approach to suit the specific requirements of each query.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;As a sidenote: If you ever need a tool that saves you time by creating LINQ code from SQL or a data sample for you (it supports both Method- and Query Syntax), check out this online tool I created: &lt;a href="https://www.linqmeup.com" rel="noopener noreferrer"&gt;linqmeup.com&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Method Syntax and Query Syntax in C# LINQ offer developers two distinct avenues for expressing their data querying needs. Method Syntax boasts conciseness and fluency, while Query Syntax provides SQL-like clarity and familiarity.&lt;/p&gt;

&lt;p&gt;As a famous (amongst others, for the &lt;em&gt;extreme programming&lt;/em&gt; concept) developer once said:&lt;/p&gt;

&lt;blockquote&gt;
&lt;h1&gt;
  
  
  “Any fool can write code that a computer can understand. Good programmers write code that humans can understand.” — Martin Fowler
&lt;/h1&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AexIln0vKcsUtX8M9ZRyOMA.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AexIln0vKcsUtX8M9ZRyOMA.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The choice between the two depends on factors like familiarity with SQL, the complexity of the query, and the desired level of performance. Whichever syntax you opt for, mastering both can provide you with a versatile set of tools to conquer diverse data manipulation tasks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Let me know if you liked the article &amp;amp; please share in the comments what syntax version you prefer, and if this article helped you to decide between the two.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code Hard, Ship Harder 🔥&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>csharp</category>
      <category>database</category>
      <category>programming</category>
      <category>learning</category>
    </item>
    <item>
      <title>How To Implement A "Maintenance Mode" in ASP.NET Core</title>
      <dc:creator>Edwin Klesman</dc:creator>
      <pubDate>Fri, 07 Apr 2023 13:15:00 +0000</pubDate>
      <link>https://dev.to/eekayonline/how-to-implement-a-maintenance-mode-in-aspnet-core-4c27</link>
      <guid>https://dev.to/eekayonline/how-to-implement-a-maintenance-mode-in-aspnet-core-4c27</guid>
      <description>&lt;p&gt;In this article, you will both learn how to put your asp.Net Core app into maintenance mode using the framework’s “App offline file” feature, and how to implement your own maintenance mode logic when you need more control.&lt;/p&gt;

&lt;p&gt;Let’s start with the fast solution when you just need to put it in maintenance quickly. &lt;/p&gt;

&lt;h2&gt;
  
  
  Using the framework’s maintenance feature
&lt;/h2&gt;

&lt;p&gt;For a fast implementation, you can use &lt;a href="https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/app-offline"&gt;asp .Net Core’s maintenance feature&lt;/a&gt; by adding a file called “app_offline.htm” in the &lt;strong&gt;root of your solution&lt;/strong&gt;. This is a very nice, quick and easy solution that lets you create a HTM(L) file with the layout and message that you want to show to your users you are performing maintenance on the app.&lt;/p&gt;

&lt;p&gt;This feature is called the “App offline file”, and has some things to consider, like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;the file can be maximally 4Gb in size (should be more than enough)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;it needs your app to receive another request to become online after removing the file&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;in specific situations, the app might not shut down immediately&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can read Microsoft’s documentation on the App Offline file feature, here: &lt;a href="https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/app-offline"&gt;App Offline file - learn.microsoft.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The App Offline file feature is very nice for small projects, MVP’s or demo setups, and side projects. &lt;/p&gt;

&lt;p&gt;If you want more control of how to implement maintenance mode, and want to add logic- or signalling features for a more controlled process, you will need to code your own solution. I will explain this in the following part.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rolling out your own maintenance mode feature
&lt;/h2&gt;

&lt;p&gt;Creating your own feature has the advantage that you don’t rely on a file being put into place on the server, and you can implement all kinds of extra things, i.e.:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;use application logic, a database value or a configuration file value to enable/disable maintenance mode (read on to see the configuration file implementation example)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;you can log the timestamps to register when and how long maintenance mode was applied for reference&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;you could implement signalling logic like sending an email, SMS, etc. to service desk employees and/or other key users or people that need to know.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To implement your own maintenance mode in ASP .NET Core, you can follow these steps:&lt;/p&gt;

&lt;p&gt;**Step 1. **Create a new middleware component that will intercept all requests to the application and return a “maintenance mode” page instead of processing the request. This middleware component should be registered in the request pipeline before any other middleware component.&lt;/p&gt;

&lt;p&gt;Here’s an example implementation of a maintenance mode middleware component:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;System.Threading.Tasks&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;Microsoft.AspNetCore.Http&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;MaintenanceMiddleware&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="k"&gt;readonly&lt;/span&gt; &lt;span class="n"&gt;RequestDelegate&lt;/span&gt; &lt;span class="n"&gt;_next&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="nf"&gt;MaintenanceMiddleware&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;RequestDelegate&lt;/span&gt; &lt;span class="n"&gt;next&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;_next&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;next&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="n"&gt;Task&lt;/span&gt; &lt;span class="nf"&gt;Invoke&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;HttpContext&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// Check if maintenance mode is enabled&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;IsMaintenanceModeEnabled&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteAsync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Maintenance mode is enabled. Please try again later."&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;

        &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;_next&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="kt"&gt;bool&lt;/span&gt; &lt;span class="nf"&gt;IsMaintenanceModeEnabled&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// Implement your own logic here to determine if maintenance mode is enabled&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Return true for demo purposes&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2.&lt;/strong&gt; In the Startup.cs file, add the maintenance mode middleware component to the request pipeline:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Configure&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;IApplicationBuilder&lt;/span&gt; &lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;IHostingEnvironment&lt;/span&gt; &lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
&lt;span class="p"&gt;{&lt;/span&gt; 
    &lt;span class="c1"&gt;// Other middleware components here... &lt;/span&gt;

    &lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;UseMiddleware&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;MaintenanceMiddleware&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;();&lt;/span&gt; 

    &lt;span class="c1"&gt;// Other middleware components here... &lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 3.&lt;/strong&gt; Implement the logic to enable and disable maintenance mode. &lt;/p&gt;

&lt;p&gt;This could be done using a configuration file, a database, or any other means that suits your application.&lt;/p&gt;

&lt;p&gt;Here’s an example implementation of a configuration-based maintenance mode toggle:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;MaintenanceMode&lt;/span&gt; 
&lt;span class="p"&gt;{&lt;/span&gt; 
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;bool&lt;/span&gt; &lt;span class="n"&gt;IsEnabled&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;get&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;set&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; 
&lt;span class="p"&gt;}&lt;/span&gt; 

&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Startup&lt;/span&gt; 
&lt;span class="p"&gt;{&lt;/span&gt; 
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;IConfiguration&lt;/span&gt; &lt;span class="n"&gt;Configuration&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;get&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; 

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="nf"&gt;Startup&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;IConfiguration&lt;/span&gt; &lt;span class="n"&gt;configuration&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
    &lt;span class="p"&gt;{&lt;/span&gt; 
        &lt;span class="n"&gt;Configuration&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;configuration&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; 
    &lt;span class="p"&gt;}&lt;/span&gt; 

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;ConfigureServices&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;IServiceCollection&lt;/span&gt; &lt;span class="n"&gt;services&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
    &lt;span class="p"&gt;{&lt;/span&gt; 
        &lt;span class="c1"&gt;// Other service configurations here... &lt;/span&gt;

        &lt;span class="c1"&gt;// Add configuration-based maintenance mode toggle &lt;/span&gt;
        &lt;span class="n"&gt;services&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Configure&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;MaintenanceModeOptions&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;(&lt;/span&gt;&lt;span class="n"&gt;Configuration&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;GetSection&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"MaintenanceMode"&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt; 
    &lt;span class="p"&gt;}&lt;/span&gt; 

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Configure&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;IApplicationBuilder&lt;/span&gt; &lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;IHostingEnvironment&lt;/span&gt; &lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
    &lt;span class="p"&gt;{&lt;/span&gt; 
        &lt;span class="c1"&gt;// Other middleware components here... &lt;/span&gt;

        &lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;UseMiddleware&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;MaintenanceMiddleware&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;();&lt;/span&gt; 

        &lt;span class="c1"&gt;// Other middleware components here... &lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; 
&lt;span class="p"&gt;}&lt;/span&gt; 

&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;MaintenanceModeOptions&lt;/span&gt; 
&lt;span class="p"&gt;{&lt;/span&gt; 
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;bool&lt;/span&gt; &lt;span class="n"&gt;IsEnabled&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;get&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;set&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; 
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With these changes, you can now enable or disable maintenance mode by updating the configuration value for MaintenanceModeOptions.IsEnabled.&lt;/p&gt;

&lt;h3&gt;
  
  
  Configuration file example
&lt;/h3&gt;

&lt;p&gt;Here’s an example of the appsettings.json configuration file that could be used to configure the maintenance mode toggle:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; 
  &lt;/span&gt;&lt;span class="nl"&gt;"MaintenanceMode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; 
    &lt;/span&gt;&lt;span class="nl"&gt;"IsEnabled"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="w"&gt; 
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; 
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Concluding
&lt;/h2&gt;

&lt;p&gt;Besides the technical implementation aspect — which I’ve shown you in this article — make sure to think about what option suits your development and deployment processes most.&lt;/p&gt;

&lt;p&gt;Nowadays, techniques and tools are often used to minimize the pain of maintaining your application in production. &lt;br&gt;
Things like DevOps, Continues Integration and Continues Deployment (CI/CD), deployment slots, and hot swappable environments have made a “maintenance mode” unnecessary in many scenarios, but not all.&lt;/p&gt;

&lt;p&gt;And that, dear reader, is all I’ve got for you on maintenance mode for Asp .Net Core.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--q7qStOLi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fbzqtuiyf8oww83tjg2p.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--q7qStOLi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fbzqtuiyf8oww83tjg2p.gif" alt="In this article, you've learned how to add a maintenance mode to your ASP.Net Core solution" width="480" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hopefully this article gave you some food for thought, and a good starting point if you decide to apply a maintenance mode feature for your solution. &lt;/p&gt;

&lt;p&gt;Code hard, Ship harder 🔥&lt;/p&gt;

&lt;p&gt;~&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Do you work on .Net solutions with lots of SQL / LINQ and do want to save time by converting SQL into LINQ code or the other way around? *&lt;/em&gt;&lt;em&gt;Check out &lt;a href="http://www.linqmeup.com/"&gt;LINQ Me Up — Convert SQL queries into LINQ code and vice versa using AI&lt;/a&gt;&lt;/em&gt;*&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>dotnet</category>
      <category>aspdotnet</category>
      <category>csharp</category>
    </item>
    <item>
      <title>A list of AI powered tools for C# Developers</title>
      <dc:creator>Edwin Klesman</dc:creator>
      <pubDate>Wed, 08 Mar 2023 22:08:52 +0000</pubDate>
      <link>https://dev.to/eekayonline/a-list-of-ai-powered-tools-for-c-developers-3p1k</link>
      <guid>https://dev.to/eekayonline/a-list-of-ai-powered-tools-for-c-developers-3p1k</guid>
      <description>&lt;p&gt;Since ChatGPT kicked everyone into an AI era of sorts, I thought it would be nice to sum up some AI-powered developer tools that are around today (2023) for C# developers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Developer tools that are using AI today, have one of&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;make a developer more productive by speeding up repetitive tasks&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;act as a second pair of eyes&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;helps developers by logically appending to our minds objectively&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;skips Google, shows instant personalized examples&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Don’t worry, it will still take quite some time before an AI can replace our craftsmanship. &lt;br&gt;
In the meanwhile, I’d love to show you some AI tools that are around in 2023, and get your feedback on this trend. Let me know in the comments if you’re using any of these tools, and if you think of this as useful additions or not.&lt;/p&gt;

&lt;p&gt;Without further ado, here is my list.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;AI Powered Developer Tools&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;IntelliCode&lt;/strong&gt;: Developed by Microsoft, IntelliCode is an AI-powered extension for Visual Studio that provides intelligent code completion suggestions. IntelliCode provides AI-assisted code completion suggestions, which can help C# developers write code faster and with fewer errors. It can also detect code smells and suggest refactoring options, making it a valuable tool for code maintenance.&lt;br&gt;
&lt;strong&gt;Pricing&lt;/strong&gt;: &lt;br&gt;
It is available for free in the Visual Studio Marketplace&lt;br&gt;
&lt;strong&gt;Where to find it&lt;/strong&gt;: &lt;br&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=VisualStudioExptTeam.VSIntelliCode"&gt;here’s the link to the marketplace page&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;DeepCode&lt;/strong&gt;&lt;br&gt;
DeepCode uses AI to analyze C# code and identify potential bugs and vulnerabilities. It can also suggest code improvements and highlight areas of the code that could benefit from refactoring.&lt;br&gt;
&lt;strong&gt;Pricing&lt;/strong&gt;: &lt;br&gt;
It offers a free plan as well as paid plans with additional features. More information can be found on the official website.&lt;br&gt;
&lt;strong&gt;Where to find it&lt;/strong&gt;: &lt;br&gt;
&lt;a href="https://www.deepcode.ai/"&gt;DeepCode: Semantic static code analysis for better software — powered by AI&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Codota&lt;/strong&gt;&lt;br&gt;
Developed by Codota Inc., Codota is an AI-powered autocomplete tool that suggests code snippets based on the context of your code. It can help C# developers write code faster and with fewer errors by offering suggestions based on similar code found in millions of repositories.More information can be found on the official website.&lt;br&gt;
&lt;strong&gt;Pricing&lt;/strong&gt;: &lt;br&gt;
It offers a free plan as well as paid plans with additional features.&lt;br&gt;
&lt;strong&gt;Where to find it&lt;/strong&gt;: &lt;br&gt;
&lt;a href="https://www.codota.com/"&gt;AI Assistant for software developers | Tabnine&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;TabNine&lt;/strong&gt;&lt;br&gt;
While this used to be a separate company, TabNine was acquired by Codota back in 2020. TabNine has similar features to Codota, but one recently announced cool feature that this tool has is generating unit tests using AI, which can really help to create some basic testing stuff for your application.&lt;br&gt;
&lt;strong&gt;Pricing&lt;/strong&gt;: &lt;br&gt;
It offers a free plan as well as paid plans with additional features.&lt;br&gt;
&lt;strong&gt;Where to find it&lt;/strong&gt;: &lt;br&gt;
&lt;a href="https://www.tabnine.com/"&gt;AI Assistant for software developers | Tabnine&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;CodeRush&lt;/strong&gt;&lt;br&gt;
Developed by DevExpress, CodeRush is a productivity plugin for Visual Studio that uses AI to help you write code faster. It provides a variety of AI-assisted coding tools, including code generation, intelligent navigation, and refactorings. It can help C# developers write code faster and with fewer errors, as well as maintain existing code more easily.&lt;br&gt;
&lt;strong&gt;Pricing&lt;/strong&gt;: &lt;br&gt;
It offers a 30-day free trial and a variety of pricing options for both individuals and teams.&lt;br&gt;
&lt;strong&gt;Where to find it&lt;/strong&gt;: &lt;br&gt;
&lt;a href="https://www.devexpress.com/products/coderush/"&gt;CodeRush: Free IDE Productivity Extension for Visual Studio | DevExpress&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;GitHub Copilot&lt;/strong&gt;&lt;br&gt;
Developed by GitHub and OpenAI, GitHub Copilot is an AI-powered code completion tool that uses GPT (Generative Pre-trained Transformer) to suggest code snippets based on the context of the code. It can be integrated into Visual Studio Code and other popular code editors, and can help C# developers write code faster and with fewer errors. GitHub Copilot is available as a technical preview.&lt;br&gt;
&lt;strong&gt;Pricing&lt;/strong&gt;: &lt;br&gt;
it’s still in preview and free.&lt;br&gt;
&lt;strong&gt;Where to find it&lt;/strong&gt;: &lt;br&gt;
Generic info &amp;gt; &lt;a href="https://copilot.github.com/"&gt;GitHub Copilot · Your AI pair programmer&lt;/a&gt;, Visual Studio plugin &amp;gt; &lt;a href="https://marketplace.visualstudio.com/items?itemName=GitHub.copilotvs"&gt;link to the marketplace page&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;LINQ Me Up:&lt;/strong&gt;&lt;br&gt;
With OpenAI’s release, a lot of tools are being created to harnass the power of AI. LINQ Me Up helps developers save time by converting SQL into LINQ code. This is useful to learn LINQ or to migrate projects to use the advantages of LINQ (easier to debug, compile-time checks, etc.).&lt;br&gt;
&lt;strong&gt;Pricing&lt;/strong&gt;:&lt;br&gt;
You get free credits at registration. There’s the possibility to buy credits, or a $8 p/month subscription&lt;br&gt;
&lt;strong&gt;Where to find it&lt;/strong&gt;: &lt;br&gt;
&lt;a href="https://www.linqmeup.com/"&gt;LINQ Me Up — Convert SQL queries into C# LINQ code using AI&lt;/a&gt;&lt;br&gt;
&lt;em&gt;disclaimer: I (the author) created this product&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  My take on AI-driven developer tools for C# developers
&lt;/h2&gt;

&lt;p&gt;I’ve personally only recently used Copilot for a couple of quick tests, and started to use IntelliCode recently. Furthermore, I’ve created LINQ Me Up to convert some stuff at my own convenience, making it for others to enjoy the same speed for converting.&lt;/p&gt;

&lt;p&gt;I believe that tools like this are good to save time by not having to write things from scratch over and over.&lt;br&gt;
It speeds up the search process and saves time compared to Googling on ways to implement specific code parts.&lt;/p&gt;

&lt;p&gt;That doesn’t take away that I still believe that we are at a young and fragile beginning stage of the wonders of AI.&lt;br&gt;
&lt;strong&gt;Reviewing, testing and common sense are still needed before pushing code into production.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;My take on this: any tool that can help you provide value towards others by letting you focus on value instead of syntax, is a good one.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What are your experiences / what is your stance on using AI tools?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Let me know what your take is on these tools, and what experience you’ve had (if any) with these tools.&lt;/p&gt;

&lt;p&gt;In the meanwhile: Code Hard, Ship Harder 🔥&lt;/p&gt;

</description>
      <category>tooling</category>
      <category>ai</category>
      <category>productivity</category>
      <category>csharp</category>
    </item>
    <item>
      <title>How To Convert a SQL Query Into C# LINQ</title>
      <dc:creator>Edwin Klesman</dc:creator>
      <pubDate>Sun, 26 Feb 2023 21:51:07 +0000</pubDate>
      <link>https://dev.to/eekayonline/how-to-convert-a-sql-query-into-c-linq-lb4</link>
      <guid>https://dev.to/eekayonline/how-to-convert-a-sql-query-into-c-linq-lb4</guid>
      <description>&lt;p&gt;In this article, I’ll show you what the basic steps are for converting a SQL query into LINQ. You’ll learn the basic steps needed while we convert an example query.&lt;/p&gt;

&lt;p&gt;In this article, it's assumed that you have a basic understanding of SQL, and know how to write C# code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Structured Query Language (&lt;a href="https://learn.microsoft.com/en-us/sql/t-sql/queries/select-transact-sql?view=sql-server-ver16" rel="noopener noreferrer"&gt;SQL&lt;/a&gt;) is a powerful language for working with relational databases. It is widely used to retrieve and manipulate data from a variety of databases. However, when it comes to working with data in C# code, Language Integrated Query (&lt;a href="https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/linq/" rel="noopener noreferrer"&gt;LINQ&lt;/a&gt;) is a popular alternative to SQL. In this article, we will show how to manually convert a SQL query into &lt;a href="https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/linq/" rel="noopener noreferrer"&gt;LINQ&lt;/a&gt;, step-by-step.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example SQL Query
&lt;/h3&gt;

&lt;p&gt;Let’s begin with an example SQL query that includes a join, a couple of where conditions, and ordering. Here is the query:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT Orders.OrderID, Customers.CustomerName, Orders.OrderDate
FROM Orders
INNER JOIN Customers ON Orders.CustomerID = Customers.CustomerID
WHERE Orders.ShippedDate IS NULL AND Orders.Freight &amp;gt; 100
ORDER BY Orders.OrderDate DESC
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  Step-by-Step Conversion to LINQ
&lt;/h2&gt;

&lt;p&gt;Let’s begin with the overall steps that you need to perform when converting your SQL into LINQ.&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 1: Analyse The SQL Query
&lt;/h3&gt;

&lt;p&gt;When you have selected the query you need to convert into LINQ, it makes sense that you at least understand how the SQL is put together.&lt;/p&gt;

&lt;p&gt;I often do this — with SQL not written by me — by walking through the query from top to bottom and marking anything that’s unclear. I tend to use Visual Studio Code and SQL comments for this:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;-- just writing a comment above the lines that are unclear
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Then I’d look up / Google any functions or constructions that aren’t clear to me, so I can get a grasp of the functionality.&lt;/p&gt;

&lt;p&gt;When I know what the query does functionally, I write down the query’s functionality in my own words. For example, for our example query the explanation would be:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The query retrieves the OrderID, CustomerName, and OrderDate from the Orders and Customers tables, where the ShippedDate is null and the Freight is greater than 100. The results are ordered by the OrderDate in descending order. &lt;br&gt;
This results in a list of Orders from new to old, that haven’t been shipped yet and have a freight amount of at least 100.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Using A Data Context Class
&lt;/h3&gt;

&lt;p&gt;Depending on your needs, and what is already implemented in your solution, you might need to create a &lt;em&gt;data context class&lt;/em&gt;. A &lt;em&gt;data context class&lt;/em&gt; provides a connection to the database and maps database objects to C# classes. &lt;br&gt;
A &lt;em&gt;data context class&lt;/em&gt; can be created manually by you, or when you’re using &lt;a href="https://learn.microsoft.com/en-us/ef/" rel="noopener noreferrer"&gt;Entity Framework (EF)&lt;/a&gt;, you can generate a *data context class *using that.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Creating a data context class&lt;/strong&gt;&lt;br&gt;
Here is an example of a data context class coded as the representation of a database that our example query would use:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class NorthwindDataContext : DbContext
{
    public DbSet&amp;lt;Order&amp;gt; Orders { get; set; }
    public DbSet&amp;lt;Customer&amp;gt; Customers { get; set; }

    protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
    {
        optionsBuilder.UseSqlServer("Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=Northwind");
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This data context class represents a database called “Northwind” and includes two entities: Order and Customer (each entity is typically a table in your database). We also specify the connection string for the database.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Using Entity Framework (EF)&lt;/strong&gt;&lt;br&gt;
Here are the steps to use Entity Framework to generate a data context class and use it to query data with LINQ:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Install Entity Framework: If you haven’t already done so, install Entity Framework by adding the EntityFramework package to your project. You can do this by opening the NuGet Package Manager Console in Visual Studio and running the following command:&lt;br&gt;
Install-Package EntityFramework&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create a data model: Create a class that represents your database schema, also known as a data model. You can create this class by using the Entity Framework Designer in Visual Studio &lt;strong&gt;OR&lt;/strong&gt; by writing code manually. Here is an example of how to define a simple data model for a Northwind database:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    public class NorthwindDataContext : DbContext
    {
        public DbSet&amp;lt;Customer&amp;gt; Customers { get; set; }
        public DbSet&amp;lt;Order&amp;gt; Orders { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Entity&amp;lt;Customer&amp;gt;()
                .HasKey(c =&amp;gt; c.CustomerID);

            modelBuilder.Entity&amp;lt;Order&amp;gt;()
                .HasKey(o =&amp;gt; o.OrderID);

            modelBuilder.Entity&amp;lt;Order&amp;gt;()
                .HasRequired&amp;lt;Customer&amp;gt;(o =&amp;gt; o.Customer)
                .WithMany(c =&amp;gt; c.Orders)
                .HasForeignKey(o =&amp;gt; o.CustomerID);
        }
    }

    public class Customer
    {
        public string CustomerID { get; set; }
        public string CompanyName { get; set; }
        public string ContactName { get; set; }
        public string ContactTitle { get; set; }
        public string Address { get; set; }
        public string City { get; set; }
        public string Region { get; set; }
        public string PostalCode { get; set; }
        public string Country { get; set; }
        public string Phone { get; set; }
        public string Fax { get; set; }

        public virtual ICollection&amp;lt;Order&amp;gt; Orders { get; set; }
    }

    public class Order
    {
        public int OrderID { get; set; }
        public string CustomerID { get; set; }
        public DateTime OrderDate { get; set; }
        public DateTime? ShippedDate { get; set; }
        public decimal Freight { get; set; }

        public virtual Customer Customer { get; set; }
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: Creating the LINQ code
&lt;/h3&gt;

&lt;p&gt;To retrieve data with LINQ, we need to interact with the data context class, depending on the manual or EF flavor, there are minor differences in the code (which I’ll illustrate using comments).&lt;/p&gt;

&lt;p&gt;So let’s use the DbSet property of the data context class. I usually go from top to bottom in the SQL query, and write down the equivalent in LINQ using auto-completion to find any options.&lt;/p&gt;

&lt;p&gt;In our example, we want to retrieve the OrderID, CustomerName, and OrderDate from the Orders and Customers tables. We can do this with the following LINQ query:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;using (var context = new NorthwindDataContext())
{
    var query = from order in context.Orders
                join customer in context.Customers on order.CustomerID equals customer.CustomerID
                where order.ShippedDate == null &amp;amp;&amp;amp; order.Freight &amp;gt; 100
                orderby order.OrderDate descending
                select new { order.OrderID, customer.CustomerName, order.OrderDate };

    var result = query.ToList();
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This LINQ query uses a join to combine the Orders and Customers tables. It includes two where conditions to filter the results and an orderby clause to order the results. &lt;br&gt;
Finally, it selects the OrderID, CustomerName, and OrderDate into an anonymous type. All similar to our input query.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;An advantage of using ORM features&lt;/strong&gt;&lt;br&gt;
One optimization that you can make when you’re using an ORM like Entity Framework, is that you can use so-called &lt;em&gt;navigation properties&lt;/em&gt;, which saves you a “join” statement. For example:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var query = from order in context.Orders
            where order.ShippedDate == null
            select new 
            {
                order.OrderID,
                order.Customer.CustomerName,
                order.OrderDate
            };
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;In this LINQ query, we’re selecting the OrderID, CustomerName, and OrderDate properties from the Orders entity, using the Customer &lt;em&gt;navigation property&lt;/em&gt; to get the associated CustomerName.&lt;/p&gt;

&lt;p&gt;By using the &lt;em&gt;navigation property&lt;/em&gt; instead of an explicit Join, the ORM can generate the appropriate SQL query behind the scenes, optimizing the query execution and simplifying the code for the developer.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Compiling &amp;amp; Executing the LINQ query
&lt;/h3&gt;

&lt;p&gt;With LINQ, the query is generated and setup, but only executed when you actually perform an action on it.&lt;/p&gt;

&lt;p&gt;As visible in the LINQ example from step 3, the result variable will only get the information after a method like “ToList()” is performed on the LINQ query.&lt;/p&gt;

&lt;p&gt;By setting a breakpoint on this line, you can compile and execute the query and check if this works properly.&lt;/p&gt;

&lt;p&gt;Any typos or references to non-existing properties or entities should also have been long signalled by your IDE, as type-checking and compile time checks really form a nice way to filter out human mistakes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5: Validating the results
&lt;/h3&gt;

&lt;p&gt;It is only common sense that, after you’ve setup your LINQ code AND verified that it compiles into proper code, you will test if the outcomes of the SQL and the LINQ are similar.&lt;/p&gt;

&lt;p&gt;So step 5 is the testing phase, in which you typically could follow these steps to verify that your LINQ is giving the expected results:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Test step 1:&lt;/strong&gt; Execute the SQL query: First, execute the SQL query in your database management tool, such as SQL Server Management Studio or MySQL Workbench. This will give you a result set that you can use for comparison.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Test step 2:&lt;/strong&gt; Capture the SQL query: Next, capture the SQL query generated by LINQ. You can do this by inspecting the ToString() output of the LINQ query, as we did earlier:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var query = from order in context.Orders
            join customer in context.Customers on order.CustomerID equals customer.CustomerID
            where order.ShippedDate == null &amp;amp;&amp;amp; order.Freight &amp;gt; 100
            orderby order.OrderDate descending
            select new { order.OrderID, customer.CustomerName, order.OrderDate };

string sql = query.ToString(); 
//This was ToList() before, but now results in a string 
//that you can get with a breakpoint on this line
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Test step 3:&lt;/strong&gt; Execute the LINQ query: Finally, execute the LINQ query and compare the result set to the one obtained from executing the SQL query. You can use a tool like LINQPad to execute the LINQ query and inspect the results.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;using (var context = new NorthwindContext())
{
    var query = from order in context.Orders
                join customer in context.Customers on order.CustomerID equals customer.CustomerID
                where order.ShippedDate == null &amp;amp;&amp;amp; order.Freight &amp;gt; 100
                orderby order.OrderDate descending
                select new { order.OrderID, customer.CustomerName, order.OrderDate };

    var result = query.ToList();

    // Compare the result set to the SQL query result set
    // ...
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;To compare the result sets, you can use a tool like Beyond Compare or WinMerge to compare the data in the two result sets. Alternatively, you can write a small program to iterate over the result sets and compare each row.&lt;/p&gt;

&lt;p&gt;Keep in mind that there may be small differences in the ordering of the rows or the formatting of the data, so you may need to account for these differences when comparing the results. In addition, if you are using different database engines for the SQL query and the LINQ query, there may be differences in the way that data is stored and retrieved, so you should be aware of any such differences.&lt;/p&gt;

&lt;p&gt;Overall, testing the SQL and LINQ output for equivalence is an important step in verifying the correctness of your LINQ queries, and can help you catch errors early in the development process.&lt;/p&gt;

&lt;p&gt;Also, don’t forget to check if the query is at least equally fast to the original SQL version (although, in my experience, LINQ is often faster because LINQ generates better and faster queries with each new release).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;That’s it! We have manually converted the SQL query into LINQ.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2At3MFd2xqsQWPiVV9b5aE7w.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2At3MFd2xqsQWPiVV9b5aE7w.gif" alt="Hooray! You converted SQL into LINQ!"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  To conclude
&lt;/h2&gt;

&lt;p&gt;In this article, we have shown how to manually convert a SQL query into LINQ.&lt;/p&gt;

&lt;p&gt;We started with an example SQL query that included a join, a couple of where conditions, and ordering. We then demonstrated each step in the conversion process:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Step 1: analysing the SQL&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Step 2: Using a data context class&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Step 3: Creating the LINQ code&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Step 4: Compiling &amp;amp; Executing the LINQ query&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Step 5: Validating the results&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;From creating analysing the SQL, to creating a data context class to executing and testing the LINQ query, the entire procedure would take about 15 to 80 minutes, depending on your familiarity with LINQ and the complexity of the query.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you’d ever need a faster way that would save you time to do this manually, check out an online tool that I created: &lt;a href="http://www.linqmeup.com" rel="noopener noreferrer"&gt;LINQ Me Up&lt;/a&gt;. It is a conversion tool that empowers the power of AI to generate C# LINQ code from your SQL input in a minute (or a couple, depending on the size of your SQL query).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Thanks for reading my conversion guide, and I hope that it at minimum gave you some insights on how to go from SQL to C# LINQ.&lt;/p&gt;

&lt;p&gt;Code hard. Ship harder 🔥&lt;/p&gt;

</description>
      <category>csharp</category>
      <category>sql</category>
      <category>database</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Unlocking the Potential of AI for Developers: How to Increase Productivity &amp; Shorten Time-To-Market</title>
      <dc:creator>Edwin Klesman</dc:creator>
      <pubDate>Fri, 13 Jan 2023 21:23:19 +0000</pubDate>
      <link>https://dev.to/eekayonline/unlocking-the-potential-of-ai-for-developers-how-to-increase-productivity-shorten-time-to-market-48h7</link>
      <guid>https://dev.to/eekayonline/unlocking-the-potential-of-ai-for-developers-how-to-increase-productivity-shorten-time-to-market-48h7</guid>
      <description>&lt;p&gt;As technology continues to advance, Artificial Intelligence (AI) is becoming an increasingly important tool for developers. With the ability to act as a “Google on steroids,” an interactive context-sensitive search tool, and a digital assistant that takes care of repetitive and tedious tasks, AI has the potential to change the way we work and help us to create better and more efficient solutions. This post is a more in-depth article based on &lt;a href="https://twitter.com/EeKayOnline/status/1613800721656201216?s=20&amp;amp;t=oJauvFBJC0i6UOY0TeJ45w"&gt;my Twitter Thread&lt;/a&gt; on AI for developers.&lt;/p&gt;

&lt;h3&gt;
  
  
  AI is starting to get valuable
&lt;/h3&gt;

&lt;p&gt;Artificial intelligence (AI) is rapidly evolving and has the potential to change the way we work as developers. At its core, AI acts as a powerful tool that can help us to save time and effort while increasing productivity and shortening time-to-market.&lt;/p&gt;

&lt;p&gt;One of the most significant advantages of AI is that it acts as a “Google on Steroids,” providing us with an interactive and context-sensitive search tool that can help us find the answers we need quickly and easily. Additionally, AI can act as a digital assistant that takes care of repetitive and tedious tasks, freeing up our time to focus on more important work.&lt;/p&gt;

&lt;p&gt;As developers, it’s essential that we invest our time and effort in adding value to our projects. This means solving problems, weighing the current options, and giving our clients the right direction and implementation to get the most value out of their situation. By using AI, we can achieve this by increasing productivity, shortening time-to-market, and providing context-sensitive solutions.&lt;/p&gt;

&lt;p&gt;While some developers may choose to write all the code themselves, or learn and find the best way and steps on their own, it will take more time, effort, and money than necessary. With all the online resources and AI added to that, developers can create products in a fraction of the time it would take otherwise.&lt;/p&gt;

&lt;p&gt;In fact, quite a few developers in my network have used AI to create products in just a couple of days by coupling AI APIs on a website and adding payment functionality. These solutions are viable, used by many, and provide great value (even though they were implemented quickly).&lt;/p&gt;

&lt;h3&gt;
  
  
  It’s not magic (yet)
&lt;/h3&gt;

&lt;p&gt;It’s important to note that while AI can help us to provide value, it cannot provide value by itself. The key is to use AI in the right way and to find out what value it can provide for you.&lt;/p&gt;

&lt;p&gt;I personally have been playing with AI and I am currently working on a product powered by AI that helps developers transform SQL into LINQ C# code. The product is called **LINQ Me Up, **which you can checkout at &lt;a href="http://linqmeup.com/"&gt;https://www.linqmeup.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LAo9ux2m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2AnUpsQyfDQENtzDkZ3rh_8Q.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LAo9ux2m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2AnUpsQyfDQENtzDkZ3rh_8Q.gif" alt="AI in action for converting SQL into LINQ code: [LINQ Me Up](https://www.linqmeup.com)" width="600" height="261"&gt;&lt;/a&gt;&lt;em&gt;AI in action for converting SQL into LINQ code: &lt;a href="https://www.linqmeup.com"&gt;LINQ Me Up&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Examples of how AI can aid developers
&lt;/h3&gt;

&lt;p&gt;If you still can’t see how AI might benefit you as a maker, developer or digital entrepreneur, here are ten explicit examples of how AI could provide value:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;AI can automate repetitive tasks such as code generation, testing and debugging, which can save developers a significant amount of time and increase productivity.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Natural language processing is one of the aspects that AI is increasingly getting better at, which can be integrated into chatbots and virtual assistants to handle customer service inquiries, freeing up developers’ time to focus on more important tasks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AI can be used to optimize and automate the process of testing, which can shorten time-to-market by allowing developers to identify and fix bugs more quickly.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Analysing data and provide insights is another way in which AI can help developers to make more informed decisions, leading to more efficient and effective development.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Artificial Intelligence can improve the user experience of your product by providing personalized recommendations, which can help to increase engagement and retention.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AI can also be integrated into products such as website builders and e-commerce platforms, which can help to automate the process of creating and managing a website, saving developers time and effort.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AI can be integrated into code editors to provide developers with context-sensitive suggestions and auto-completion, which can improve code quality and reduce the time it takes to write code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When it comes to the logistics angle of your project, AI can be of value also. AI can be integrated into project management tools to automate the process of task assignment and scheduling, which can improve team collaboration and productivity.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AI can be used to create predictive models that can anticipate and prevent problems before they occur, which can lead to improved product reliability and reduced downtime.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;As video is getting more and more important in the online world of today, AI can also be used for image and video processing to automate tagging, captioning, and other tasks, which can save time and effort for developers working on multimedia projects.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  To conclude
&lt;/h3&gt;

&lt;p&gt;In conclusion, as developers, we should not ignore the potential of AI and should take the time to play around with it and find out what value it can provide for us.&lt;/p&gt;

&lt;p&gt;Whether it’s as a tool that explains, writes, and creates, or as part of our solution to fulfil an otherwise complicated implementation, AI has the potential to change the way we work and help us to create better and more efficient solutions.&lt;/p&gt;

&lt;p&gt;Take care and remember:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.eekayonline.com"&gt;Create. Value. First.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This post is also &lt;a href="https://medium.com/@eekayonline/unlocking-the-potential-of-ai-for-developers-how-to-increase-productivity-shorten-time-to-market-7ec68ce1f3e9"&gt;published at Medium&lt;/a&gt; with more interesting articles of mine&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>development</category>
      <category>productivity</category>
      <category>learning</category>
    </item>
    <item>
      <title>To Learn Or To Ship, That's The Question</title>
      <dc:creator>Edwin Klesman</dc:creator>
      <pubDate>Thu, 25 Mar 2021 12:06:14 +0000</pubDate>
      <link>https://dev.to/eekayonline/to-learn-or-to-ship-that-s-the-question-4041</link>
      <guid>https://dev.to/eekayonline/to-learn-or-to-ship-that-s-the-question-4041</guid>
      <description>&lt;p&gt;&lt;em&gt;Learning a framework or tool&lt;/em&gt; and &lt;em&gt;shipping your product&lt;/em&gt; are two things that don't really mix up most of the time. In this article, I explain why you should separate the two for your project&lt;/p&gt;

&lt;h2&gt;
  
  
  Shipping Product 🚀
&lt;/h2&gt;

&lt;p&gt;I have a strong belief that when your goal is to ship your MVP a la &lt;em&gt;The Lean Startup&lt;/em&gt;, you need to use tools and techniques that you are familiar and comfortable with. That way, you can focus on creating the MVP and generating value.&lt;br&gt;
The focus needs to be on the &lt;strong&gt;product level&lt;/strong&gt;, meaning that everything you're doing is about thinking: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;how will this add to the value creation for the end-users?&lt;/li&gt;
&lt;li&gt;is this feature necessary, or can I do this in the next version?&lt;/li&gt;
&lt;li&gt;does the feature feel natural, and is it easy to use for the users?&lt;/li&gt;
&lt;li&gt;etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;How you actually implement your project using (no-/low-)code, and if it is &lt;em&gt;the neatest way to code it&lt;/em&gt; are not as important when you want to provide value without investing too much time and effort which results in a longer time-to-market. &lt;br&gt;
Not when you're bootstrapping your product/service, and want to ship your product within a short timespan.&lt;/p&gt;

&lt;h2&gt;
  
  
  Learning The Tools 🎓
&lt;/h2&gt;

&lt;p&gt;If you're working on a side project to learn a framework, stack, tool, whatever, it's best when you're not committing yourself to a stressful deadline. You can focus on learning the tools and choose simple tasks or projects to create so they can be realized within days or weeks.&lt;/p&gt;

&lt;p&gt;Trying out variations and different approaches on how to create things with a framework really lets you get your hands in the code and often shows aspects and use-cases that are helpful later on.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mixing Learning &amp;amp; Shipping
&lt;/h2&gt;

&lt;p&gt;What you need to understand, is that when you're using tools/frameworks/.. for a product that you want to ship that you didn't use before, there is a great chance that this will stall your progress.&lt;/p&gt;

&lt;p&gt;You'll most likely bump into an aspect that you want - ney..need (it's an MVP, right?) - to implement but then, when you're actually using it, you find yourself spending hours on figuring out how to get this small thing to work for your project. &lt;br&gt;
Perhaps you even are the lucky one finding out there is a bug in that one feature that you need for your use-case that was going to save you a lot of time... 🙈&lt;/p&gt;

&lt;p&gt;Nothing is more frustrating than finding yourself stuck or delayed because you &lt;em&gt;assumed&lt;/em&gt; that a library would do the trick. &lt;br&gt;
After developing for over 20 years I know that these scenarios are inevitable, but minimizing the risk of this happening and getting stuck less, can really mean the difference between "being in a happy flow working and getting enough progress to keep at it" and "getting stuck too many times and dwindling off to your next thing".&lt;/p&gt;

&lt;p&gt;This is where the perseverance and consistency part for makers kicks in.&lt;/p&gt;

&lt;h3&gt;
  
  
  Investigate Upfront 🧐
&lt;/h3&gt;

&lt;p&gt;In my experience, the only way to properly integrate something that's "new to you" in a product that needs shipping ASAP, is to find something &lt;strong&gt;upfront&lt;/strong&gt; and research it before you start your product.&lt;br&gt;
Researching means going over the website, Googling, and reading user scenarios on sites like Stack overflow. Finding out if the product is actually working and if there are people around that can help you.&lt;/p&gt;

&lt;h3&gt;
  
  
  Support &amp;amp; Community Matter 🤝
&lt;/h3&gt;

&lt;p&gt;By making sure that the product is well supported and maintained you can be more assured that this will save you time, not cost you time.&lt;br&gt;
Often, there are commercial products that will cost a little but that have proper support and guidance for your situation, which might give you more assurance that it will actually function.&lt;/p&gt;

&lt;p&gt;When it comes to using open source, finding out if there is a vibrant community of users and demos for use cases or issue discussions can be a sign that it will help you out on creating and shipping your product.&lt;/p&gt;

&lt;p&gt;Especially when you're implementing an edge-case that hasn't been implemented many times before, knowing that the creators, maintainers, or users of a framework or tool can help you out can be the life-changing fact you need.&lt;/p&gt;

&lt;h2&gt;
  
  
  Concluding 🏁
&lt;/h2&gt;

&lt;p&gt;By now, I hope I've shown you why shipping and learning don't really blend well if you want to ship your MVP and get it out there using minimal effort on a strict deadline.&lt;/p&gt;

&lt;p&gt;Here are the key take-aways I want you to remember:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Don't learn implementing something &lt;em&gt;on the job&lt;/em&gt; if you want to ship your MVP anytime fast&lt;/li&gt;
&lt;li&gt;Use frameworks, tools, and code that you are familiar with&lt;/li&gt;
&lt;li&gt;If you need to use something for your project, research upfront if it has proven to be useful for your use-case and check if support and/or a vibrant community are around &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Either code to learn or code to ship. Or first code to learn, then use what you've learned to use that in something to ship.&lt;/p&gt;

&lt;p&gt;Working with the things you are familiar with really helps to keep the pace, focus on shaping the right product, and will reduce the number of times you will get stuck during the implementation phase.&lt;/p&gt;

&lt;p&gt;And it will prevent me from having to tell you that wildly annoying but famous phrase:&lt;/p&gt;

&lt;p&gt;👨🏻‍🏫 I told you so ☝🏻&lt;/p&gt;

&lt;p&gt;Code Hard, Ship Harder 🔥&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This article is also published on &lt;a href="https://eekayonline.medium.com/to-learn-or-to-ship-thats-the-question-ab635117385e"&gt;Medium&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>learning</category>
      <category>development</category>
      <category>agile</category>
      <category>lean</category>
    </item>
    <item>
      <title>How to stop Laravel’s Valet asking for password</title>
      <dc:creator>Edwin Klesman</dc:creator>
      <pubDate>Tue, 09 Feb 2021 10:45:35 +0000</pubDate>
      <link>https://dev.to/eekayonline/how-to-stop-laravel-s-valet-asking-for-password-2aki</link>
      <guid>https://dev.to/eekayonline/how-to-stop-laravel-s-valet-asking-for-password-2aki</guid>
      <description>&lt;p&gt;If there is one aspect of Laravel that I like, it’s that it is accompanied by very nice tools.&lt;/p&gt;

&lt;p&gt;Depending on how you like to develop you can even choose between different approaches and tools to develop with Laravel.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--H9XKu7Hr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/b4qlbe4na8wgusgu5fuq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--H9XKu7Hr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/b4qlbe4na8wgusgu5fuq.png" alt="Valet is part of the Laravel toolset" width="800" height="198"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://laravel.com/docs/8.x/valet"&gt;Valet&lt;/a&gt; is one of those tools. If you — like me — like to quickly setup your development environment, and test your work in progress asap, Valet helps you to setup test domains on your local machine very fast.&lt;/p&gt;

&lt;p&gt;As Valet’s documentation explains:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Valet is a Laravel development environment for macOS minimalists. Laravel Valet configures your Mac to always run &lt;a href="https://www.nginx.com/"&gt;Nginx&lt;/a&gt; in the background when your machine starts. Then, using &lt;a href="https://en.wikipedia.org/wiki/Dnsmasq"&gt;DnsMasq&lt;/a&gt;, Valet proxies all requests on the *.test domain to point to sites installed on your local machine.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What’s up with the password?
&lt;/h2&gt;

&lt;p&gt;When you’ve developed in Laravel using Valet before, you will notice that once you reinstall Valet on a new machine (or clean install), it will start asking for a password.&lt;/p&gt;

&lt;p&gt;After some research on Github, I found out why this is. &lt;br&gt;
As it appears, there are two factors causing the continuous password prompt:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;For security reasons, Valet prompts for the sudo password every time the command is used in a new terminal session&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The code previously searched two files. The code that would create two files in /etc/sudoers.d &lt;a href="https://github.com/laravel/valet/issues/446#issuecomment-333196825"&gt;was removed&lt;/a&gt; from the sourcecode&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Since Valet uses sudo rights for some actions it needs to take, it depends on getting sudo rights to fully function.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to prevent Valet from asking your password?
&lt;/h2&gt;

&lt;p&gt;The answer is quite simple: you need Valet to trust your computer.&lt;/p&gt;

&lt;p&gt;As you can find on the documentation page for Valet, the solution is revealed in &lt;a href="https://laravel.com/docs/8.x/valet#other-valet-commands"&gt;the “other commands” section&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6sbjcN-g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2572/1%2A628WeS4HP7Q1y1ngDO-k1g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6sbjcN-g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2572/1%2A628WeS4HP7Q1y1ngDO-k1g.png" alt="" width="800" height="81"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As the command states:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Add sudoers files for Brew and Valet to allow Valet commands to be run without prompting for your password.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Whereas the sudo command allows non-root users to run commands that would normally require super user privileges, the sudoers file instructs the system how to handle the sudo command (source: &lt;a href="https://www.hostinger.com/tutorials/sudo-and-the-sudoers-file/"&gt;hostinger.com&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;So, by using the “valet trust” command, you will indicate that the current machine can be trusted, which results in sudoers adjustments that will give Valet sudo permissions to operate correctly and without asking for your password each and every time.&lt;/p&gt;

&lt;h2&gt;
  
  
  To conclude
&lt;/h2&gt;

&lt;p&gt;Please understand that the reason that you were prompted for the password in the first place, is because of increased security measures.&lt;/p&gt;

&lt;p&gt;The security impact for using sudoers to give Valet sudo rights has also been discussed by the community on &lt;a href="https://github.com/laravel/valet/issues/446"&gt;this Github thread&lt;/a&gt; concerning the issue.&lt;/p&gt;

&lt;p&gt;Although using the trust command makes it easier to use valet without having to enter your password every time, always think about your machine setup, its connectivity to the internet and how this might affect your security at a realistic level.&lt;/p&gt;

&lt;p&gt;Me personally, I’m happy to trust my device and am using Valet with a big smile once more.&lt;/p&gt;

&lt;p&gt;Code Hard, Ship Harder 🔥&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This article is also published on &lt;a href="https://eekayonline.medium.com/how-to-stop-laravels-valet-asking-for-password-a03694814c5b"&gt;Medium&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>php</category>
      <category>laravel</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>Makers: What vlog content would you like to see?</title>
      <dc:creator>Edwin Klesman</dc:creator>
      <pubDate>Mon, 17 Aug 2020 13:50:17 +0000</pubDate>
      <link>https://dev.to/eekayonline/makers-what-vlog-content-would-you-like-to-see-4ga6</link>
      <guid>https://dev.to/eekayonline/makers-what-vlog-content-would-you-like-to-see-4ga6</guid>
      <description>&lt;p&gt;Dear fellow coders and makers : I've posted a poll on twitter to find out what 🎬 vlog content is most appreciated/sought after. &lt;/p&gt;

&lt;p&gt;Is it startup or developer stuff in general. &lt;br&gt;
Vlogs about Xamarin mobile app dev? &lt;/p&gt;

&lt;p&gt;Let me know by voting so I can get get more input:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/EeKayOnline/status/1294749068900667396"&gt;My twitter poll&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Sharing is ♥️ and will help me to get clearer insights! 🙌🏻&lt;/p&gt;

</description>
      <category>coding</category>
      <category>learning</category>
      <category>vlog</category>
      <category>teach</category>
    </item>
    <item>
      <title>Exploring Your Mobile App Business Idea</title>
      <dc:creator>Edwin Klesman</dc:creator>
      <pubDate>Fri, 26 Jun 2020 10:49:51 +0000</pubDate>
      <link>https://dev.to/eekayonline/exploring-your-mobile-app-business-idea-1mp9</link>
      <guid>https://dev.to/eekayonline/exploring-your-mobile-app-business-idea-1mp9</guid>
      <description>&lt;p&gt;In this post, I give you actionable advice on what to think about and consider before you start building your mobile app business idea. &lt;/p&gt;

&lt;p&gt;As a &lt;a href="https://medium.com/@EeKayOnline/advice-for-developers-from-someone-with-15-plus-years-experience-66528eb1324c" rel="noopener noreferrer"&gt;web- and mobile developer with over 16 years of experience&lt;/a&gt; on his belt, I’ve learned what needs consideration before you start your mobile adventure, both for business supporting apps and stand-alone mobile app services.&lt;/p&gt;

&lt;blockquote&gt;
&lt;h1&gt;
  
  
  Every assumption that you’re starting your mobile app product on is false until proven valid
&lt;/h1&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Your Assumptions Are Wrong
&lt;/h2&gt;

&lt;p&gt;In an era where building Minimum Viable Products (MVPs), and pivoting ideas as taught by &lt;a href="https://amzn.to/2AklGDr" rel="noopener noreferrer"&gt;The Lean Startup&lt;/a&gt; and agile processes are king, assuming you just need to build your mobile app and turning it into a success is proven to have a 99% chance of failing.&lt;/p&gt;

&lt;p&gt;Every assumption that you’re starting your mobile app product on is false until proven valid. This is a law that applies universally.&lt;/p&gt;

&lt;p&gt;I’m not saying you’re always in the wrong ball-park. But it is unlikely that you are spot on in one stroke, and you should always assume that you are working on wrong assumptions.&lt;/p&gt;

&lt;p&gt;Your assumptions could be a little off and just need a little tweaking to work for your idea, or they can be wrong entirely.&lt;/p&gt;

&lt;p&gt;As an entrepreneur or maker, it is your job to find out what assumptions are right and wrong, and how to improve them or find the right ones for your product.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F669rwwvoo98a6l48r6n2.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F669rwwvoo98a6l48r6n2.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Here are some ways that can help you to minimize the error in your assumptions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Scratch your itch: work on an idea for a solution that you need for yourself or to solve a problem that you’re experiencing yourself. That way, you can validate if it works for you. You’ll need to find out if there are enough of other people that have the same problem to see if this is going to be viable&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Idea pivoting: create the simplest form of your idea that helps you to demonstrate your solution to others. This could be as simple as creating an Excel sheet, a clickable wireframe, mockups, or non-coding examples. If you’re a quick developer a simple duct tape proof of concept using your developer stack could do as well. Just invest the least amount of effort that is needed to enable the demonstration of your idea&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Landing pages: you can pivot your idea on a simple website to show how and what value it provides (and for whom) to see if it gets tractions before you build anything.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are awesome books available that can help to provide you with the right mindset and information to find out if your idea is viable.&lt;/p&gt;

&lt;p&gt;Coming from a technical background, the following books helped me to shape my mindset for sure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://amzn.to/3cULhzV" rel="noopener noreferrer"&gt;The Mom Test by Rob Fitzpatrick&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://amzn.to/2YkZ5hG" rel="noopener noreferrer"&gt;The Lean Product Playbook by Dan Olsen&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;🔑 Take-aways:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;You need to test your assumptions instead of being naive and think that you’re right&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Get the right mindset by &lt;a href="https://medium.com/shipharder/how-i-shipped-my-1st-product-in-2020-by-focussing-on-value-first-8161ebc912f6" rel="noopener noreferrer"&gt;focussing on value&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;iterate on your idea by testing against potential users if it’s going to be viable. Create the simplest solution and use the agile circle of Think. Build. Learn. Adapt. Repeat.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Types Of Apps And Distribution Channels
&lt;/h2&gt;

&lt;p&gt;One of the first questions I always ask is: does your app have to be in the app store?&lt;/p&gt;

&lt;p&gt;Because of my software engineering background and diverse experience, I know there are many ways to build a solution. For apps, there are multiple form factors to implement them, like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Native apps: iOS- and Android apps that are built using their native development tools&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Cross-Platform apps: iOS- and Android mobile apps that are built with a single toolset, a shared logic implementation, and compiled into native variants&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Hybrid apps: mobile apps that are built similar to cross-platform apps, but with the shared implementation and screens implemented using web technology. They are either “packed” into a native layer or compiled into native apps.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Progressive Web Apps (PWAs): these are apps that are built using web technology and that can be used in a mobile browser on smartphones. They can use a couple of mobile app features.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Mobile-friendly websites: these are websites that are accessible and user friendly when opened on a mobile device.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fn44d3o2u7zonu2dlt3fe.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fn44d3o2u7zonu2dlt3fe.jpg" alt="There are multiple distribution channels to choose from for your mobile app business idea"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Besides considering the above implementation types, there are quite some channels that can be used to distribute your solution:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The app stores; a platform-specific channel that is integrated into the fibers of iOS and Android&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Enterprise stores; you can create a private store for your company so employees (or customers) can use your apps in a “closed shopping” environment&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Package distribution: For Android apps, you can distribute your app package (APK) via websites (or any other file sharing solution for that matter)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Websites: you can implement your solution as a mobile web app or mobile-friendly website and host it on a server somewhere.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Before you choose your solution and/or distribution channel, ask yourself this: &lt;strong&gt;Does the app need to be in the App Store?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In the past 10 years, I’ve noticed how a lot of companies and entrepreneurs wanted to “have their app in the AppStore” for the same reason that people used to want websites on the internet for their companies: they wanted to have a presence there.&lt;/p&gt;

&lt;p&gt;Just having an app in the AppStore because you need to be present there doesn’t cut it anymore.&lt;/p&gt;

&lt;p&gt;With the AppStore having over 2.2 million apps available, and 2.8 million apps being offered in the Google Playstore, you’re not going to get exposure — or actual users — unless your app &lt;a href="https://medium.com/shipharder/create-value-before-a-solution-6b7db609b02b" rel="noopener noreferrer"&gt;provides value&lt;/a&gt; for its users.&lt;/p&gt;

&lt;p&gt;Sure, the AppStore can be a commercially interesting distribution channel. But you’ll need to be featured and highly exposed to get the amount of traction to make things interesting.&lt;/p&gt;

&lt;p&gt;If you’re building a mobile app or service targeted at consumers (&lt;a href="https://www.investopedia.com/terms/b/btoc.asp" rel="noopener noreferrer"&gt;B2C&lt;/a&gt;) You’ll are probably better off with releasing your mobile solution and communicating this through multiple channels and platforms instead of depending on the editorial teams at Apple and Google.&lt;/p&gt;

&lt;p&gt;Commonly used (international) channels are used and for startups and/or independent solutions, early adopters are often targeted via &lt;a href="http://www.producthunt.com/" rel="noopener noreferrer"&gt;Product Hunt&lt;/a&gt;, &lt;a href="https://news.ycombinator.com/" rel="noopener noreferrer"&gt;Hacker News&lt;/a&gt;, &lt;a href="https://www.reddit.com/r/startup/" rel="noopener noreferrer"&gt;Reddit&lt;/a&gt;, etc.&lt;/p&gt;

&lt;p&gt;Perhaps you should focus more on social media platforms and utilize focus features like groups on LinkedIn and Facebook.&lt;/p&gt;

&lt;p&gt;Are you creating something that is going to be used internally? Use your main news-distribution channel and adjust process descriptions to get your app’s usage going.&lt;/p&gt;

&lt;p&gt;Yes, the app stores are integrated highly into the OS, and linking and downloading the app is made easy. But “installing” your solution can also be done with Progressive Web Apps and their offline features or making it easy to save a link to your web app solution.&lt;/p&gt;

&lt;p&gt;Don’t let your idea of what an App Store might bring you blind you from the alternatives. Instead, try to look at what mobile features are most useful and interesting for your solution, and find out if they provide enough value for the end-users before putting in a lot of effort or choosing directions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🔑 Take-aways:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;There are multiple ways to build an app. They all have their use-cases and pricing tag&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;There are multiple channels besides the app store that you can utilize to your advantage.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;App stores sure have their pros, but they’re not holy. And they are already packed with millions of apps. Find out what channel will support your solution the most and always cross-check the effort needed to get your solution out there against the value that the channel might provide you&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What Mobile Features Are Necessary?
&lt;/h2&gt;

&lt;p&gt;A large part of choosing the right format for your solution depends on the features that your idea depends on.&lt;/p&gt;

&lt;p&gt;ie: if you’re having a news related solution for a specific niche, you’ll probably want to trigger your users to open your app through push notifications on important news updates.&lt;/p&gt;

&lt;p&gt;This is a feature* that is possible for native, cross-platform, hybrid, and progressive web apps.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;: I’m aware that desktop browsers have push notification functionalities, but they don’t work on mobile devices&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If your solution needs to process the camera stream of a mobile device camera to recognize objects or apply filters, you’re going to be bound to native solutions or cross-platform/hybrid solutions (that are using frameworks that provide native support for those features).&lt;/p&gt;

&lt;p&gt;A lot of companies are &lt;a href="https://levelup.gitconnected.com/progressive-web-applications-the-trend-of-2020-pros-and-cons-301bab02d673" rel="noopener noreferrer"&gt;moving from native apps towards progressive web applications&lt;/a&gt; because they are easier to maintain, can be distributed faster, and are getting more and more feature support from both mobile- and desktop browsers.&lt;/p&gt;

&lt;p&gt;You can look at the different types of mobile solutions as the layer of a union with the native apps being at its core and the other variants being wrapped around it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F9pjhfg4rx7kx00b0kpdz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F9pjhfg4rx7kx00b0kpdz.png" alt="The mobile solution type union layers"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The more your idea depends on the hardware features of mobile devices, the more likely you will be heading towards a native solution (the core of the union) or one of the surrounding layers.&lt;/p&gt;

&lt;p&gt;🔑 Take-aways:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Double-check what mobile features you absolutely need for your minimal product definition and find out — together with a &lt;a href="https://www.eekayonline.com/#english" rel="noopener noreferrer"&gt;mobile expert&lt;/a&gt; if you’re lost — what fits your solution and what possibilities are available for your solution&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If your implementation provides value to its users, the type of implementation will matter less, so focus on value creation and not app building&lt;/p&gt;

&lt;blockquote&gt;
&lt;h1&gt;
  
  
  In the end, building apps isn’t about building apps: it’s about providing value that can be utilized in the palm of your hand.
&lt;/h1&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Is Your Idea Viable On Mobile?
&lt;/h2&gt;

&lt;p&gt;If you have a solution that requires users to fill in a lot of input fields, chances are that your solution isn’t cut out for mobile devices.&lt;/p&gt;

&lt;p&gt;If things are so complex that they can’t be handled in a simple flow, chances are that you’re trying to combine multiple processes or services into one.&lt;/p&gt;

&lt;p&gt;Mobile app usage is based on multi-frequent, short-used, and low barrier interactions with the mobile device. In other words: if you make it too complex, take to long or time dependant chances are that your solution isn’t ready for the small screens &lt;em&gt;yet&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Try to find out what processes there are, which one results in the most value for its users, and you(r company) and focus on one of them.&lt;/p&gt;

&lt;p&gt;You can see if there are processes that are dependant or highly related and choose to provide them together in a single app or you could see if a suite of multiple apps would be a better solution.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fhjrg2wlzcx4mq5ll68hh.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fhjrg2wlzcx4mq5ll68hh.jpg" alt="Is your mobile app business idea suitable for the small screen?"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It all depends on what you’re trying to provide for your users, and only you can find out (preferably, together with your potential users) what makes sense and feels natural and logical.&lt;/p&gt;

&lt;p&gt;Creating a simple, userfriendly mobile experience that will provide the user with value while not slowing them down or distracting them more than is necessary, can be tough.&lt;/p&gt;

&lt;p&gt;Don’t underestimate the importance of making the solution ready for mobile.&lt;/p&gt;

&lt;p&gt;In my experience, copy-pasting desktop experiences never work out and proof to be a waste of money and effort eventually.&lt;/p&gt;

&lt;h2&gt;
  
  
  “Simple can be harder than complex: You have to work hard to get your thinking clean to make it simple. But it’s worth it in the end because once you get there, you can move mountains.”
&lt;/h2&gt;

&lt;p&gt;― Steve Jobs&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🔑 Take-aways:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;If things are looking too complex, find out of you’re trying to combine multiple things into one app&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Make your solution usable in the context of mobile usage: multi-frequent, short-used, and low barrier interactions&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Simple can be hard; find out how to improve the experience instead of saving effort and copy-pasting a desktop solution&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Concluding
&lt;/h2&gt;

&lt;p&gt;If you’ve come this far, you’ll have read about multiple aspects that you’ll need to consider when it comes to mobile solutions.&lt;/p&gt;

&lt;p&gt;By focussing on the value that you want to provide to the app users and taking all the possibilities into account (instead of being blinded by the commonly known types of apps and distribution channels) I hope to give you the insights to make well-informed decisions.&lt;/p&gt;

&lt;p&gt;Invest the minimal amount of effort necessary to test your solution and validate your assumptions using the feedback of your potential users.&lt;/p&gt;

&lt;p&gt;In the end, building apps isn’t about building apps: it’s about providing value that can be utilized in the palm of your hand.&lt;/p&gt;

&lt;p&gt;Code Hard, Ship Harder 🔥&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;a href="https://medium.com/shipharder/exploring-your-mobile-app-business-idea-b05a7834257c" rel="noopener noreferrer"&gt;This post is also published on Medium&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Xamarin ios waiting for debugger to connect on port 10000 via usb</title>
      <dc:creator>Edwin Klesman</dc:creator>
      <pubDate>Tue, 09 Jun 2020 10:57:58 +0000</pubDate>
      <link>https://dev.to/eekayonline/xamarin-ios-waiting-for-debugger-to-connect-on-port-10000-via-usb-2p49</link>
      <guid>https://dev.to/eekayonline/xamarin-ios-waiting-for-debugger-to-connect-on-port-10000-via-usb-2p49</guid>
      <description>&lt;p&gt;This short post explains how to fix the “xamarin ios waiting for debugger to connect on port 10000 via usb” issue and get your debugger working again.&lt;/p&gt;

&lt;p&gt;Xamarin ios waiting for debugger to connect on port 10000 via usb&lt;/p&gt;

&lt;h3&gt;
  
  
  On-device Debugging Wanted
&lt;/h3&gt;

&lt;p&gt;Every mobile developer knows that you need to run and debug your app on an actual device to make sure that things are working as expected.&lt;/p&gt;

&lt;p&gt;Wether it is the Anroid Emulator or the iOS simulator; they can only go so far on simulating the actual target environment of physical devices.&lt;/p&gt;

&lt;p&gt;And when things DO go wrong (your solution rarely compiles and runs without any mistake) it really helps when you can debug on your device.&lt;/p&gt;

&lt;p&gt;When you’ve grabbed your favorite drink and spun up the debug session, it can be extremely frustrating when the following happens with your Xamarin iOS project:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;project building…. finished 😁&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;deploying to device …. 10..20..30………..100% 👌🏻&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The top status bar is showing you the following message:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;xamarin ios waiting for debugger to connect on port 10000 via usb&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;😅 okay, i’ll wait a few seconds&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt; 🥴&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;you wait for a minute… status remaining the same: it appears to be stuck &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ygDt8qAZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/63944otr5ggoy5e0p9p3.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ygDt8qAZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/63944otr5ggoy5e0p9p3.gif" alt="xamarin ios waiting for debugger to connect on port 10000 via usb is not what you want to get stuck at after you deployed" width="500" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As it appears, the debugger can’t hook up with your iOS device, and won’t let you step through your code. &lt;/p&gt;

&lt;p&gt;This bug seems to be occurring when you’re trying to debug via USB as well. Obviously, the error will then show up as follows:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;**xamarin ios waiting for debugger to connect on port 10000 via wifi**
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Meanwhile, on the device, you can use the app as expected but debugging is not possible.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fixing the Infinite Wait
&lt;/h3&gt;

&lt;p&gt;Somehow, this issue is caused by the build on the device not properly reacting to the message that Visual Studio is sending over on the default debugging port (which is port 10000).&lt;/p&gt;

&lt;p&gt;The app lanches, but things are not communicating conform expectations of the debugging protocol.&lt;/p&gt;

&lt;p&gt;In order to fix this from happening again, here are the basic steps that you should follow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Remove the app from your iOS device&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In Visual Studio For Mac go and clean your solution (Build &amp;gt; Clean All)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Right click on your iOS project and select “Reveal in Finder”, and delete the &lt;em&gt;**bin&lt;/em&gt;* &lt;em&gt;and *&lt;/em&gt;&lt;em&gt;obj&lt;/em&gt;** directories&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Close Visual Studio entirely&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Restart your iOS device (it depends on your device how you need to do this, check &lt;a href="https://support.apple.com/en-gb/HT201559"&gt;Apple’s instructions&lt;/a&gt; if you don’t know how to do it)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;While your phone is rebooting, you can spin up Visual Studio For Mac, open up your solution and rebuild your Xamarin.iOS project&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;As soon as your phone is ready and loaded, Build and Run your project on the device&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This time, the deployed application instance should hook up nicely with Visual Studio for Mac once again&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Debug and do your thing 🎉&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Still Stuck?
&lt;/h3&gt;

&lt;p&gt;The steps I mention in this post assume you’re running a project that is using the default debugging configuration for Xamarin.iOS projects. &lt;/p&gt;

&lt;p&gt;If you’re still running into issues, check:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;the debug settings on your project via: Right click on your iOS project &amp;gt; Options &amp;gt;iOS Debug. Enable debugging should be checked for your configuration (debug &amp;gt; iPhone)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;check and see that you are actually trying to run the debug version (not the release)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;check that the debug information is set to “Full” for your projecrt via: Right click on your iOS project &amp;gt; Options &amp;gt; Compiler&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cu6I0q----/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/1cigyty8kv9lu49ut8zs.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cu6I0q----/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/1cigyty8kv9lu49ut8zs.jpg" alt='Check all debug settings if the "xamarin ios waiting for debugger to connect on port 10000 via usb" error keeps bugging you' width="800" height="532"&gt;&lt;/a&gt;&lt;/p&gt;
Photo by Glenn Carstens-Peters on Unsplash



&lt;h3&gt;
  
  
  The End
&lt;/h3&gt;

&lt;p&gt;I hope these instructions saved you some time defeating the “Xamarin iOS waiting for debugger to connect on port 10000 via USB” message.&lt;/p&gt;

&lt;p&gt;At least the origin for this bug (for once) isn’t because you:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;a)&lt;/strong&gt; set up something wrong or &lt;br&gt;
&lt;strong&gt;b)&lt;/strong&gt; put an awful and/or weird line of code in your project&lt;/p&gt;

&lt;p&gt;These things tend to consume way too much time because we coders often tend to think it’s definitely a or b.&lt;/p&gt;

&lt;p&gt;Don’t loose your spirits and keep up with building another awesome solution that provides value!&lt;/p&gt;

&lt;p&gt;Code hard, &lt;a href="//https:www.shipharder.com"&gt;Ship harder&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;This post is also published &lt;a href="https://medium.com/@EeKayOnline/xamarin-ios-waiting-for-debugger-to-connect-on-port-10000-via-usb-cfc5e5577720"&gt;on Medium&lt;/a&gt;&lt;/p&gt;

</description>
      <category>debug</category>
      <category>showdev</category>
      <category>mobile</category>
      <category>csharp</category>
    </item>
  </channel>
</rss>
