اشتراک‌ها
استایل دهی به برنامه های Xamarin.Forms با CSS

Some months ago a feature landed in Xamarin.Forms that seemed to truly polarize the Xamarin.Forms community: support for styling applications using CSS. Some argued that it was an unnecessary introduction to "Web" technology to the native development experience, and others that it simply isn't the right solution to the problem.  While I sympathize with the latter opinion and think there's plenty of room for some good debate on the right path forward, I count myself as part of a third camp: I think that CSS is a powerful (and frequently maligned) solution to the problem of styling native mobile applications.

استایل دهی به برنامه های Xamarin.Forms با CSS
اشتراک‌ها
پایان Visual Studio for Mac
Microsoft would never say it, of course, but truly the best “alternative solution” is Jetbrains Rider. It's head and shoulders above VS for Mac in every way. I learn more C# features through its recommendations than even reading Microsoft's development docs.
پایان Visual Studio for Mac
نظرات نظرسنجی‌ها
با توجه به آخرین نگارش‌های موجود Angular و React، انتخاب شما برای انجام یک پروژه بزرگ کدام است؟
یک نکته‌: در اینجا شما فرض‌تان بر این است که React یک فریم‌ورک است؛ به نظرم قرار دادن React در این بین مقایسه درستی نیست؛ چون React به خودی خود یک لایبرری است به این معنا که خیلی از concernهای (routing, data fetching, ...) ساخت یک اپلیکیشن را باید خودتان هندل کنید؛ پیاده‌سازی هرکدام از این موارد به شکل صحیح دشواری‌های خاص خود را دارد؛ بنابراین بهتر است به React به عنوان یک لایبرری و یا یک معماری نگاه کنید و برای ساخت اپلیکیشن‌ها از فریم‌ورک‌هایی که مبتنی بر آن توسعه داده شده‌اند (مانند Next.js, Remix, ...) استفاده کنید.

در مورد خود نظرسنجی هم به نظرم این انتخاب کاملاً به سایز تیم بستگی دارد؛ برای پروژه‌هایی که دات‌نت هستند پیشنهاد من Blazor است (مزایای آن نیز در سایت توضیح داده شده است) به خصوص برای اعضای تیمی که به عنوان فول‌استک هستند این امر خیلی مهم است؛ در اینحالت context switching با هزینه کمتری خواهید داشت و به اصطلاح developer experience بهتری نیز خواهید داشت.
When a developer switches context, they must first disengage from the task at hand and then shift their focus to the new task. This whole process takes time and can drain devs mentally. It takes a developer 25 minutes to refocus after a context switch. 

نظرات اشتراک‌ها
ایجاد یک کلاس کمکی برای تولید کوئری‌های پارامتری مخصوص Dapper
یکی از افزونه‌های خیلی خوبی که برای Dapper نوشته شده که خود نویسنده Dapper هم توش نقش اصلی رو بازی میکنه Dapper.Contrib هستش که انجام عملیات CRUD رو خیلی راحت میکنه. در این حالت نیازی به نوشتن کوئری برای انجام کارها نیست و با پاس دادن آبجکت مورد نظر می‌تونیم به راحتی عملیات مورد نظرمون رو انجام بدیم. برای مثال در صورت استفاده از این افزونه برای Insert خواهیم داشت: 
 connection.Insert(new Car { Name =  "Volvo"  });    
و برای Update:
 connection.Update(new Car() { Id = 1, Name =  "Saab"  });    
و همینطور حدف یک رکورد:
 connection.Delete(new Car() { Id = 1 });  
اشتراک‌ها
دوره 2 ساعته سی‌شارپ برای مبتدی‌ها

C# for Beginners | Full 2-hour course - YouTube

00:00:00 – Start
00:00:09 – What is C#
00:01:27 – C#: Hello World
00:06:01 – C#: The Basics of Strings
00:14:35 – C#: Searching Strings
00:17:27 – C#: Numbers and Integer Math
00:22:04 – C#: Numbers and Integer Precision
00:27:32 – C#: Numbers and Decimals
00:33:10 – C#: Branches (if)
00:44:29 – C#: “Hello World” Explained
00:50:29 – C#: What are Loops?
00:57:42 – C#: Combining Branches and Loops
01:04:34 – C#: Arrays, List, and Collections
01:15:09 – C#: Sort, Search, and Index Lists
01:22:08 – C#: Lists of Other Types
01:29:51 – C#: Debugging
01:34:30 – C#: Object Oriented Programming – Objects and Classes
01:47:20 – C#: Object Oriented Programming – Methods and Members
01:56:02 – C#: Object Oriented Programming – Methods and Exceptions
02:03:00 – C#: Object Oriented Programming – Catching Exceptions 

دوره 2 ساعته سی‌شارپ برای مبتدی‌ها
اشتراک‌ها
دوره آموزشی TypeScript ،ASP.NET Web API ، AngularJS Bootcamp هفته دوم

We finished week 2 of the 9-week boot camp. This week was AngularJS week. We covered building the front-end of a Single Page App with the AngularJS framework. In particular, we covered topics such as client-side routing, making Ajax calls using the $http service and the $route factory, building custom AngularJS services, working with Google Maps, using Angular UI Bootstrap, and uploading files to services such as FilePicker.io. 

دوره آموزشی TypeScript ،ASP.NET Web API ، AngularJS Bootcamp هفته دوم
اشتراک‌ها
دوره بررسی تازه‌های ASP.NET 5 از Tuts plus
ASP.NET is almost 15 years old and it has evolved to become a flexible and extremely powerful platform. But 15 years is a long time, especially in the world of web technology, and the folks at Microsoft knew it was time to change ASP.NET. In this course, Envato Tuts+ instructor Jeremy McPeak will walk you through the major changes to ASP.NET in version 5. Along the way, you'll see how these changes will affect your project and how the new features can make your life as a developer easier. You'll also get a first look at the new Tag Helpers, inversion of control and dependency injection features, with practical examples.
دوره بررسی تازه‌های ASP.NET 5 از Tuts plus
اشتراک‌ها
مدیریت مباحث همزمانی مرتبط با یک Rich Domain Model با استفاده از EFCore و الگوی Aggregate

In summary, the most important issues here are:

  • The Aggregate’s main task is to protect invariants (business rules, the boundary of immediate consistency)
  • In a multi-threaded environment, when multiple threads are running simultaneously on the same Aggregate, a business rule may be broken
  • A way to solve concurrency conflicts is to use Pessimistic or Optimistic concurrency techniques
  • Pessimistic Concurrency involves the use of a database transaction and a locking mechanism. In this way, requests are processed one after the other, so basically concurrency is lost and it can lead to deadlocks.
  • Optimistic Concurrency technique is based on versioning database records and checking whether the previously loaded version has not been changed by another thread.
  • Entity Framework Core supports Optimistic Concurrency. Pessimistic Concurrency is not supported
  • The Aggregate must always be treated and versioned as a single unit
  • Domain events are an indicator, that state was changed so Aggregate version should be changed as well 
public class AggregateRootBase : Entity, IAggregateRoot
{
    private int _versionId;

    public void IncreaseVersion()
    {
        _versionId++;
    }
}
internal sealed class OrderEntityTypeConfiguration : IEntityTypeConfiguration<Order>
{
    public void Configure(EntityTypeBuilder<Order> builder)
    {
        builder.Property("_versionId").HasColumnName("VersionId").IsConcurrencyToken();
 
        //...
    }
}
var order = await _ordersContext.Orders.FindAsync(orderId);
order.AddOrderLine(request.ProductCode); 
var domainEvents = DomainEventsHelper.GetAllDomainEvents(order);
if (domainEvents.Any())
{
    order.IncreaseVersion();
}
await _ordersContext.SaveChangesAsync();


مدیریت مباحث همزمانی مرتبط با یک Rich Domain Model با استفاده از EFCore و الگوی Aggregate