
Nantes, Quebec Web Design & Development Articles
Latest articles from around the web
A century from now, historians will study how the "Great Lockdown" of 2020 changed the lives of billions across the globe -- and there's one aspect in particular that will stand out: education. In the big picture of human history, mass public schooling is a recent phenomenon. It arrived with the era of industrialization. Hundreds,...
I blogged about the open source Carter Community Project in 2019. Let's check in and see what's going on today in 2021! The open source Carter Community Project adds opinionated elegance to ASP.NET Core routing With .NET 6 on the near horizon, one notes that Carter has a net6 branch. Per their website, this is the goal of the Carter framework: Carter is framework that is a thin layer of extension methods and functionality over ASP.NET Core allowing code to be more explicit and most importantly more enjoyable. As of today you can bring Carter into your .NET 6 projects like this:dotnet add package Carter --version 6.0.0-pre2 And the .NET 6 samples are under active development! Let's bring it down with a clone, switch to the net6 branch and give it a go. Here's as simple Web API sample with Carter that returns a list of actors at localhost:5001/actorsusing Carter;using CarterSample.Features.Actors;using Microsoft.AspNetCore.Builder;using Microsoft.Extensions.DependencyInjection;var builder = WebApplication.CreateBuilder(args);builder.Services.AddSingleton<IActorProvider, ActorProvider>();builder.Services.AddCarter();var app = builder.Build();app.MapCarter();app.Run(); Nice! This is using new .NET 6 features so there's no Main(), it's implied. The builder has an ActorProvider added as a Singleton. I bet we'll use that when we ask for /actors in our browser or favorite HTTP API client.public class ActorsModule : ICarterModule{ public void AddRoutes(IEndpointRouteBuilder app) { app.MapGet("/actors", (IActorProvider actorProvider, HttpResponse res) => { var people = actorProvider.Get(); return people; }); ... }} This is nice and clean. Everything is using Dependency Injection so no one is "newing up" an Actor. You'll note also that returning the Actors as JSON is implied when we return the IEmumerable<Actor> that comes from actorProvider.Get(). In fact, the whole Actor Module is just 80 lines so I'll include it here:public class ActorsModule : ICarterModule{ public void AddRoutes(IEndpointRouteBuilder app) { app.MapGet("/actors", (IActorProvider actorProvider, HttpResponse res) => { var people = actorProvider.Get(); return people; }); app.MapGet("/actors/{id:int}", (int id, IActorProvider actorProvider, HttpResponse res) => { var person = actorProvider.Get(id); return res.Negotiate(person); }); app.MapPut("/actors/{id:int}", async (HttpRequest req, Actor actor, HttpResponse res) => { var result = req.Validate<Actor>(actor); if (!result.IsValid) { res.StatusCode = 422; await res.Negotiate(result.GetFormattedErrors()); return; } //Update the user in your database res.StatusCode = 204; }); app.MapPost("/actors", async (HttpContext ctx, Actor actor) => { var result = ctx.Request.Validate<Actor>(actor); if (!result.IsValid) { ctx.Response.StatusCode = 422; await ctx.Response.Negotiate(result.GetFormattedErrors()); return; } //Save the user in your database ctx.Response.StatusCode = 201; await ctx.Response.Negotiate(actor); }); app.MapDelete("/actors/{id:int}", (int id, IActorProvider actorProvider, HttpResponse res) => { actorProvider.Delete(id); return Results.StatusCode(204); }); app.MapGet("/actors/download", async (HttpResponse response) => { using (var video = new FileStream("earth.mp4", FileMode.Open)) //24406813 { await response.FromStream(video, "video/mp4"); } }); app.MapGet("/empty", () => Task.CompletedTask); app.MapGet("/actors/sample", () => Task.CompletedTask); app.MapPost("/actors/sample", () => Task.CompletedTask); app.MapGet("/nullable", () => Task.CompletedTask); }} Note the API example at /actors/download that shows how to return a file like an MP4. Nice and simple. This sample also includes thoughtful validation code with FluentValidation extension methods like ctx.Request.Validate(). Carter is opinionated but surprisingly flexible. You can use two different routing APIs, or clean and performant Endpoint routing:this.Get("/", (req, res) => res.WriteAsync("There's no place like 127.0.0.1")).RequireAuthorization(); It even supports OpenAPI out of the box! Carter has an active Slack as well as Templates you can add to make your next File | New Project easier!dotnet new -i CarterTemplateThe following template packages will be installed: CarterTemplateSuccess: CarterTemplate::5.2.0 installed the following templates:Template Name Short Name Language Tags--------------- ---------- -------- ------------------------------Carter Template carter [C#] Carter/Carter Template/NancyFX There's a lot of great innovation happening in the .NET open source space right now. Carter is just one cool example. Go check out Carter on GitHub, give them a Star, try it out and get involved in open source! Sponsor: YugabyteDB is a distributed SQL database designed for resilience and scale. It is 100% open source, PostgreSQL-compatible, enterprise-grade, and runs across all clouds. Sign up and get a free t-shirt(C) 2021 Scott Hanselman. All rights reserved.
Building applications for people from different parts of the world comes with challenges like support for multiple locales and how to integrate it into your application. I remember the first time I faced this challenge, I had to build an application that was going to have multiple languages (English, Yoruba, and French). This was the first time I ever wondered how applications that supported multiple languages were built and also how I discovered "Internationalization".
WooCommerce POS Stripe card swipe add-on offers the functionality to integrate the Stripe card swipe machine into the POS. The extension allows the POS sales merchants to make payments by connecting the Stripe payment gateway to the card swipe machine. The POS agents can make payments and generate the invoice after making the payment. Note: [...]
Three-dimensional shapes and geometry add depth and visual interest to the digital space. Maybe that's why this is a trending website design technique. While 3D elements in web design aren't new, using geometry and geometric shapes to create this effect is beginning to explode. It can be a fun and interesting way to make elements […]
In programming terminology, a string simply means a sequence or an array of characters. A single character is an alphanumeric value. Back in the days when C was invented, a character in a computer was represented by a 7-bit ASCII code. A string, therefore, is a collection of many 7-bit ASCII characters. However, as the […] The post Working with Strings in Go appeared first on Developer.com.
Modern technology allows various innovations like APIs to thrive. As a result, the term "API" has become a staple in tech and is extensively used...Read More The post 6 Reasons Why You Should Consider API-First Development appeared first on ISHIR | Software Development India.
A few months ago, I stumbled upon the API treasure of Microsoft. It was a jaw dropping moment when I saw more than a dozen Artificial Intelligence based APIs. This treasure has a sci-fi name and is known as Project Oxford which was announced in Build 2015 developer conference in San Francisco. What is Project...
UX practitioners can play an important role in growing the UX maturity of the organizations and product teams they work with. This final article in a three-part series presents two additional tactics that are critical for achieving and maintaining higher levels of UX maturity: education of UX staff and education of non-UX staff on UX principles and processes.
There's a logo on just about everything these days - smartphones, snacks, cars, clothes - you name it. Some of them are simple while others host hidden messages that... The post 20 Messages Hidden in 20 of the Most Recognizable Logos appeared first on Onextrapixel.
About The Coding Studio Inc.
Developing professional web applications
for Nantes, Quebec, for 20 years!
Consultation Services
With years of experience and many satisfied customers, we provide the direction and assistance you require.
Custom Web Development
We specialize in complex custom web projects, from small business websites to corporate applications.
Increase Profits
We create an experience which converts more leads and retains more customers, which increases profits.
Reduce Expenses
We help to simplify and automate employee tasks, which reduces payroll and other expenses.
What customers have said
TestimonialsSaint-Damien,Quebec Web Design & Development
Beckwith,Ontario Web Design & Development
Laurier-Station,Quebec Web Design & Development
Laird No. 404,Saskatchewan Web Design & Development
Brossard,Quebec Web Design & Development
Dorchester,New Brunswick Web Design & Development
Tofield,Alberta Web Design & Development
Iroquois Falls,Ontario Web Design & Development
Humbermouth,Newfoundland and Labrador Web Design & Development