بازخوردهای پروژه‌ها
Fill and FillByObject
متود زیر برای تولید عبارت مبتنی بر الگو زمانی که الگو پیچیده‌تر از این است که بشود با string.Format به راحتی پیاده سازی شود ولی چندان هم پیچیده نیست که ابزارهای حرفه ای‌تری مانند T4 یا Razor به کار بیایند، میتواند مورد استفاده قرار گیرد:
        /// <summary>
        /// Insert values from an object into a string pattern. To specify the object's property you have to use the '{propertyName}'.
        /// </summary>
        /// <remarks>
        /// This method is a replacement to String.Format, but it has two differences:
        /// <list type="simple">
        /// <item>It reverese the order you call the functionality, instead of writing String.Format(pattern, args) you write pattern.FillByObject(args). This makes the code look cleaner.</item>
        /// <item>You supply the pattern with an object and specify insertion points by property names.</item>
        /// </list>
        /// <example>
        /// <![CDATA[
        /// "First name:{firstName}, Sur name:{Surname}".FillByObject(new {firstName = "Sam", lastName="Naseri"});
        /// ]]>
        /// </example>
        /// </remarks>
        /// <seealso cref="Fill"/>
        /// <typeparam name="T">Type of bindingValue.</typeparam>
        /// <param name="bindingPattern">The pattern to fill.</param>
        /// <param name="bindingValue">The object providing values to fill in the pattern.</param>
        /// <returns>The pattern filled with values.</returns>
        public static string FillByObject<T>(this string bindingPattern, T bindingValue)
        {
            var properties = GetProperties(typeof(T)).ToList();
            var values = properties.Select(property => property.GetValue(bindingValue, new object[] { })).ToList();
            var result = bindingPattern;
            for (int index = 0; index < properties.Count; index++)
            {
                var property = properties[index];
                var propPattern = "{" + property.Name + "}";
                var old = result;
                result = result.Replace(propPattern, values[index] != null ? values[index].ToString() : "");
            }
            return result;
        }

پیاده سازی فوق یک پیاده سازی بسیار خام و بسیار کند است و جای بهبود زیادی دارد. من فقط برای سناریوهای ساده که کارایی مطرح نیست استفاده از متود فوق را توصیه میکنم.
متودهای جانبی مورد نیاز:
private static IEnumerable<PropertyInfo> GetProperties(Type t)
{
    return t.GetProperties(BindingFlags.Public | BindingFlags.Instance);
}

همچنین متود زیر هم میتواند نوشتن string.Format را یک خرده ساده‌تر کند:
/// <summary>
/// A simple replacement for String.Format which only makes the codes look nicer.
/// </summary>
/// <param name="pattern">The source string that you want to replace insertion points on it.</param>
/// <param name="args">Values to be replaced in the pattern.</param>
/// <returns></returns>
public static string Fill(this string pattern, params object[] args)
{
    return string.Format(pattern, args);
}

اشتراک‌ها
FastEndpoints؛ جایگزینی دیگر برای Minimal APIs در دات نت 6

FastEndpoints offers a more elegant solution than the Minimal APIs and MVC Controllers with the goal of increasing developer productivity. Performance is on par with the Minimal APIs and is faster; uses less memory; and outperforms a MVC Controller by about 34k requests per second on a Ryzen 3700X desktop. 

FastEndpoints؛ جایگزینی دیگر برای Minimal APIs در دات نت 6
اشتراک‌ها
مسیر راه EmberJS 2.0

This is not a big-bang rewrite; we will continue development on the master branch, and roll out changes incrementally on the 1.x release train. The 2.0.0 release will simply remove features that have been deprecated between now and then. Our goal is that you can move your Ember app to 2.0 incrementally, one sprint at a time. 

مسیر راه EmberJS 2.0
اشتراک‌ها
کتابخانه 101

1) 101 will be maintained to minimize overlap with vanilla JS.

  • 101 utils are made to work well with vanilla JS methods.
  • 101 will only duplicate vanilla JS to provide functional programming paradigms or if the method is not available in a widely supported JS version (currently ES5).
  • Underscore/lodash - duplicates a lot of ES5: forEach, map, reduce, filter, sort, and more.

2) No need for custom builds.

  • With 101, import naturally, and what you use will be bundled.
  • Each util method is a module that can be required require('101/<util>').
  • Currently node/browserify is supported, I will add other module system support on request.
  • Underscore/lodash is large, and you have to manually create custom builds when if you're trying to optimize for size. 
کتابخانه 101
اشتراک‌ها
نگارش نهایی Bootstrap 5 منتشر شد

Bootstrap 5 has officially landed! After three alphas, three betas, and several months of hard work, we’re shipping the first stable release of our new major version. It’s been a wild ride made possible by our maintainers and the amazing community that uses and contributes to Bootstrap. Thanks to all who have helped us get here! 

نگارش نهایی Bootstrap 5 منتشر شد
اشتراک‌ها
نکات افزایش پرفرمنس برای وبسایت

In this post, I'll talk about what the different things I've made on this website to improve the performance. Some of the optimizations are just some configuration flags to turn on, others require more changes in your code.

  • Enable HTTP/2
  • Enable TLS 1.3
  • Compress responses using Brotli or gzip
  • Add caching information
  • Optimize JavaScript / CSS files
  • Reduce the number of redirections
  • Optimize images
  • Move your servers near your visitors (GeoDNS, CDN)
  • Resource Hints: Prefetch resources
  • Remove unused resources / features
  • Minify HTML
  • Optimize JavaScript code
  • Automate almost everything! 
نکات افزایش پرفرمنس برای وبسایت
اشتراک‌ها
C# 8 و پس از آن

   One of the most popular programming language on the market is getting even better. With every iteration of C# we get more and more features that are meant to make our lives as developers a lot easier. 

C# 8 و پس از آن
اشتراک‌ها
تاثیر AI بر روی آمارهای رده‌بندی زبان‌های برنامه نویسی

The advent and rise of AI-based code assistants are already impacting the data that populates RedMonk’s language rankings. As questions and knowledge sharing moves from public forums to private tools, our ability to ascertain meaningful trends from said public data will be indefinitely altered. 

تاثیر AI بر روی آمارهای رده‌بندی زبان‌های برنامه نویسی
اشتراک‌ها
پیاده سازی AutoPostBack در ASP.NET Core

Those of you who worked with ASP.NET web forms will recollect that certain server controls such as DropDownList have a property called AutoPostBack. This property when set to true automatically submits the form to the server whenever the selection changes and raises some server side event. In modern web development people prefer to use Ajax over AutoPostBack but at times AutoPostBack is what you might need. To that end this article shows how AutoPostBack can be implemented in ASP.NET Core applications. 

پیاده سازی AutoPostBack در ASP.NET Core