اشتراک‌ها
ایده گرفتن از قسمت‌های خوب Domain Driven Design

Domain Driven Design: The Good Parts

The greenfield project started out so promising. Instead of devolving into big ball of mud, the team decided to apply domain-driven design principles. Ubiquitous language, proper boundaries, encapsulation, it all made sense.
But along the way, something went completely and utterly wrong. It started with arguments on the proper way of implementing aggregates and entities. Arguments began over project and folder structure. Someone read a blog post that repositories are evil, and ORMs the devil incarnate. Another read that relational databases are last century, we need to store everything as a stream of events. Then came the actor model and frameworks that sounded like someone clearing their throat. Instead of a nice, clean architecture, the team chased the next new approach without ever actually shipping anything.
Beyond the endless technical arguments it causes, domain-driven design can actually produce great software. We have to look past the hype into the true value of DDD, what it can bring to our organizations and how it can enable us to build quality systems. With the advent of microservices, DDD is more important than ever - but only if we can get to the good parts. 

ایده گرفتن از قسمت‌های خوب Domain Driven Design
اشتراک‌ها
Visual Studio 2019 version 16.4.4 منتشر شد
اشتراک‌ها
کار با HubContext در ASP.NET Core SignalR

In this section, I’m going to cover how you can use SignalR outside of a Hub. In most asp.net core applications, you will likely want to communicate with the connect clients from within your application but outside of a Hub. You can accomplish this by using the HubContext.

For example, an ASP.NET Core MVC Controller or any other class that is instantiated by ASP.NET Core’s Dependency Injection.

The HubContext allows you to send messages to your connected clients. It has many of the same features to communicate with clients as when you are inside of a Hub.  

کار با HubContext در ASP.NET Core SignalR
اشتراک‌ها
آیا مهندسان نرم افزار یک کالا هستند؟

WhatsApp had 450 million monthly users and just 32 engineers when it was acquired. Imgur scaled to over 40 billion monthly image views with just seven engineers. Instagram had 30 million users and just 13 engineers when it was acquired for $1 billion dollars.
This is the new normal: fewer engineers and dollars to ship code to more users than ever before. The potential impact of the lone software engineer is soaring. How long before we have a billion-dollar acquisition offer for a one-engineer startup? How long before the role of an engineer, artisanally crafting custom solutions, vanishes altogether?

آیا مهندسان نرم افزار یک کالا هستند؟
نظرات مطالب
مقدار دهی اولیه‌ی بانک اطلاعاتی توسط Entity framework Core
برای اعمال OwnsOne  وقتی کلاسهای زیر را داشته باشیم چگونه باید عمل کرد؟
namespace Loans.Models
{
    public class Product
    {
        public Product()
        {
            Rating = new Rating();
        }

        public Rating Rating { get; set; }

        public int Id { get; set; }

        public string Name { get; set; }

        public double Price { get; set; }

        public double OfferPrice { get; set; }

        public Group Group { get; set; }

        public int GroupId { get; set; }

        public List<Image> Images { get; set; }
    }

    public class Rating
    {
        public Rating()
        {
        }

        public Rating(double totalRating, int totalRaters, double averageRating)
        {
            TotalRating = totalRating;
            TotalRaters = totalRaters;
            AverageRating = averageRating;
        }


        public double TotalRating { get; set; } = 0.0;

        public int TotalRaters { get; set; } = 0;

        public double AverageRating { get; set; } = 0.0;
    }

    public class Group
    {
        public int Id { get; set; }

        public string Name { get; set; }

        public Group ParentGroup { get; set; }

        public int? ParentGroupId { get; set; }

        public List<Group> ChildrenGroups { get; set; }

        public List<Product> Products { get; set; }

        public Image Image { get; set; }
    }

    public class Image
    {
        public Guid Id { get; set; }

        public string Name { get; set; }

        public Group Group { get; set; }

        public int? GroupId { get; set; }

        public Product Product { get; set; }

        public int? ProductId { get; set; }
    }
}
حالا اگر برای ownsOne  طبق زیر عمل کنم:
modelBuilder.Entity<Product>().OwnsOne(p => p.Rating)
در هنگام حذف Product  آن را حذف نمیکند و ارور زیر را میدهد:
 "The entity of type 'Product' is sharing the table 'Products' with entities of type 'Rating ',
 but there is no entity of this type with the same key value ."
البته از EFCore2.2 استفاده میکنم. 
اشتراک‌ها
سازمان پروژه‌های پژوهشی پیشرفتهٔ دفاعی (DARPA): تمام کدهای C باید به Rust تبدیل شوند!

DARPA Wants All C Converted To Rust

After more than two decades of grappling with memory safety issues in C and C++, the software engineering community has reached a consensus. It’s not enough to rely on bug-finding tools. The preferred approach is to use “safe” programming languages that can reject unsafe programs at compile time, thereby preventing the emergence of memory safety issues.

سازمان پروژه‌های پژوهشی پیشرفتهٔ دفاعی (DARPA): تمام کدهای C باید به Rust تبدیل شوند!
اشتراک‌ها
دوره کامل NET MAUI.

.NET MAUI Full Course : Cross Platform Development
.NET MAUI allows you to create multi-platform apps using one code base. That means you can develop for Android, iOS, macOS and of course Windows at the same time!
In this course I provide numerous examples on how to use all the tools MAUI provides. Check out the long table of contents below.  
 

دوره کامل NET MAUI.