Programming Tips πŸ’‘
54.7K subscribers
65 photos
8 videos
30 files
335 links
Programming:
Tips πŸ’‘
Articles πŸ“•
Resources πŸ‘Ύ
Design Patterns πŸ’Ž
Software Principles βœ…

πŸ‡³πŸ‡± Contact & Ads: @MoienTajik
Download Telegram
Use DbContextPooling to Improve the Performance : .NET Core 2.1 Feature πŸ’Ž

If you are familiar with .NET Core, then you might be knowing AddDbContext method. 🧐

This method is used to inject dependency of DbContext into your controller and it should be written in the Startup.cs class. πŸ’‰

So in case of AddDbContext, a new instance will be created for each request and would get disposed once the work is done. ♻️

New contexts are getting created for each request. ⏳

That is still fine but if there are more than 1k requests – 1k times object will be created and disposed, unless you have made it a Singleton. ☝🏻

Creating and disposing of so many objects may impact the performance. ❌

How DbContextPooling can help❓

https://t.me/pgimg/117

[ Article ] : http://bit.do/dbpol

γ€°γ€°γ€°γ€°γ€°γ€°
#AspMvc #Core
@ProgrammingTip
Using MariaDB with ASP.NET Core 2.0 🌊

What is MariaDB❓

MariaDB is a community-developed fork of the MySQL relational database management system intended to remain free under the GNU GPL. 🐧

Development is led by some of the original developers of MySQL, who forked it due to concerns over its acquisition by Oracle Corporation. πŸ’Ž

Basically it is a fork of MySQL which is guaranteed to stay open source, and as noted it is supposed to be a drop-in replacement for MySQL. ✨

So let’s put this to the test with a simple ASP.NET Core application. πŸ”₯

https://t.me/pgimg/118

[ Article ] : bit.do/mariad

γ€°γ€°γ€°γ€°γ€°γ€°
#AspMvc #Core #MariaDB #MySql
@ProgrammingTip
Blazor πŸ”₯

An experimental .NET web framework using C#/Razor and HTML that runs in the browser via WebAssembly that is supported by Microsoft. πŸ’Ž

Blazor is a .NET web framework that runs in any browser. 🌐

Blazor uses only the latest web standards. No plugins or transpilation needed. βœ…

It runs in the browser on a real .NET runtime (Mono) implemented in WebAssembly that executes normal .NET assemblies. ⚑️

It works in older browsers too by falling back to an asm.js based .NET runtime. πŸ‘΄πŸΏ

Blazor will have all the features of a modern web framework, including ✨ :
β€’ Components
β€’ Routing
β€’ Layouts
β€’ Forms and validation
β€’ Dependency injection
β€’ JavaScript interop
β€’ Live reloading
β€’ Server-side rendering
β€’ Full .NET debugging


https://t.me/pgimg/120

[ Github ] : bit.do/blazor
[ Learn ] : learn-blazor.com
[ Flight Finder ] : bit.do/ffinder
[ Sample CRUD ] : bit.do/bzcrud

γ€°γ€°γ€°γ€°γ€°γ€°
#Blazor #AspMvc #Core
@ProgammingTip
Programming Tips πŸ’‘
Photo
ASP.NET Core.2 & Angular 5.pdf
7.3 MB
ASP.NET Core 2 & Angular 5 - Full Stack Web Development with .NET Core & Angular πŸ“•

Author : Valerio De Sanctis πŸ–Š

Publisher : Packt πŸ’Ž

γ€°γ€°γ€°γ€°γ€°γ€°
#Book #AspMvc #Core #Angular
@ProgrammingTip
API Feature Folders ⚑️

In ASP.NET Core (and unlike ASP.NET 5 / Web API 2), Web API controllers are just controllers. πŸ—‚

You don’t need to inherit from a different base type or anything like that. ❌

What’s more, your API controllers should be returning DTOs that are separate from your underlying domain or data model. ↔️

What I’ve found to be a better organization is to do away with the Controllers folder (or keep it around if you’re using view-based controllers) and instead use feature folders for your APIs. πŸ’Ž

I’m partial to having a root level API folder but if you’d prefer to put your features in the root of the project that would work, too. πŸ‘πŸ»

Within each feature folder, you include the controller along with any model types it needs to work with, like this πŸ‘Ύ :

https://t.me/pgimg/124

Obviously one benefit of this approach is that it’s more cohesive. βœ…

Things that change together are located physically next to one another, and the friction involved in moving between different folders with too many files in them is greatly reduced. βœ‚οΈ

Another nice thing about this approach is that it just works. Unlike view-based controllers, you don’t need to change anything about how ASP.NET Core is configured to have this organization structure work for you. ✨


[ Article ] : bit.do/apif

γ€°γ€°γ€°γ€°γ€°γ€°
#AspMvc #Core #API
@ProgrammingTip
Apress - Real-Time Web Application Development.pdf
21.3 MB
Real-Time Web Application Development : With ASP.NET Core, SignalR, Docker, and Azure πŸ“•

Author : Rami Vemula πŸ–Š

Publisher : Apress ✨

γ€°γ€°γ€°γ€°γ€°
#Book #AspMvc #Core #SignalR #Docker #Azure
@ProgrammingTip
Using Redis Cache in .NET Core πŸ—‚

Redis is a high performance distributed cache. It’s great for storing data that you are going to need again and again in a short period of time when you don’t want to use processing power to β€œcreate” that data again. ♻️

Think number crunching or heavy SQL queries for data that doesn’t change often. 🚫


Roll Your Own πŸ‘€

First off. You can absolutely roll your own Redis Cache services abstracted by your own interfaces etc. βœ…

You may find it a little difficult to find libraries that target .NET Core, but this will change over time. ⏳

In saying that, there is a β€œ.NET Core” way of doing things that is a little different. It does tie you into the framework a little, but it abstracts away the caching completely and let’s Microsoft handle it and that’s what we are going to go over today. πŸ’Ž


https://t.me/pgimg/131

[ Article ] : bit.do/rcache

γ€°γ€°γ€°γ€°γ€°γ€°
#Redis #AspMvc #Core #Cache
@ProgrammingTip
Dockerise .NET Core Apps πŸ“¦

In this tutorial, you will learn how to build and run your first ASP.NET Core docker image. πŸ”₯

We're going to walk through how you would add docker support to a pre-existing code base. πŸ’Ž

It’s incredibly easy to do. βœ…


https://t.me/pgimg/136

[ Article ] : bit.do/dcker

γ€°γ€°γ€°γ€°γ€°γ€°
#AspMvc #Core #Docker
@ProgrammingTip
Coravel ⏰

.NET Core meets Laravel : Scheduling, Queuing, etc. ✨

Features πŸ’Ž :
β€’ Task Scheduling
β€’ Queuing

Tired of using cron and Windows Task Scheduler❓

Want to use something easy that ties into your existing code❓

In Startup.cs, put this in ConfigureServices() πŸ‘Ύ :

services.AddScheduler(scheduler =>
{
scheduler.Schedule(
() => Console.WriteLine("Run at 1pm utc during week days."))
.DailyAt(13, 00)
.Weekday();
});

Easy enough❓

Look at the documentation to see what methods are available❗️


https://t.me/pgimg/140

[ Github ] : bit.do/corevl

γ€°γ€°γ€°γ€°γ€°γ€°
#AspMvc #Core #Scheduler
@ProgrammingTip
What's This and Can I Delete It❓ Examining a Default ASP.NET Core MVC Project πŸ’₯

I have a very simple two-step process I use whenever I create or join a new project.☝🏻

I examine each folder and file, and ask "what's this, and can I delete it❓"

After all, deleting things (or demolishing them, as may be appropriate) is so, so satisfying. πŸ˜ƒ

I would be much happier deleting all code that ever existed. πŸ—‚

To that end, we're going to examine a default ASP.NET Core project, created with ASP.NET Core 2.1 and Visual Studio 2017, to see what we absolutely have to keep and what can be thrown away. πŸ’Ž

Let's get deleting❗️


https://t.me/pgimg/148

[ Article ] : kutt.it/NCtImP

γ€°γ€°γ€°γ€°γ€°γ€°
#AspMvc #Core
@ProgrammingTip
Sieve πŸ—‚

Clean & extensible Sorting, Filtering, and pagination for ASP.NET Core. βš—οΈ

Sieve is a simple, clean, and extensible framework for .NET Core that adds sorting, filtering, and pagination functionality out of the box. πŸ’Ž

Most common use case would be for serving ASP.NET Core GET queries. βœ…

Sample Request ⚑️ :

GET /GetPosts

?sorts= LikeCount,-created
&filters= LikeCount>10, Title@=awesome title,
&page= 1
&pageSize= 10


Try this package, It's super powerful and easy to use. πŸ”₯


https://t.me/pgimg/153

[ Github ] : github.com/Biarity/Sieve
[ Nuget ] : nuget.org/packages/Sieve

γ€°γ€°γ€°γ€°γ€°γ€°
#AspMvc #Core
@ProgrammingTip
Exploring .NET Core with Microservices, ASP.NET Core, and Entity Framework Core is a collection of five hand-picked chapters introducing you to the art of applying modern development practices and patterns to your .NET Core projects. 🌈

In it, you'll get a quick overview of what ASP.NET Core and Entity Framework Core offer, along with an introduction to microservices and web applications using .NET Core tooling. ✨

You'll also get some tips on working with legacy code in this new environment. πŸ€·πŸ»β€β™‚οΈ

In short, this free eBook will get your feet wet and show you real-world examples that illustrate what's possible. πŸŒ€


https://t.me/pgimg/156

γ€°γ€°γ€°γ€°γ€°γ€°
#AspMvc #Core #Microservice #Book
@ProgrammingTip
Awesome .NET Core πŸ”₯

A collection of awesome .NET core libraries, tools, frameworks and software. πŸ’Ž


https://t.me/pgimg/159

[ Github ] : kutt.it/awscore

γ€°γ€°γ€°γ€°γ€°γ€°
#DotNet #Core #AspMvc
@ProgrammingTip
Clean Architecture with ASP.NET Core 2.1 πŸ¦‹

The explosive growth of web frameworks and the demands of users have changed the approach to building web applications. 🌐

Many challenges exist, and getting started can be a daunting prospect. Let's change that now. βœ…

This talk provides practical guidance and recommendations. πŸ’Ž

This video will cover architecture, technologies, tools, and frameworks. We will examine strategies for organizing your projects, folders and files. ⚑️

We will design a system that is simple to build and maintain - all the way from development to production. You leave this talk inspired and prepared to take your enterprise application development to the next level. πŸ”₯


https://t.me/pgimg/180

[ Video ] : kutt.it/cav
[ Source Code ] : kutt.it/cag

γ€°γ€°γ€°γ€°γ€°γ€°
#AspNet #Core #CleanCode
@ProgrammingTip
​​Notify Your Angular App Using SignalR πŸ”₯

In this small article we'll walk you through how to create a notification service using .NET Core 2.0 Web Api, .NET Core SignalR & Angular. πŸ’Ž

Let’s get into business. ✨


[ Article ] : kutt.it/ngnoti

γ€°γ€°γ€°γ€°γ€°γ€°
#AspMvc #Core #Angular #SignalR
@ProgrammingTip
Our new channel is here! πŸ₯³

.NET Core / ASP.NET Core Channel πŸ’™

A place to share Tips, Resources, and mostly Open-Source libraries about .NET Core & ASP.NET Core stuff. πŸ”₯

Join and share our new channel with your friends ⚑️:
@CoreTips ✌🏻

〰️〰️〰️〰️〰️〰️
#AspMvc #Core #Channels
@ProgrammingTip
The Evolving Infrastructure of .NET Core ⚑️

It would be useful to take a brief look at the history of ASP.NET Core's infrastructure systems and the significant improvements that have been made in the last year or so. πŸ’Ž

This post will be interesting if you are interested in build infrastructure or want a behind-the-scenes look at how we build a product as big as .NET Core. πŸ”₯


[ Article ] : kutt.it/netInfra

〰️〰️〰️〰️〰️〰️
#Microsoft #AspMvc #Core #AspCore
@ProgrammingTip
Kubernetes for .NET Developers ☸️

Have you started building containerized application and struggled with scaling across multiple hosts❓

Would you like to simplify DevOps tasks such as deployment and configuration❓

Have you heard about Kubernetes and would like to learn more❓

Then this presentation is for you. πŸ’Ž

Kubernetes
is an open source system for managing containerized applications across multiple hosts; providing basic mechanisms for deployment, maintenance, and scaling of applications. πŸ”₯

In this presentation, I will walk you through Kubernetes fundamentals, the high level architecture, how would you deploy an ASP.NET Core application to Kubernetes and finally how would you configure and launch auto-scaling, self-healing Kubernetes cluster. ⚑️


[ YouTube ] : youtu.be/uh4V2IjSrlI
[ Github ] : kutt.it/KubeAsp

〰️〰️〰️〰️〰️〰️
#Kubernetes #DotNet #Core #AspMvc #AspCore
@ProgrammingTip
Blazor WebAssembly 3.2.0 now available πŸš€

I’m thrilled to announce that Blazor WebAssembly is now officially released.

This is a fully-featured and supported release of Blazor WebAssembly that is ready for production use. βœ…

Full stack web development with .NET is now here! ⚑️

[ Article ]: https://devblogs.microsoft.com/aspnet/blazor-webassembly-3-2-0-now-available/

〰️〰️〰️〰️〰️〰️
#Blazor #DotNet #Core
@ProgrammingTip