اشتراک‌ها
پشتیبانی Clang از ویندوز و کامپایل Chrome برای Windows توسط آن

Google has helped with the open source project to make Clang Windows compatible. Not only is it Windows compatible, but it is also binary compatible with output from the Microsoft compiler. This means you can use the linker to join up code from each compiler into a single program. 

پشتیبانی Clang از ویندوز و کامپایل Chrome برای Windows توسط آن
اشتراک‌ها
بهترین کنفرانس های مهندسی نرم افزار در سال 2021

If you want to stay in touch with the latest developments in any field, you should be aware of the conferences and events regarding those topics. Thanks to the pandemic, all the conferences and events have taken the online route. Well, the best part is that it has become accessible to everyone. You do not even have to apply for official leaves to attend them. 

بهترین کنفرانس های مهندسی نرم افزار در سال 2021
بازخوردهای پروژه‌ها
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);
}

اشتراک‌ها
روشی برای تبدیل برنامه‌های React به PWA

You’ve built a React web app and would love to bring it to iOS and Android. That means you have to learn React Native first, right? As it turns out, there’s an easier way to deploy to mobile. With Capacitor, a new native runtime for web apps, you can deploy any React-based web app as a PWA, iOS, or Android app - all from the same codebase. 

روشی برای تبدیل برنامه‌های React به PWA
اشتراک‌ها
مقایسه EntityFrameWork 6 (7) و NHibernate
 There is quite a bit of Entity Framework and NHibernate comparisons on the web already but all of them cover mostly the technical side of the question. In this post, I’ll compare these two technologies from a Domain Driven Design perspective. I’ll step through several code examples and show you how both of these ORMs let you deal with problems. 
مقایسه EntityFrameWork 6 (7) و NHibernate
اشتراک‌ها
استفاده از Sql Server FileTable به همراه EF
FileTable is a great new feature in SQL Server 2012 which facilitates storing and working with unstructured blob data in SQL Server. Unfortunately is not yet supported in Entity Framework, so you cannot simply use FileTable in your entity model. But there is a workaround for this inconvenience, which I am going to show you in this post. 
استفاده از Sql Server FileTable به همراه EF